From d7479d7d3037fa20580c180112eda4fc615ccd96 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 7 Jun 2024 03:12:19 +0000 Subject: [PATCH 1/2] docs: minor docs formatting in `UpdateSecurityCenterServiceRequest.validate_only` PiperOrigin-RevId: 640989637 Source-Link: https://github.com/googleapis/googleapis/commit/26b136f724bf60e12dc21b26e1c48fb8a78fbf0f Source-Link: https://github.com/googleapis/googleapis-gen/commit/221ee6a542f88aa07a4a1e80a70aadce23cfa32b Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXJNYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiIyMjFlZTZhNTQyZjg4YWEwN2E0YTFlODBhNzBhYWRjZTIzY2ZhMzJiIn0= --- .../V1/SecurityCenterManagement.php | Bin 0 -> 27496 bytes ...ventThreatDetectionCustomModuleRequest.php | 215 ++ ...rityHealthAnalyticsCustomModuleRequest.php | 210 ++ .../V1/CustomConfig.php | 309 +++ .../V1/CustomConfig/CustomOutputSpec.php | 73 + .../CustomOutputSpec/Property.php | 122 ++ .../V1/CustomConfig/ResourceSelector.php | 70 + .../V1/CustomConfig/Severity.php | 78 + ...ventThreatDetectionCustomModuleRequest.php | 161 ++ ...rityHealthAnalyticsCustomModuleRequest.php | 161 ++ ...ectiveEventThreatDetectionCustomModule.php | 273 +++ .../EnablementState.php | 64 + ...iveSecurityHealthAnalyticsCustomModule.php | 215 ++ .../EnablementState.php | 64 + .../V1/EventThreatDetectionCustomModule.php | 401 ++++ .../EnablementState.php | 75 + ...ventThreatDetectionCustomModuleRequest.php | 103 + ...rityHealthAnalyticsCustomModuleRequest.php | 102 + ...ventThreatDetectionCustomModuleRequest.php | 103 + .../V1/GetSecurityCenterServiceRequest.php | 135 ++ ...rityHealthAnalyticsCustomModuleRequest.php | 81 + ...entThreatDetectionCustomModulesRequest.php | 178 ++ ...ntThreatDetectionCustomModulesResponse.php | 102 + ...ityHealthAnalyticsCustomModulesRequest.php | 175 ++ ...tyHealthAnalyticsCustomModulesResponse.php | 102 + ...entThreatDetectionCustomModulesRequest.php | 174 ++ ...ntThreatDetectionCustomModulesResponse.php | 102 + ...ityHealthAnalyticsCustomModulesRequest.php | 179 ++ ...tyHealthAnalyticsCustomModulesResponse.php | 102 + ...entThreatDetectionCustomModulesRequest.php | 197 ++ ...ntThreatDetectionCustomModulesResponse.php | 101 + .../V1/ListSecurityCenterServicesRequest.php | 175 ++ .../V1/ListSecurityCenterServicesResponse.php | 101 + ...ityHealthAnalyticsCustomModulesRequest.php | 174 ++ ...tyHealthAnalyticsCustomModulesResponse.php | 101 + .../V1/SecurityCenterService.php | 345 ++++ .../SecurityCenterService/EnablementState.php | 73 + .../SecurityCenterService/ModuleSettings.php | 128 ++ .../SecurityHealthAnalyticsCustomModule.php | 339 ++++ .../EnablementState.php | 75 + ...rityHealthAnalyticsCustomModuleRequest.php | 193 ++ .../SimulatedResource.php | 168 ++ ...ityHealthAnalyticsCustomModuleResponse.php | 78 + .../SimulatedResult.php | 147 ++ .../V1/SimulatedFinding.php | 454 +++++ .../V1/SimulatedFinding/FindingClass.php | 95 + .../V1/SimulatedFinding/Severity.php | 116 ++ .../V1/SimulatedFinding/State.php | 65 + ...ventThreatDetectionCustomModuleRequest.php | 214 ++ .../V1/UpdateSecurityCenterServiceRequest.php | 205 ++ ...rityHealthAnalyticsCustomModuleRequest.php | 209 ++ ...ventThreatDetectionCustomModuleRequest.php | 147 ++ ...entThreatDetectionCustomModuleResponse.php | 71 + .../CustomModuleValidationError.php | 213 ++ .../Position.php | 104 + ...e_event_threat_detection_custom_module.php | 83 + ...ecurity_health_analytics_custom_module.php | 84 + ...e_event_threat_detection_custom_module.php | 81 + ...ecurity_health_analytics_custom_module.php | 81 + ...e_event_threat_detection_custom_module.php | 87 + ...ecurity_health_analytics_custom_module.php | 82 + ...t_event_threat_detection_custom_module.php | 81 + .../get_location.php | 57 + .../get_security_center_service.php | 89 + ...ecurity_health_analytics_custom_module.php | 75 + ..._event_threat_detection_custom_modules.php | 87 + ...curity_health_analytics_custom_modules.php | 88 + ..._event_threat_detection_custom_modules.php | 88 + ...curity_health_analytics_custom_modules.php | 90 + ..._event_threat_detection_custom_modules.php | 85 + .../list_locations.php | 62 + .../list_security_center_services.php | 86 + ...curity_health_analytics_custom_modules.php | 86 + ...ecurity_health_analytics_custom_module.php | 86 + ...e_event_threat_detection_custom_module.php | 67 + .../update_security_center_service.php | 62 + ...ecurity_health_analytics_custom_module.php | 66 + ...e_event_threat_detection_custom_module.php | 88 + .../Client/SecurityCenterManagementClient.php | 1371 +++++++++++++ .../v1/src/V1/gapic_metadata.json | 133 ++ ...urity_center_management_client_config.json | 160 ++ ...ty_center_management_descriptor_config.php | 398 ++++ ...y_center_management_rest_client_config.php | 545 +++++ .../SecurityCenterManagementClientTest.php | 1774 +++++++++++++++++ 84 files changed, 14639 insertions(+) create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/GPBMetadata/Google/Cloud/Securitycentermanagement/V1/SecurityCenterManagement.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php create mode 100644 owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/GPBMetadata/Google/Cloud/Securitycentermanagement/V1/SecurityCenterManagement.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/GPBMetadata/Google/Cloud/Securitycentermanagement/V1/SecurityCenterManagement.php new file mode 100644 index 0000000000000000000000000000000000000000..993d200288e858a980171037b2a842fc9b21faf5 GIT binary patch literal 27496 zcmdr#TWllObsmz^YOnU8y~%oIIY#JNudS7}fJwd|^mrr& zQoS1AY;J8CX1rA2ZB(j;nTW@y7UK(xEAi}9ZslHBYSo)&$w-Fubkt|i~&2rK* zN=>t3@0X04ZJ4{oT5;Rhh0n>oYtFR-yI459nxI$_sugz)t5GZ&@tLKGdBZN2i*|8i zh9cOQBnUS09T04+U3&zfQnhGVadFQiC1Tzo0=*f;Nnoe&Uwj%)Y&FE#0mVm2l#YY*9>2wQ`H{-V1G~C$ZanrDy zX6+G5Hvw?qeA;Nk&P=1Sk*U?{gbVeWl};b-=@3Mxg_G3^@K$Zjbj7HaCybrqUZrlT zEnPOavPlz}EAE0uY%JA5();qr9FYOTvbzoYC`;)+=Zn^JM?jkgsg@M@>d?DV0n4$A zyA64y%Z<`T9;Dw?kp0Sj!`R3^-{>GeY5`Y%ro#0-Q!YE|Jq=D|)KN&Ho)4g3{3{LR zy5>IcCYhjZsEWhC{*9|7uN`7gC zU#b*$iMMM|)#KOh=GUm71DB9Ah;s3Z!h<>&8RlJ3A%4gE{L3w>C;X})+F5T4W#Bi6 z?V62Jl6aJ+#V_2+;o2b9qyb`O-|N4J(0Q*D%^T)krDWi9C`O$0uol-wPfkSN&J5sN z=q@7gTG=QUj9PKCN*#WIATov{aNn8KVuB$G7fqrq+CxNOZf_u1|qLW9i)#6P1z#5vpt+Zjxa z2s}d83CHlsswjR4ow1mx3Z;5&tFk@ZPZwTjS;$-s#WnJB1f5|N||~_mz^5A1D{4Ga|^TC<=hJVsR7L=*n+8{ z2tI`drgC|*d}=6~{@cjy%$pH(v!i2VHVQt`Nl7Buf!usJLFBL8%dtkz2` ziAcUEJ{~yP9!tWw|A19oJrD5oR=rv_O!$g@I4Ydwy18AfRbCJzxc@vN%&|KKlf2ZY z&bR$u|K15So)xZ0@NL#8R_&b(Z&?i~9u{Jz}sm8a<-=!cmmorRADO z%OmN3irvoqLkz75L9trHRciROTxE0kHO;MDptQYq&Q`dnY>CfGWITL3vB_u|AeyTtJ9^Z`YqQYQw}U zP?Oa3f7Q?jj<7ka0cE6te^o;%hnKQSYym4s9<|mRuY@n4vo+&+yWrX|ajz%!-_p>H z8AC~qLX6LPQeh#)-gqAUTLb8#gweJOEPm%pH_lYxXFG<6r{x79K~}q{ph2$c$#6+f zkjQX{(I7N=?1E9QKp%zX#VnM7U7amLPX@xQSzx}ACch^q@{k$7o0&%+7A`d`C`fDx zx5Vocl>TGH>mz1>or9q_IgF-13$gJtvF@_r<3|XILJR>J5=|6YD={?w?a79}F5|W3 zLS1*Uj@>5%FLhDkF8!T8bjqDH;>!>!OfW1+=UItAm^vpM0qGGWNb85Wj*^qE)|+;t zY17Cun3@r{hu1}J%nA0#A_bLi7$t^e8=VtP7KkKOC_BL7Nu)YDBGF3Bb8rmN8XB;S zJ%eRHCl^Vf&LZ&0Hz05K za|Bl)UYqrXVcHewJFs}UbVMrsz!OUhGV48zETRGNMQcRS@KrQKYvBTE85x#EsAttm z2W=Tiq9H%y83$Njw?LGO?TP0gkD~#>Nj!|+o6oM168A}8@e2j+Bz&El%*;XUJAh)d zxtUogd=cuOhcU(K{7@91K+(CyCx&AB*EEzQX-%F_5Q4mqi18&~ss@n+GPQZ!)kvb8 zpnY9KSLJuY^Rk~uqrxYIcvPWW^YY3i!PCw;*kAK}lT1g5HPrqei0E%LlqMol-P4b~ zupqs^0tvH(z=aJJJ$W*>pspq%`X5Hn)k)KUsHH&HkHofL*3iZSl6J>^Xm`zy#Gwct zL8rlES7RC(ZTjalpEJw*T`7}ZlZzH6nq_>g&AOh4FC&t8OvGE zi%r927(*u5bedV=4+hYXL)&zvR)#4|Ywk6G&p1M(bv!=rqLB7hX(I;@p#hS_Z`Vzh z(4NFAsE>{0$Rz1Z>O+E-@I>8DR>GOVMe%d!98cj~xoJP`#8|x@FcHJ6uB?85?t1b#yXKiaeg>W1Vgf4A^CrV5DQtz(r)9rf;FIL| z3S{5s^KJL<8Ax674y5iBI|Dh;QzwZvGOnV7rH4@;6&WbYxpp%oNS8B{E4j5SB+-yk z=N9;15xoa#I2hq6_jd6;=&tG9!c=ZyrZ72|$>)7JJ`lGuyPVCe0CDHg>9y6lh3s-> zA~y%+0HpfwMMLws{N&=obZ%yKIkS>mT!5tiEE-&#$Y+<=*cUO<3CT}R7P8CBi_1fO zgb_=N`IXh>Y+)_8ILGelPk&Flow=={OCn&iJ`v}vGZ+)r`5|}rzhxM}%!2eWs4NeX zTxZ}L{^>t5NtQ#8;6r@h@Px=od=(=Yy(^oSX& z&^wO{$5B5Y@Us9N6q2I&6P*WvB|&Mp=%fj5*YAyzXh!OM+F;==TYqnw#3p{p*E(^! zBi$bvz7B2Czlfp7y;d(VG7Od5XOGYvb!I1F(7};7_ZA>Fk+?{8s8AM4ELwCYLPY0BdsXr*$$>1`O2 zsqTsgieG}Jo5MaSEfw9Td=LCm=N{A-HFVuQ2Mm*&5Zkt=xxt0j16QK|{s4-H5!J3< zP>B;7^q5;lXlyXNL`P_kp;>7s85Yy_+sqzW>wR58@*!B-1tOA0vOwfS8?EJpiW6=$ zXg_;;_@wM$O=|xDlav_knjpR-dcFZBDIQqJJK6y-`SIWPqqj5PjdoFlF9asQ;wTuz zDe>_jX@m%j1U0Ep)@YLi3pBmKSZhhvdx~%D-cVkp;$gSwU)9h!b=_fn7Y^;CzBmMi z4-=2aaQ6&fIsE)Nw45dPz@yGSx+J4TBGf$AJ%`gd!u%x`$;v;N<>K6PYOO z=Eqn%kf)51_#Yw?VI|La!alc=?s-=IcO&Qu8)(Q<)O))so%(Wcn!pk;(X zk_FxX|2VLVjWA@{b+q|~EDKmk-g_31+>Eo}%itv0+(MQGJ=WpCiNzm7SpfY>I*^j3 zxAz);9>x^KTLl|V3erYDP0J!qy2vtNG8fSQB!;fa)6f0hD;nyjJt7OBlhclS@^MEM z89z|N`bT^*w6U_JMK$tz1l{fKFZr(H_jog2T99HmRKcE0Y834q#vXV`gv=C7o7=oX zD@l1jOLYsL(X7{I@A$N);UctfFBr zOAeo>#=jCn*Jx(0att1C%DX*f;GEwh3O?ZoIGEn)pNqVe;YayD@$G+pE%H(XKTaO~ ze32dRzv+~yW3ES}#-IpRVb}UHUUCB!Rp_x`egv<%VS4NM<3Ps$9YslZBTeW|z-c@D zQF(<>1TEBIO&&v5K{)y^g9gwCV!iSwgZK{8R}+46?7)#f1=?2n>M(`;Da-)rD?`R_ zMbW6+We3RJ!cWSJMHZ%zxIzWADVn3zHA<@UozU$%i_2Nr3p@W9YK<(ORtFb)|v!NS>dMzLiNZ(;64d z2ss!}gZw{6^sYJkwDj5FbyM$FSWrOvyx!daB99t>zYksZ)>T1HL_zPQf%Zu6ek1l) z=DMW9jW^jZfRHoRRQdisnrcwTEeRme1@|N`wDm7&sk%COZ3CP0`w;M* z)l{c0AU1ZNM*M40bXofNxr)1$1}fCP!%?@EI5@_+P&&sI4<&(qwmK$?3G4~`}Guab<5qw>@py$UCU-Ff7( zvR{kSnbyYES9O`5hj4;HE+Xv)`;;!<_D}_m|0jwPq&RXK2w{T_3m4>dL=Cb~6NS!- zDgv%4pY|0*|Eb{x8I^E)V4+-E7ddTk9i#wo73bX~26%W^uP&5M{7w{&yZcjNE3kqQ ztH2e)@5Ko^{S{Bg%aL}F`4WKq2kWP@n`BzaB-GsLg~N8L+TI^HB<* zkgr1JED4v}^ml#zt?y_!>o%B9Zr%uE#ria!asz6c`AHlSTc5*^x#0v`a2QqiwHSLc z{IDk!X1bP2&zdk_0kjZrQ7t$qVc>%Pg3o!s8o?`Wz8+c7zJAcUu)z=)9wsS2*r)K5 zZgP*O20q~U52ENIal0Wz;T3r~Nq`g5@8aPR{T)y1%CY7^pB=JmQhGVo9OSBH;0S9D z_s|m1@S8Dozueg=mENNq#9m16lhCMokmusm!-hQOK{NAjM)dBu?6lOOul1_l6~``# z&D6W-{^fAuH~P^1talXZ5flQm9K>Fz)w`fpS7r36r3v+C(bTil?aHhU>_AZf0S~^> z29KNqeojkO6p3n^eMp>8ho+MpO}{SMVe*U$2w`2M41WsdGjgW|ReYozM4`-`8chCZ zHO3s-@uSrkb5X~RR%6WhbSGN<8_dgP55uX<%Vl8-X()8ihT>aGHA8AS)CdGtZ`IqWB2@z~Sn)5^`GUt&21G(Zj_-{;?x|{7Mv!kSeS#%Pjn1 zdA@gsA~>(`Q}98+xaoY|SBg7=;FVOT3avda)`cK~>#z=sg&_Fi08tzsC-I6Ce>sNk zW+_iwQD6n;1%MHvIJOb|7u3hjFDd$tmbRot-;AV|siF$@`4$9bLSl`VUu3@3>D=gg zHN|@GVrg4+ipJI%o0($gTmrELs6=N2?}&5csW&o*1M(6*Bi-?-{BLCvJGR}h(#hnl zTerADJ3rY`Y}z~Q4MkVrSIFUqJI&n*==zMq4=_sG{=_|bKKEflIy?uvM1FE*Nn77x zKcOJrbpgMjzg>6s?WaEp#JOIISrAUcRgeBIly&-Ph z;4e^e-k{{)#Rj}E=XT^l1~{Fjkkjc-pwnr%JM%I0!A?~AMX>1lmHs*Y!T@~Dt1%M4 zr+zzAKsRJ@PSZCGIM^-;YY2Sfz-B)mbqRZ?mI literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php new file mode 100644 index 000000000000..f10cdbc65818 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php @@ -0,0 +1,215 @@ +google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + */ +class CreateEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of parent for the module. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The module to create. The + * event_threat_detection_custom_module.name will be ignored and server + * generated. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_threat_detection_custom_module = null; + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred during creation of the module. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. Name of parent for the module. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule Required. The module to create. The + * event_threat_detection_custom_module.name will be ignored and server + * generated. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\CreateEventThreatDetectionCustomModuleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule): self + { + return (new self()) + ->setParent($parent) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of parent for the module. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * @type \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $event_threat_detection_custom_module + * Required. The module to create. The + * event_threat_detection_custom_module.name will be ignored and server + * generated. + * @type bool $validate_only + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred during creation of the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of parent for the module. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of parent for the module. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The module to create. The + * event_threat_detection_custom_module.name will be ignored and server + * generated. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule|null + */ + public function getEventThreatDetectionCustomModule() + { + return $this->event_threat_detection_custom_module; + } + + public function hasEventThreatDetectionCustomModule() + { + return isset($this->event_threat_detection_custom_module); + } + + public function clearEventThreatDetectionCustomModule() + { + unset($this->event_threat_detection_custom_module); + } + + /** + * Required. The module to create. The + * event_threat_detection_custom_module.name will be ignored and server + * generated. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $var + * @return $this + */ + public function setEventThreatDetectionCustomModule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); + $this->event_threat_detection_custom_module = $var; + + return $this; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred during creation of the module. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred during creation of the module. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php new file mode 100644 index 000000000000..582fa03482dc --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php @@ -0,0 +1,210 @@ +google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + */ +class CreateSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent organization, folder, or project of the + * module, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_health_analytics_custom_module = null; + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because: + * 1. the state could have changed (e.g. IAM permission lost) or + * 2. A failure occurred during creation of the module. + * Defaults to false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. Name of the parent organization, folder, or project of the + * module, specified in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule Required. The resource being created + * + * @return \Google\Cloud\SecurityCenterManagement\V1\CreateSecurityHealthAnalyticsCustomModuleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule): self + { + return (new self()) + ->setParent($parent) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the parent organization, folder, or project of the + * module, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @type \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $security_health_analytics_custom_module + * Required. The resource being created + * @type bool $validate_only + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because: + * 1. the state could have changed (e.g. IAM permission lost) or + * 2. A failure occurred during creation of the module. + * Defaults to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent organization, folder, or project of the + * module, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the parent organization, folder, or project of the + * module, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule|null + */ + public function getSecurityHealthAnalyticsCustomModule() + { + return $this->security_health_analytics_custom_module; + } + + public function hasSecurityHealthAnalyticsCustomModule() + { + return isset($this->security_health_analytics_custom_module); + } + + public function clearSecurityHealthAnalyticsCustomModule() + { + unset($this->security_health_analytics_custom_module); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $var + * @return $this + */ + public function setSecurityHealthAnalyticsCustomModule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); + $this->security_health_analytics_custom_module = $var; + + return $this; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because: + * 1. the state could have changed (e.g. IAM permission lost) or + * 2. A failure occurred during creation of the module. + * Defaults to false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (no module will be created). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually create the module could + * still fail because: + * 1. the state could have changed (e.g. IAM permission lost) or + * 2. A failure occurred during creation of the module. + * Defaults to false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php new file mode 100644 index 000000000000..77cd3e176778 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php @@ -0,0 +1,309 @@ +google.cloud.securitycentermanagement.v1.CustomConfig + */ +class CustomConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The CEL expression to evaluate to produce findings. When the + * expression evaluates to true against a resource, a finding is generated. + * + * Generated from protobuf field .google.type.Expr predicate = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $predicate = null; + /** + * Optional. Custom output properties. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_output = null; + /** + * Optional. The Cloud Asset Inventory resource types that the custom module + * operates on. For information about resource types, see [Supported asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + * Each custom module can specify up to 5 resource types. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_selector = null; + /** + * Optional. The severity to assign to findings generated by the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $severity = 0; + /** + * Optional. Text that describes the vulnerability or misconfiguration that + * the custom module detects. This explanation is returned with each finding + * instance to help investigators understand the detected issue. The text must + * be enclosed in quotation marks. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. An explanation of the recommended steps that security teams can + * take to resolve the detected issue. This explanation is returned with each + * finding generated by this module in the `nextSteps` property of the finding + * JSON. + * + * Generated from protobuf field string recommendation = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $recommendation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Expr $predicate + * Optional. The CEL expression to evaluate to produce findings. When the + * expression evaluates to true against a resource, a finding is generated. + * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec $custom_output + * Optional. Custom output properties. + * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector $resource_selector + * Optional. The Cloud Asset Inventory resource types that the custom module + * operates on. For information about resource types, see [Supported asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + * Each custom module can specify up to 5 resource types. + * @type int $severity + * Optional. The severity to assign to findings generated by the module. + * @type string $description + * Optional. Text that describes the vulnerability or misconfiguration that + * the custom module detects. This explanation is returned with each finding + * instance to help investigators understand the detected issue. The text must + * be enclosed in quotation marks. + * @type string $recommendation + * Optional. An explanation of the recommended steps that security teams can + * take to resolve the detected issue. This explanation is returned with each + * finding generated by this module in the `nextSteps` property of the finding + * JSON. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The CEL expression to evaluate to produce findings. When the + * expression evaluates to true against a resource, a finding is generated. + * + * Generated from protobuf field .google.type.Expr predicate = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Expr|null + */ + public function getPredicate() + { + return $this->predicate; + } + + public function hasPredicate() + { + return isset($this->predicate); + } + + public function clearPredicate() + { + unset($this->predicate); + } + + /** + * Optional. The CEL expression to evaluate to produce findings. When the + * expression evaluates to true against a resource, a finding is generated. + * + * Generated from protobuf field .google.type.Expr predicate = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Expr $var + * @return $this + */ + public function setPredicate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Expr::class); + $this->predicate = $var; + + return $this; + } + + /** + * Optional. Custom output properties. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec|null + */ + public function getCustomOutput() + { + return $this->custom_output; + } + + public function hasCustomOutput() + { + return isset($this->custom_output); + } + + public function clearCustomOutput() + { + unset($this->custom_output); + } + + /** + * Optional. Custom output properties. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec $var + * @return $this + */ + public function setCustomOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec::class); + $this->custom_output = $var; + + return $this; + } + + /** + * Optional. The Cloud Asset Inventory resource types that the custom module + * operates on. For information about resource types, see [Supported asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + * Each custom module can specify up to 5 resource types. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector|null + */ + public function getResourceSelector() + { + return $this->resource_selector; + } + + public function hasResourceSelector() + { + return isset($this->resource_selector); + } + + public function clearResourceSelector() + { + unset($this->resource_selector); + } + + /** + * Optional. The Cloud Asset Inventory resource types that the custom module + * operates on. For information about resource types, see [Supported asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + * Each custom module can specify up to 5 resource types. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector $var + * @return $this + */ + public function setResourceSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector::class); + $this->resource_selector = $var; + + return $this; + } + + /** + * Optional. The severity to assign to findings generated by the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Optional. The severity to assign to findings generated by the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Optional. Text that describes the vulnerability or misconfiguration that + * the custom module detects. This explanation is returned with each finding + * instance to help investigators understand the detected issue. The text must + * be enclosed in quotation marks. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Text that describes the vulnerability or misconfiguration that + * the custom module detects. This explanation is returned with each finding + * instance to help investigators understand the detected issue. The text must + * be enclosed in quotation marks. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. An explanation of the recommended steps that security teams can + * take to resolve the detected issue. This explanation is returned with each + * finding generated by this module in the `nextSteps` property of the finding + * JSON. + * + * Generated from protobuf field string recommendation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRecommendation() + { + return $this->recommendation; + } + + /** + * Optional. An explanation of the recommended steps that security teams can + * take to resolve the detected issue. This explanation is returned with each + * finding generated by this module in the `nextSteps` property of the finding + * JSON. + * + * Generated from protobuf field string recommendation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRecommendation($var) + { + GPBUtil::checkString($var, True); + $this->recommendation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php new file mode 100644 index 000000000000..089a7a7ac196 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php @@ -0,0 +1,73 @@ +google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + */ +class CustomOutputSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of custom output properties to add to the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property properties = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec\Property>|\Google\Protobuf\Internal\RepeatedField $properties + * Optional. A list of custom output properties to add to the finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of custom output properties to add to the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property properties = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Optional. A list of custom output properties to add to the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property properties = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec\Property>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec\Property::class); + $this->properties = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomOutputSpec::class, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig_CustomOutputSpec::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php new file mode 100644 index 000000000000..8d1f277eb048 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php @@ -0,0 +1,122 @@ +google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + */ +class Property extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the property for the custom output. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. The CEL expression for the custom output. A resource property + * can be specified to return the value of the property or a text string + * enclosed in quotation marks. + * + * Generated from protobuf field .google.type.Expr value_expression = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value_expression = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Name of the property for the custom output. + * @type \Google\Type\Expr $value_expression + * Optional. The CEL expression for the custom output. A resource property + * can be specified to return the value of the property or a text string + * enclosed in quotation marks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the property for the custom output. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the property for the custom output. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The CEL expression for the custom output. A resource property + * can be specified to return the value of the property or a text string + * enclosed in quotation marks. + * + * Generated from protobuf field .google.type.Expr value_expression = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Expr|null + */ + public function getValueExpression() + { + return $this->value_expression; + } + + public function hasValueExpression() + { + return isset($this->value_expression); + } + + public function clearValueExpression() + { + unset($this->value_expression); + } + + /** + * Optional. The CEL expression for the custom output. A resource property + * can be specified to return the value of the property or a text string + * enclosed in quotation marks. + * + * Generated from protobuf field .google.type.Expr value_expression = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Expr $var + * @return $this + */ + public function setValueExpression($var) + { + GPBUtil::checkMessage($var, \Google\Type\Expr::class); + $this->value_expression = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Property::class, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig_CustomOutputSpec_Property::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php new file mode 100644 index 000000000000..bcfbea5cd70a --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php @@ -0,0 +1,70 @@ +google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + */ +class ResourceSelector extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The resource types to run the detector on. + * + * Generated from protobuf field repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $resource_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_types + * Optional. The resource types to run the detector on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The resource types to run the detector on. + * + * Generated from protobuf field repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceTypes() + { + return $this->resource_types; + } + + /** + * Optional. The resource types to run the detector on. + * + * Generated from protobuf field repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_types = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceSelector::class, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig_ResourceSelector::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php new file mode 100644 index 000000000000..0b778edf55c5 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php @@ -0,0 +1,78 @@ +google.cloud.securitycentermanagement.v1.CustomConfig.Severity + */ +class Severity +{ + /** + * Unspecified severity. + * + * 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\SecurityCenterManagement\V1\CustomConfig_Severity::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php new file mode 100644 index 000000000000..4f08f7d5180f --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php @@ -0,0 +1,161 @@ +google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + */ +class DeleteEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $name Required. The resource name of the ETD custom module. + * + * Its format is: + * + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. Please see + * {@see SecurityCenterManagementClient::eventThreatDetectionCustomModuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\DeleteEventThreatDetectionCustomModuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * @type bool $validate_only + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * 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 resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * 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; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php new file mode 100644 index 000000000000..ccb2146822e6 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php @@ -0,0 +1,161 @@ +google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + */ +class DeleteSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the SHA custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $name Required. The resource name of the SHA custom module. + * + * Its format is: + * + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. Please see + * {@see SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\DeleteSecurityHealthAnalyticsCustomModuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the SHA custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * @type bool $validate_only + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the SHA custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * + * 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 resource name of the SHA custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * + * 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; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be deleted). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually delete the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php new file mode 100644 index 000000000000..659b3cd6a15e --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php @@ -0,0 +1,273 @@ +google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + */ +class EffectiveEventThreatDetectionCustomModule extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Config for the effective module. + * + * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $config = null; + /** + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enablement_state = 0; + /** + * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. The human readable name to be displayed for the module. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The description for the module. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * @type \Google\Protobuf\Struct $config + * Output only. Config for the effective module. + * @type int $enablement_state + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * @type string $type + * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * @type string $display_name + * Output only. The human readable name to be displayed for the module. + * @type string $description + * Output only. The description for the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Config for the effective module. + * + * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Struct|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Output only. Config for the effective module. + * + * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->config = $var; + + return $this; + } + + /** + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEnablementState() + { + return $this->enablement_state; + } + + /** + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule\EnablementState::class); + $this->enablement_state = $var; + + return $this; + } + + /** + * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. The human readable name to be displayed for the module. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The human readable name to be displayed for the module. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The description for the module. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. The description for the module. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php new file mode 100644 index 000000000000..dca4aa3f2033 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php @@ -0,0 +1,64 @@ +google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState + */ +class EnablementState +{ + /** + * Unspecified enablement state. + * + * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; + */ + const ENABLEMENT_STATE_UNSPECIFIED = 0; + /** + * The module is enabled at the given level. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The module is disabled at the given level. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule_EnablementState::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php new file mode 100644 index 000000000000..1345238cbc2f --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php @@ -0,0 +1,215 @@ +google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + */ +class EffectiveSecurityHealthAnalyticsCustomModule extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The user-specified configuration for the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_config = null; + /** + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enablement_state = 0; + /** + * Output only. The display name for the custom module. The name must be + * between 1 and 128 characters, start with a lowercase letter, and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $custom_config + * Output only. The user-specified configuration for the module. + * @type int $enablement_state + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * @type string $display_name + * Output only. The display name for the custom module. The name must be + * between 1 and 128 characters, start with a lowercase letter, and contain + * alphanumeric characters or underscores only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The user-specified configuration for the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig|null + */ + public function getCustomConfig() + { + return $this->custom_config; + } + + public function hasCustomConfig() + { + return isset($this->custom_config); + } + + public function clearCustomConfig() + { + unset($this->custom_config); + } + + /** + * Output only. The user-specified configuration for the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $var + * @return $this + */ + public function setCustomConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig::class); + $this->custom_config = $var; + + return $this; + } + + /** + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEnablementState() + { + return $this->enablement_state; + } + + /** + * Output only. The effective state of enablement for the module at the given + * level of the hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule\EnablementState::class); + $this->enablement_state = $var; + + return $this; + } + + /** + * Output only. The display name for the custom module. The name must be + * between 1 and 128 characters, start with a lowercase letter, and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name for the custom module. The name must be + * between 1 and 128 characters, start with a lowercase letter, and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php new file mode 100644 index 000000000000..5dcb86d363a4 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php @@ -0,0 +1,64 @@ +google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState + */ +class EnablementState +{ + /** + * Unspecified enablement state. + * + * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; + */ + const ENABLEMENT_STATE_UNSPECIFIED = 0; + /** + * The module is enabled at the given level. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The module is disabled at the given level. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule_EnablementState::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php new file mode 100644 index 000000000000..c6dc2492db74 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php @@ -0,0 +1,401 @@ +google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + */ +class EventThreatDetectionCustomModule extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Config for the module. For the resident module, its config value + * is defined at this level. For the inherited module, its config value is + * inherited from the ancestor module. + * + * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $config = null; + /** + * Output only. The closest ancestor module that this module inherits the + * enablement state from. If empty, indicates that the custom module was + * created in the requesting parent organization, folder, or project. The + * format is the same as the EventThreatDetectionCustomModule resource name. + * + * Generated from protobuf field string ancestor_module = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $ancestor_module = ''; + /** + * Optional. The state of enablement for the module at the given level of the + * hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState enablement_state = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enablement_state = 0; + /** + * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * + * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = ''; + /** + * Optional. The human readable name to be displayed for the module. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. The description for the module. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The time the module was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The editor the module was last updated by. + * + * Generated from protobuf field string last_editor = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_editor = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * @type \Google\Protobuf\Struct $config + * Optional. Config for the module. For the resident module, its config value + * is defined at this level. For the inherited module, its config value is + * inherited from the ancestor module. + * @type string $ancestor_module + * Output only. The closest ancestor module that this module inherits the + * enablement state from. If empty, indicates that the custom module was + * created in the requesting parent organization, folder, or project. The + * format is the same as the EventThreatDetectionCustomModule resource name. + * @type int $enablement_state + * Optional. The state of enablement for the module at the given level of the + * hierarchy. + * @type string $type + * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * @type string $display_name + * Optional. The human readable name to be displayed for the module. + * @type string $description + * Optional. The description for the module. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the module was last updated. + * @type string $last_editor + * Output only. The editor the module was last updated by. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Config for the module. For the resident module, its config value + * is defined at this level. For the inherited module, its config value is + * inherited from the ancestor module. + * + * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Optional. Config for the module. For the resident module, its config value + * is defined at this level. For the inherited module, its config value is + * inherited from the ancestor module. + * + * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->config = $var; + + return $this; + } + + /** + * Output only. The closest ancestor module that this module inherits the + * enablement state from. If empty, indicates that the custom module was + * created in the requesting parent organization, folder, or project. The + * format is the same as the EventThreatDetectionCustomModule resource name. + * + * Generated from protobuf field string ancestor_module = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getAncestorModule() + { + return $this->ancestor_module; + } + + /** + * Output only. The closest ancestor module that this module inherits the + * enablement state from. If empty, indicates that the custom module was + * created in the requesting parent organization, folder, or project. The + * format is the same as the EventThreatDetectionCustomModule resource name. + * + * Generated from protobuf field string ancestor_module = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAncestorModule($var) + { + GPBUtil::checkString($var, True); + $this->ancestor_module = $var; + + return $this; + } + + /** + * Optional. The state of enablement for the module at the given level of the + * hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState enablement_state = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEnablementState() + { + return $this->enablement_state; + } + + /** + * Optional. The state of enablement for the module at the given level of the + * hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState enablement_state = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule\EnablementState::class); + $this->enablement_state = $var; + + return $this; + } + + /** + * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * + * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. + * + * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Optional. The human readable name to be displayed for the module. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The human readable name to be displayed for the module. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The description for the module. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description for the module. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The time the module was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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 time the module was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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. The editor the module was last updated by. + * + * Generated from protobuf field string last_editor = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastEditor() + { + return $this->last_editor; + } + + /** + * Output only. The editor the module was last updated by. + * + * Generated from protobuf field string last_editor = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastEditor($var) + { + GPBUtil::checkString($var, True); + $this->last_editor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php new file mode 100644 index 000000000000..3fd3c6e9c1dc --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php @@ -0,0 +1,75 @@ +google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState + */ +class EnablementState +{ + /** + * Unspecified enablement state. + * + * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; + */ + const ENABLEMENT_STATE_UNSPECIFIED = 0; + /** + * The module is enabled at the given level. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The module is disabled at the given level. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * State is inherited from an ancestor module. The module will either + * be effectively ENABLED or DISABLED based on its closest non-inherited + * ancestor module in the CRM hierarchy. Attempting to set a top level + * module (module with no parent) to the INHERITED state will result in an + * error. + * + * Generated from protobuf enum INHERITED = 3; + */ + const INHERITED = 3; + + private static $valueToName = [ + self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + self::INHERITED => 'INHERITED', + ]; + + 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule_EnablementState::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php new file mode 100644 index 000000000000..34bdee84cc97 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php @@ -0,0 +1,103 @@ +google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + */ +class GetEffectiveEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the ETD custom module. + * + * Its format is: + * + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. Please see + * {@see SecurityCenterManagementClient::effectiveEventThreatDetectionCustomModuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\GetEffectiveEventThreatDetectionCustomModuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * + * 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 resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php new file mode 100644 index 000000000000..e784437bc70f --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php @@ -0,0 +1,102 @@ +google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + */ +class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the custom module, specified in one of + * the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full resource name of the custom module, specified in one of + * the following formats: + * + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * Please see {@see SecurityCenterManagementClient::effectiveSecurityHealthAnalyticsCustomModuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the custom module, specified in one of + * the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the custom module, specified in one of + * the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * + * 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 full resource name of the custom module, specified in one of + * the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php new file mode 100644 index 000000000000..e280d8f676fa --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php @@ -0,0 +1,103 @@ +google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + */ +class GetEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the ETD custom module. + * + * Its format is: + * + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. Please see + * {@see SecurityCenterManagementClient::eventThreatDetectionCustomModuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\GetEventThreatDetectionCustomModuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * 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 resource name of the ETD custom module. + * Its format is: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php new file mode 100644 index 000000000000..d84834c46546 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php @@ -0,0 +1,135 @@ +google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + */ +class GetSecurityCenterServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Security Command Center service to retrieve. + * Formats: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Security Command Center service to retrieve. + * + * Formats: + * + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * + * The possible values for id {service} are: + * + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * Please see {@see SecurityCenterManagementClient::securityCenterServiceName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\GetSecurityCenterServiceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Security Command Center service to retrieve. + * Formats: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Security Command Center service to retrieve. + * Formats: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * + * 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 Security Command Center service to retrieve. + * Formats: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php new file mode 100644 index 000000000000..5069157c7578 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php @@ -0,0 +1,81 @@ +google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + */ +class GetSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\GetSecurityHealthAnalyticsCustomModuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php new file mode 100644 index 000000000000..6ea98488fc72 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php @@ -0,0 +1,178 @@ +google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + */ +class ListDescendantEventThreatDetectionCustomModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\ListDescendantEventThreatDetectionCustomModulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php new file mode 100644 index 000000000000..91e329e5f403 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php @@ -0,0 +1,102 @@ +google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + */ +class ListDescendantEventThreatDetectionCustomModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of EventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; + */ + private $event_threat_detection_custom_modules; + /** + * A token identifying a page of results the server should return. + * + * 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\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $event_threat_detection_custom_modules + * The list of EventThreatDetectionCustomModules + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of EventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventThreatDetectionCustomModules() + { + return $this->event_threat_detection_custom_modules; + } + + /** + * The list of EventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventThreatDetectionCustomModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); + $this->event_threat_detection_custom_modules = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php new file mode 100644 index 000000000000..4db8d6b92e86 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php @@ -0,0 +1,175 @@ +google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + */ +class ListDescendantSecurityHealthAnalyticsCustomModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of the parent organization, folder, or project in which to + * list custom modules, specified in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php new file mode 100644 index 000000000000..b28b46e3c747 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php @@ -0,0 +1,102 @@ +google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ +class ListDescendantSecurityHealthAnalyticsCustomModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of SecurityHealthAnalyticsCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; + */ + private $security_health_analytics_custom_modules; + /** + * A token identifying a page of results the server should return. + * + * 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\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $security_health_analytics_custom_modules + * The list of SecurityHealthAnalyticsCustomModules + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of SecurityHealthAnalyticsCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityHealthAnalyticsCustomModules() + { + return $this->security_health_analytics_custom_modules; + } + + /** + * The list of SecurityHealthAnalyticsCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityHealthAnalyticsCustomModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); + $this->security_health_analytics_custom_modules = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php new file mode 100644 index 000000000000..40094fd46acf --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php @@ -0,0 +1,174 @@ +google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + */ +class ListEffectiveEventThreatDetectionCustomModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The value returned by the last call indicating a continuation + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\ListEffectiveEventThreatDetectionCustomModulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @type string $page_token + * Optional. The value returned by the last call indicating a continuation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The value returned by the last call indicating a continuation + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The value returned by the last call indicating a continuation + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php new file mode 100644 index 000000000000..66317828ab95 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php @@ -0,0 +1,102 @@ +google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + */ +class ListEffectiveEventThreatDetectionCustomModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of EffectiveEventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule effective_event_threat_detection_custom_modules = 1; + */ + private $effective_event_threat_detection_custom_modules; + /** + * A token identifying a page of results the server should return. + * + * 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\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $effective_event_threat_detection_custom_modules + * The list of EffectiveEventThreatDetectionCustomModules + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of EffectiveEventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule effective_event_threat_detection_custom_modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectiveEventThreatDetectionCustomModules() + { + return $this->effective_event_threat_detection_custom_modules; + } + + /** + * The list of EffectiveEventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule effective_event_threat_detection_custom_modules = 1; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectiveEventThreatDetectionCustomModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule::class); + $this->effective_event_threat_detection_custom_modules = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php new file mode 100644 index 000000000000..4e8e3f4aceaf --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php @@ -0,0 +1,179 @@ +google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + */ +class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of parent to list effective custom modules. specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The value returned by the last call indicating a continuation. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of parent to list effective custom modules. specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * or + * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of parent to list effective custom modules. specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * or + * `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @type string $page_token + * Optional. The value returned by the last call indicating a continuation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of parent to list effective custom modules. specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of parent to list effective custom modules. specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The value returned by the last call indicating a continuation. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The value returned by the last call indicating a continuation. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php new file mode 100644 index 000000000000..7a21fad782a9 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php @@ -0,0 +1,102 @@ +google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ +class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of EffectiveSecurityHealthAnalyticsCustomModule + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule effective_security_health_analytics_custom_modules = 1; + */ + private $effective_security_health_analytics_custom_modules; + /** + * A token identifying a page of results the server should return. + * + * 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\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $effective_security_health_analytics_custom_modules + * The list of EffectiveSecurityHealthAnalyticsCustomModule + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of EffectiveSecurityHealthAnalyticsCustomModule + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule effective_security_health_analytics_custom_modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectiveSecurityHealthAnalyticsCustomModules() + { + return $this->effective_security_health_analytics_custom_modules; + } + + /** + * The list of EffectiveSecurityHealthAnalyticsCustomModule + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule effective_security_health_analytics_custom_modules = 1; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectiveSecurityHealthAnalyticsCustomModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule::class); + $this->effective_security_health_analytics_custom_modules = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php new file mode 100644 index 000000000000..16e359448211 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php @@ -0,0 +1,197 @@ +google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + */ +class ListEventThreatDetectionCustomModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\ListEventThreatDetectionCustomModulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/locations/{location}`, + * `folders/{folder}/locations/{location}`, + * or + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php new file mode 100644 index 000000000000..ee2dd6dd74e4 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php @@ -0,0 +1,101 @@ +google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + */ +class ListEventThreatDetectionCustomModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of EventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; + */ + private $event_threat_detection_custom_modules; + /** + * A token identifying a page of results the server should return. + * + * 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\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $event_threat_detection_custom_modules + * The list of EventThreatDetectionCustomModules + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of EventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventThreatDetectionCustomModules() + { + return $this->event_threat_detection_custom_modules; + } + + /** + * The list of EventThreatDetectionCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventThreatDetectionCustomModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); + $this->event_threat_detection_custom_modules = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php new file mode 100644 index 000000000000..c4a0cd81d3af --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php @@ -0,0 +1,175 @@ +google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + */ +class ListSecurityCenterServicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent to list Security Command Center services. + * Formats: + * * organizations/{organization}/locations/{location} + * * folders/{folder}/locations/{location} + * * projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The value returned by the last call indicating a continuation. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the parent to list Security Command Center services. + * + * Formats: + * + * * organizations/{organization}/locations/{location} + * * folders/{folder}/locations/{location} + * * projects/{project}/locations/{location} + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\ListSecurityCenterServicesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent to list Security Command Center services. + * Formats: + * * organizations/{organization}/locations/{location} + * * folders/{folder}/locations/{location} + * * projects/{project}/locations/{location} + * @type int $page_size + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @type string $page_token + * Optional. The value returned by the last call indicating a continuation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent to list Security Command Center services. + * Formats: + * * organizations/{organization}/locations/{location} + * * folders/{folder}/locations/{location} + * * projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the parent to list Security Command Center services. + * Formats: + * * organizations/{organization}/locations/{location} + * * folders/{folder}/locations/{location} + * * projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The value returned by the last call indicating a continuation. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The value returned by the last call indicating a continuation. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php new file mode 100644 index 000000000000..772555d39002 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php @@ -0,0 +1,101 @@ +google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + */ +class ListSecurityCenterServicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of services. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_services = 1; + */ + private $security_center_services; + /** + * A token identifying a page of results the server should return. + * + * 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\SecurityCenterManagement\V1\SecurityCenterService>|\Google\Protobuf\Internal\RepeatedField $security_center_services + * The list of services. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of services. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_services = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityCenterServices() + { + return $this->security_center_services; + } + + /** + * The list of services. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_services = 1; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityCenterServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService::class); + $this->security_center_services = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php new file mode 100644 index 000000000000..2e52af07903c --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php @@ -0,0 +1,174 @@ +google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + */ +class ListSecurityHealthAnalyticsCustomModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of parent organization, folder, or project in which to list + * custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of parent organization, folder, or project in which to list + * custom modules, specified in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\ListSecurityHealthAnalyticsCustomModulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of parent organization, folder, or project in which to list + * custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of parent organization, folder, or project in which to list + * custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of parent organization, folder, or project in which to list + * custom modules, specified in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php new file mode 100644 index 000000000000..4ed6c5ea9a78 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php @@ -0,0 +1,101 @@ +google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + */ +class ListSecurityHealthAnalyticsCustomModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of SecurityHealthAnalyticsCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; + */ + private $security_health_analytics_custom_modules; + /** + * A token identifying a page of results the server should return. + * + * 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\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $security_health_analytics_custom_modules + * The list of SecurityHealthAnalyticsCustomModules + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The list of SecurityHealthAnalyticsCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityHealthAnalyticsCustomModules() + { + return $this->security_health_analytics_custom_modules; + } + + /** + * The list of SecurityHealthAnalyticsCustomModules + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityHealthAnalyticsCustomModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); + $this->security_health_analytics_custom_modules = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php new file mode 100644 index 000000000000..6482912da57a --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php @@ -0,0 +1,345 @@ +google.cloud.securitycentermanagement.v1.SecurityCenterService + */ +class SecurityCenterService extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the service. + * Its format is: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The intended state of enablement for the service at its level of + * the resource hierarchy. A DISABLED state will override all module + * enablement_states to DISABLED. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intended_enablement_state = 0; + /** + * Output only. The effective enablement state for the service at its level of + * the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an ancestor. + * This state may differ from the intended enablement state due to billing + * eligibility or onboarding status. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_enablement_state = 0; + /** + * Optional. The configurations including the state of enablement for the + * service's different modules. The absence of a module in the map implies its + * configuration is inherited from its parents. + * + * Generated from protobuf field map modules = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $modules; + /** + * Output only. The time the service was last updated. This could be due to an + * explicit user update or due to a side effect of another system change such + * as billing subscription expiry. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Additional service specific configuration. Not all services will + * utilize this field. + * + * Generated from protobuf field .google.protobuf.Struct service_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the service. + * Its format is: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * @type int $intended_enablement_state + * Optional. The intended state of enablement for the service at its level of + * the resource hierarchy. A DISABLED state will override all module + * enablement_states to DISABLED. + * @type int $effective_enablement_state + * Output only. The effective enablement state for the service at its level of + * the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an ancestor. + * This state may differ from the intended enablement state due to billing + * eligibility or onboarding status. + * @type array|\Google\Protobuf\Internal\MapField $modules + * Optional. The configurations including the state of enablement for the + * service's different modules. The absence of a module in the map implies its + * configuration is inherited from its parents. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the service was last updated. This could be due to an + * explicit user update or due to a side effect of another system change such + * as billing subscription expiry. + * @type \Google\Protobuf\Struct $service_config + * Optional. Additional service specific configuration. Not all services will + * utilize this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the service. + * Its format is: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the service. + * Its format is: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The possible values for id {service} are: + * * container-threat-detection + * * event-threat-detection + * * security-health-analytics + * * vm-threat-detection + * * web-security-scanner + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The intended state of enablement for the service at its level of + * the resource hierarchy. A DISABLED state will override all module + * enablement_states to DISABLED. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIntendedEnablementState() + { + return $this->intended_enablement_state; + } + + /** + * Optional. The intended state of enablement for the service at its level of + * the resource hierarchy. A DISABLED state will override all module + * enablement_states to DISABLED. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIntendedEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); + $this->intended_enablement_state = $var; + + return $this; + } + + /** + * Output only. The effective enablement state for the service at its level of + * the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an ancestor. + * This state may differ from the intended enablement state due to billing + * eligibility or onboarding status. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEffectiveEnablementState() + { + return $this->effective_enablement_state; + } + + /** + * Output only. The effective enablement state for the service at its level of + * the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an ancestor. + * This state may differ from the intended enablement state due to billing + * eligibility or onboarding status. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEffectiveEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); + $this->effective_enablement_state = $var; + + return $this; + } + + /** + * Optional. The configurations including the state of enablement for the + * service's different modules. The absence of a module in the map implies its + * configuration is inherited from its parents. + * + * Generated from protobuf field map modules = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getModules() + { + return $this->modules; + } + + /** + * Optional. The configurations including the state of enablement for the + * service's different modules. The absence of a module in the map implies its + * configuration is inherited from its parents. + * + * Generated from protobuf field map modules = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setModules($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\ModuleSettings::class); + $this->modules = $arr; + + return $this; + } + + /** + * Output only. The time the service was last updated. This could be due to an + * explicit user update or due to a side effect of another system change such + * as billing subscription expiry. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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 time the service was last updated. This could be due to an + * explicit user update or due to a side effect of another system change such + * as billing subscription expiry. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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; + } + + /** + * Optional. Additional service specific configuration. Not all services will + * utilize this field. + * + * Generated from protobuf field .google.protobuf.Struct service_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getServiceConfig() + { + return $this->service_config; + } + + public function hasServiceConfig() + { + return isset($this->service_config); + } + + public function clearServiceConfig() + { + unset($this->service_config); + } + + /** + * Optional. Additional service specific configuration. Not all services will + * utilize this field. + * + * Generated from protobuf field .google.protobuf.Struct service_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setServiceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->service_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php new file mode 100644 index 000000000000..fcc179827fd4 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php @@ -0,0 +1,73 @@ +google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState + */ +class EnablementState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; + */ + const ENABLEMENT_STATE_UNSPECIFIED = 0; + /** + * State is inherited from the parent resource. Not a valid effective + * enablement state. + * + * Generated from protobuf enum INHERITED = 1; + */ + const INHERITED = 1; + /** + * State is enabled. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * State is disabled. + * + * Generated from protobuf enum DISABLED = 3; + */ + const DISABLED = 3; + + private static $valueToName = [ + self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', + self::INHERITED => 'INHERITED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService_EnablementState::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php new file mode 100644 index 000000000000..5a4691b1b19b --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php @@ -0,0 +1,128 @@ +google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + */ +class ModuleSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The intended state of enablement for the module at its level of + * the resource hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intended_enablement_state = 0; + /** + * Output only. The effective enablement state for the module at its level + * of the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an + * ancestor. This state may + * differ from the intended enablement state due to billing eligibility or + * onboarding status. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_enablement_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $intended_enablement_state + * Optional. The intended state of enablement for the module at its level of + * the resource hierarchy. + * @type int $effective_enablement_state + * Output only. The effective enablement state for the module at its level + * of the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an + * ancestor. This state may + * differ from the intended enablement state due to billing eligibility or + * onboarding status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The intended state of enablement for the module at its level of + * the resource hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIntendedEnablementState() + { + return $this->intended_enablement_state; + } + + /** + * Optional. The intended state of enablement for the module at its level of + * the resource hierarchy. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIntendedEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); + $this->intended_enablement_state = $var; + + return $this; + } + + /** + * Output only. The effective enablement state for the module at its level + * of the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an + * ancestor. This state may + * differ from the intended enablement state due to billing eligibility or + * onboarding status. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEffectiveEnablementState() + { + return $this->effective_enablement_state; + } + + /** + * Output only. The effective enablement state for the module at its level + * of the resource hierarchy. If the intended state is set to INHERITED, the + * effective state will be inherited from the enablement state of an + * ancestor. This state may + * differ from the intended enablement state due to billing eligibility or + * onboarding status. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEffectiveEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); + $this->effective_enablement_state = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ModuleSettings::class, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService_ModuleSettings::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php new file mode 100644 index 000000000000..db568064f325 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php @@ -0,0 +1,339 @@ +google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + */ +class SecurityHealthAnalyticsCustomModule extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The display name of the Security Health Analytics custom module. + * This display name becomes the finding category for all findings that are + * returned by this custom module. The display name must be between 1 and + * 128 characters, start with a lowercase letter, and contain alphanumeric + * characters or underscores only. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. The enablement state of the custom module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enablement_state = 0; + /** + * Output only. The time at which the custom module was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The editor that last updated the custom module. + * + * Generated from protobuf field string last_editor = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_editor = ''; + /** + * Output only. Specifies the organization or folder from which the custom + * module is inherited. If empty, indicates that the custom module was created + * in the organization, folder, or project in which you are viewing the custom + * module. + * + * Generated from protobuf field string ancestor_module = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $ancestor_module = ''; + /** + * Optional. The user specified custom configuration for the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * @type string $display_name + * Optional. The display name of the Security Health Analytics custom module. + * This display name becomes the finding category for all findings that are + * returned by this custom module. The display name must be between 1 and + * 128 characters, start with a lowercase letter, and contain alphanumeric + * characters or underscores only. + * @type int $enablement_state + * Optional. The enablement state of the custom module. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the custom module was last updated. + * @type string $last_editor + * Output only. The editor that last updated the custom module. + * @type string $ancestor_module + * Output only. Specifies the organization or folder from which the custom + * module is inherited. If empty, indicates that the custom module was created + * in the organization, folder, or project in which you are viewing the custom + * module. + * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $custom_config + * Optional. The user specified custom configuration for the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The full resource name of the custom module, specified in one + * of the following formats: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The display name of the Security Health Analytics custom module. + * This display name becomes the finding category for all findings that are + * returned by this custom module. The display name must be between 1 and + * 128 characters, start with a lowercase letter, and contain alphanumeric + * characters or underscores only. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The display name of the Security Health Analytics custom module. + * This display name becomes the finding category for all findings that are + * returned by this custom module. The display name must be between 1 and + * 128 characters, start with a lowercase letter, and contain alphanumeric + * characters or underscores only. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The enablement state of the custom module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEnablementState() + { + return $this->enablement_state; + } + + /** + * Optional. The enablement state of the custom module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEnablementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule\EnablementState::class); + $this->enablement_state = $var; + + return $this; + } + + /** + * Output only. The time at which the custom module was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.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 time at which the custom module was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.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. The editor that last updated the custom module. + * + * Generated from protobuf field string last_editor = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastEditor() + { + return $this->last_editor; + } + + /** + * Output only. The editor that last updated the custom module. + * + * Generated from protobuf field string last_editor = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastEditor($var) + { + GPBUtil::checkString($var, True); + $this->last_editor = $var; + + return $this; + } + + /** + * Output only. Specifies the organization or folder from which the custom + * module is inherited. If empty, indicates that the custom module was created + * in the organization, folder, or project in which you are viewing the custom + * module. + * + * Generated from protobuf field string ancestor_module = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getAncestorModule() + { + return $this->ancestor_module; + } + + /** + * Output only. Specifies the organization or folder from which the custom + * module is inherited. If empty, indicates that the custom module was created + * in the organization, folder, or project in which you are viewing the custom + * module. + * + * Generated from protobuf field string ancestor_module = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAncestorModule($var) + { + GPBUtil::checkString($var, True); + $this->ancestor_module = $var; + + return $this; + } + + /** + * Optional. The user specified custom configuration for the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig|null + */ + public function getCustomConfig() + { + return $this->custom_config; + } + + public function hasCustomConfig() + { + return isset($this->custom_config); + } + + public function clearCustomConfig() + { + unset($this->custom_config); + } + + /** + * Optional. The user specified custom configuration for the module. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $var + * @return $this + */ + public function setCustomConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig::class); + $this->custom_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php new file mode 100644 index 000000000000..d769e1d16088 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php @@ -0,0 +1,75 @@ +google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState + */ +class EnablementState +{ + /** + * Unspecified enablement state. + * + * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; + */ + const ENABLEMENT_STATE_UNSPECIFIED = 0; + /** + * The module is enabled at the given CRM resource. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The module is disabled at the given CRM resource. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * State is inherited from an ancestor module. The module will either + * be effectively ENABLED or DISABLED based on its closest non-inherited + * ancestor module in the CRM hierarchy. Attempting to set a top level + * module (module with no parent) to the INHERITED state will result in an + * INVALID_ARGUMENT error. + * + * Generated from protobuf enum INHERITED = 3; + */ + const INHERITED = 3; + + private static $valueToName = [ + self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + self::INHERITED => 'INHERITED', + ]; + + 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule_EnablementState::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php new file mode 100644 index 000000000000..b7c4bdddc09b --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php @@ -0,0 +1,193 @@ +google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + */ +class SimulateSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The relative resource name of the organization, project, or + * folder. For more information about relative resource names, see [Relative + * Resource + * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * Example: `organizations/{organization_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The custom configuration that you need to test. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $custom_config = null; + /** + * Required. Resource data to simulate custom module against. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + + /** + * @param string $parent Required. The relative resource name of the organization, project, or + * folder. For more information about relative resource names, see [Relative + * Resource + * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * Example: `organizations/{organization_id}`. + * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $customConfig Required. The custom configuration that you need to test. + * @param \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $resource Required. Resource data to simulate custom module against. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $customConfig, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $resource): self + { + return (new self()) + ->setParent($parent) + ->setCustomConfig($customConfig) + ->setResource($resource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The relative resource name of the organization, project, or + * folder. For more information about relative resource names, see [Relative + * Resource + * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * Example: `organizations/{organization_id}`. + * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $custom_config + * Required. The custom configuration that you need to test. + * @type \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $resource + * Required. Resource data to simulate custom module against. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The relative resource name of the organization, project, or + * folder. For more information about relative resource names, see [Relative + * Resource + * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * Example: `organizations/{organization_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The relative resource name of the organization, project, or + * folder. For more information about relative resource names, see [Relative + * Resource + * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * Example: `organizations/{organization_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The custom configuration that you need to test. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig|null + */ + public function getCustomConfig() + { + return $this->custom_config; + } + + public function hasCustomConfig() + { + return isset($this->custom_config); + } + + public function clearCustomConfig() + { + unset($this->custom_config); + } + + /** + * Required. The custom configuration that you need to test. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $var + * @return $this + */ + public function setCustomConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig::class); + $this->custom_config = $var; + + return $this; + } + + /** + * Required. Resource data to simulate custom module against. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Required. Resource data to simulate custom module against. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource::class); + $this->resource = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php new file mode 100644 index 000000000000..74086409b0e8 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php @@ -0,0 +1,168 @@ +google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + */ +class SimulatedResource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the resource, for example, + * `compute.googleapis.com/Disk`. + * + * Generated from protobuf field string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_type = ''; + /** + * Optional. A representation of the Google Cloud resource. Should match the + * Google Cloud resource JSON format. + * + * Generated from protobuf field .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_data = null; + /** + * Optional. A representation of the IAM policy. + * + * Generated from protobuf field .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $iam_policy_data = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_type + * Required. The type of the resource, for example, + * `compute.googleapis.com/Disk`. + * @type \Google\Protobuf\Struct $resource_data + * Optional. A representation of the Google Cloud resource. Should match the + * Google Cloud resource JSON format. + * @type \Google\Cloud\Iam\V1\Policy $iam_policy_data + * Optional. A representation of the IAM policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the resource, for example, + * `compute.googleapis.com/Disk`. + * + * Generated from protobuf field string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Required. The type of the resource, for example, + * `compute.googleapis.com/Disk`. + * + * Generated from protobuf field string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + + /** + * Optional. A representation of the Google Cloud resource. Should match the + * Google Cloud resource JSON format. + * + * Generated from protobuf field .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getResourceData() + { + return $this->resource_data; + } + + public function hasResourceData() + { + return isset($this->resource_data); + } + + public function clearResourceData() + { + unset($this->resource_data); + } + + /** + * Optional. A representation of the Google Cloud resource. Should match the + * Google Cloud resource JSON format. + * + * Generated from protobuf field .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setResourceData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->resource_data = $var; + + return $this; + } + + /** + * Optional. A representation of the IAM policy. + * + * Generated from protobuf field .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Iam\V1\Policy|null + */ + public function getIamPolicyData() + { + return $this->iam_policy_data; + } + + public function hasIamPolicyData() + { + return isset($this->iam_policy_data); + } + + public function clearIamPolicyData() + { + unset($this->iam_policy_data); + } + + /** + * Optional. A representation of the IAM policy. + * + * Generated from protobuf field .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Iam\V1\Policy $var + * @return $this + */ + public function setIamPolicyData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\Policy::class); + $this->iam_policy_data = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SimulatedResource::class, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php new file mode 100644 index 000000000000..4e49642f855f --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php @@ -0,0 +1,78 @@ +google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + */ +class SimulateSecurityHealthAnalyticsCustomModuleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Result for test case in the corresponding request. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult $result + * Result for test case in the corresponding request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Result for test case in the corresponding request. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * @return \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Result for test case in the corresponding request. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * @param \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php new file mode 100644 index 000000000000..c731ff8552f4 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php @@ -0,0 +1,147 @@ +google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + */ +class SimulatedResult extends \Google\Protobuf\Internal\Message +{ + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding $finding + * Finding that would be published for the test case, + * if a violation is detected. + * @type \Google\Protobuf\GPBEmpty $no_violation + * Indicates that the test case does not trigger any violation. + * @type \Google\Rpc\Status $error + * Error encountered during the test. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Finding that would be published for the test case, + * if a violation is detected. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding finding = 1; + * @return \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding|null + */ + public function getFinding() + { + return $this->readOneof(1); + } + + public function hasFinding() + { + return $this->hasOneof(1); + } + + /** + * Finding that would be published for the test case, + * if a violation is detected. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding finding = 1; + * @param \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Indicates that the test case does not trigger any violation. + * + * Generated from protobuf field .google.protobuf.Empty no_violation = 2; + * @return \Google\Protobuf\GPBEmpty|null + */ + public function getNoViolation() + { + return $this->readOneof(2); + } + + public function hasNoViolation() + { + return $this->hasOneof(2); + } + + /** + * Indicates that the test case does not trigger any violation. + * + * Generated from protobuf field .google.protobuf.Empty no_violation = 2; + * @param \Google\Protobuf\GPBEmpty $var + * @return $this + */ + public function setNoViolation($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\GPBEmpty::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Error encountered during the test. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->readOneof(3); + } + + public function hasError() + { + return $this->hasOneof(3); + } + + /** + * Error encountered during the test. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SimulatedResult::class, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php new file mode 100644 index 000000000000..4ca02b40dcf3 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php @@ -0,0 +1,454 @@ +google.cloud.securitycentermanagement.v1.SimulatedFinding + */ +class SimulatedFinding extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. 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) = IDENTIFIER]; + */ + 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 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 = 4; + */ + protected $category = ''; + /** + * Output only. The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * 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 = 6; + */ + private $source_properties; + /** + * 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 = 7; + */ + protected $event_time = null; + /** + * The severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8; + */ + protected $severity = 0; + /** + * The class of the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9; + */ + protected $finding_class = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. 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 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 string $category + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * @type int $state + * Output only. The state of the finding. + * @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\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 int $severity + * The severity of the finding. This field is managed by the source that + * writes the finding. + * @type int $finding_class + * The class of the finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. 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) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. 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) = IDENTIFIER]; + * @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 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 = 4; + * @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 = 4; + * @param string $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkString($var, True); + $this->category = $var; + + return $this; + } + + /** + * Output only. The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding\State::class); + $this->state = $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 = 6; + * @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 = 6; + * @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; + } + + /** + * 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 = 7; + * @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 = 7; + * @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 severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8; + * @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.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * The class of the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9; + * @return int + */ + public function getFindingClass() + { + return $this->finding_class; + } + + /** + * The class of the finding. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9; + * @param int $var + * @return $this + */ + public function setFindingClass($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding\FindingClass::class); + $this->finding_class = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php new file mode 100644 index 000000000000..95ab932a7bb3 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php @@ -0,0 +1,95 @@ +google.cloud.securitycentermanagement.v1.SimulatedFinding.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; + /** + * Describes a potential security risk due to a change in the security + * posture. + * + * Generated from protobuf enum POSTURE_VIOLATION = 6; + */ + const POSTURE_VIOLATION = 6; + + 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', + self::POSTURE_VIOLATION => 'POSTURE_VIOLATION', + ]; + + 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\SecurityCenterManagement\V1\SimulatedFinding_FindingClass::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php new file mode 100644 index 000000000000..16d260098f6c --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php @@ -0,0 +1,116 @@ +google.cloud.securitycentermanagement.v1.SimulatedFinding.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 and public SSH access with weak or no + * passwords. + * Threat: + * Indicates a threat that is able to access, modify, or delete data or + * execute unauthorized code within existing resources. + * + * 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\SecurityCenterManagement\V1\SimulatedFinding_Severity::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php new file mode 100644 index 000000000000..4bc4eb004882 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php @@ -0,0 +1,65 @@ +google.cloud.securitycentermanagement.v1.SimulatedFinding.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\SecurityCenterManagement\V1\SimulatedFinding_State::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php new file mode 100644 index 000000000000..85584147f21c --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php @@ -0,0 +1,214 @@ +google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + */ +class UpdateEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * EventThreatDetectionCustomModule resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The module being updated + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_threat_detection_custom_module = null; + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule Required. The module being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * EventThreatDetectionCustomModule resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\UpdateEventThreatDetectionCustomModuleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * EventThreatDetectionCustomModule resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $event_threat_detection_custom_module + * Required. The module being updated + * @type bool $validate_only + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * EventThreatDetectionCustomModule resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * EventThreatDetectionCustomModule resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The module being updated + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule|null + */ + public function getEventThreatDetectionCustomModule() + { + return $this->event_threat_detection_custom_module; + } + + public function hasEventThreatDetectionCustomModule() + { + return isset($this->event_threat_detection_custom_module); + } + + public function clearEventThreatDetectionCustomModule() + { + unset($this->event_threat_detection_custom_module); + } + + /** + * Required. The module being updated + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $var + * @return $this + */ + public function setEventThreatDetectionCustomModule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); + $this->event_threat_detection_custom_module = $var; + + return $this; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php new file mode 100644 index 000000000000..9f8693b99a17 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php @@ -0,0 +1,205 @@ +google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + */ +class UpdateSecurityCenterServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated service. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_service = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_center_service = null; + /** + * Required. The list of fields to be updated. Possible values: + * * "intended_enablement_state" + * * "modules" + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. When set to true, only validations (including IAM checks) will be + * done for the request (service will not be updated). An OK response + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $securityCenterService Required. The updated service. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to be updated. Possible values: + * + * * "intended_enablement_state" + * * "modules" + * + * @return \Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityCenterServiceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $securityCenterService, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSecurityCenterService($securityCenterService) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $security_center_service + * Required. The updated service. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to be updated. Possible values: + * * "intended_enablement_state" + * * "modules" + * @type bool $validate_only + * Optional. When set to true, only validations (including IAM checks) will be + * done for the request (service will not be updated). An OK response + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated service. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService|null + */ + public function getSecurityCenterService() + { + return $this->security_center_service; + } + + public function hasSecurityCenterService() + { + return isset($this->security_center_service); + } + + public function clearSecurityCenterService() + { + unset($this->security_center_service); + } + + /** + * Required. The updated service. + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $var + * @return $this + */ + public function setSecurityCenterService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService::class); + $this->security_center_service = $var; + + return $this; + } + + /** + * Required. The list of fields to be updated. Possible values: + * * "intended_enablement_state" + * * "modules" + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The list of fields to be updated. Possible values: + * * "intended_enablement_state" + * * "modules" + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will be + * done for the request (service will not be updated). An OK response + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will be + * done for the request (service will not be updated). An OK response + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php new file mode 100644 index 000000000000..9fb49e8da926 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php @@ -0,0 +1,209 @@ +google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + */ +class UpdateSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of fields to be updated. The only fields that can be + * updated are `enablement_state` and `custom_config`. If empty or set to the + * wildcard value `*`, both `enablement_state` and `custom_config` are + * updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_health_analytics_custom_module = null; + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to be updated. The only fields that can be + * updated are `enablement_state` and `custom_config`. If empty or set to the + * wildcard value `*`, both `enablement_state` and `custom_config` are + * updated. + * + * @return \Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityHealthAnalyticsCustomModuleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to be updated. The only fields that can be + * updated are `enablement_state` and `custom_config`. If empty or set to the + * wildcard value `*`, both `enablement_state` and `custom_config` are + * updated. + * @type \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $security_health_analytics_custom_module + * Required. The resource being updated + * @type bool $validate_only + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of fields to be updated. The only fields that can be + * updated are `enablement_state` and `custom_config`. If empty or set to the + * wildcard value `*`, both `enablement_state` and `custom_config` are + * updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The list of fields to be updated. The only fields that can be + * updated are `enablement_state` and `custom_config`. If empty or set to the + * wildcard value `*`, both `enablement_state` and `custom_config` are + * updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule|null + */ + public function getSecurityHealthAnalyticsCustomModule() + { + return $this->security_health_analytics_custom_module; + } + + public function hasSecurityHealthAnalyticsCustomModule() + { + return isset($this->security_health_analytics_custom_module); + } + + public function clearSecurityHealthAnalyticsCustomModule() + { + unset($this->security_health_analytics_custom_module); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $var + * @return $this + */ + public function setSecurityHealthAnalyticsCustomModule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); + $this->security_health_analytics_custom_module = $var; + + return $this; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. When set to true, only validations (including IAM checks) will + * done for the request (module will not be updated). An OK response indicates + * the request is valid while an error response indicates the request is + * invalid. Note that a subsequent request to actually update the module could + * still fail because 1. the state could have changed (e.g. IAM permission + * lost) or + * 2. A failure occurred while trying to update the module. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php new file mode 100644 index 000000000000..40ac0673ade5 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php @@ -0,0 +1,147 @@ +google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + */ +class ValidateEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent to validate the Custom Module under. + * Its format is: + * * `organizations/{organization}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The raw text of the module's contents. Used to generate error + * messages. + * + * Generated from protobuf field string raw_text = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $raw_text = ''; + /** + * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + * + * Generated from protobuf field string type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent to validate the Custom Module under. + * Its format is: + * * `organizations/{organization}/locations/{location}`. + * @type string $raw_text + * Required. The raw text of the module's contents. Used to generate error + * messages. + * @type string $type + * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent to validate the Custom Module under. + * Its format is: + * * `organizations/{organization}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the parent to validate the Custom Module under. + * Its format is: + * * `organizations/{organization}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The raw text of the module's contents. Used to generate error + * messages. + * + * Generated from protobuf field string raw_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRawText() + { + return $this->raw_text; + } + + /** + * Required. The raw text of the module's contents. Used to generate error + * messages. + * + * Generated from protobuf field string raw_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRawText($var) + { + GPBUtil::checkString($var, True); + $this->raw_text = $var; + + return $this; + } + + /** + * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + * + * Generated from protobuf field string type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + * + * Generated from protobuf field string type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php new file mode 100644 index 000000000000..d5707cbe2e7c --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php @@ -0,0 +1,71 @@ +google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + */ +class ValidateEventThreatDetectionCustomModuleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of errors returned by the validator. If the list is empty, there + * were no errors. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError errors = 2; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\CustomModuleValidationError>|\Google\Protobuf\Internal\RepeatedField $errors + * A list of errors returned by the validator. If the list is empty, there + * were no errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * A list of errors returned by the validator. If the list is empty, there + * were no errors. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * A list of errors returned by the validator. If the list is empty, there + * were no errors. + * + * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError errors = 2; + * @param array<\Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\CustomModuleValidationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\CustomModuleValidationError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php new file mode 100644 index 000000000000..661bc6edd5d9 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php @@ -0,0 +1,213 @@ +google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + */ +class CustomModuleValidationError extends \Google\Protobuf\Internal\Message +{ + /** + * A description of the error, suitable for human consumption. Required. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * The path, in RFC 8901 JSON Pointer format, to the field that failed + * validation. This may be left empty if no specific field is affected. + * + * Generated from protobuf field string field_path = 2; + */ + protected $field_path = ''; + /** + * The initial position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed. + * + * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position start = 3; + */ + protected $start = null; + /** + * The end position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed.. + * + * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position end = 4; + */ + protected $end = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * A description of the error, suitable for human consumption. Required. + * @type string $field_path + * The path, in RFC 8901 JSON Pointer format, to the field that failed + * validation. This may be left empty if no specific field is affected. + * @type \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $start + * The initial position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed. + * @type \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $end + * The end position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed.. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * A description of the error, suitable for human consumption. Required. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the error, suitable for human consumption. Required. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The path, in RFC 8901 JSON Pointer format, to the field that failed + * validation. This may be left empty if no specific field is affected. + * + * Generated from protobuf field string field_path = 2; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * The path, in RFC 8901 JSON Pointer format, to the field that failed + * validation. This may be left empty if no specific field is affected. + * + * Generated from protobuf field string field_path = 2; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * The initial position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed. + * + * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position start = 3; + * @return \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position|null + */ + public function getStart() + { + return $this->start; + } + + public function hasStart() + { + return isset($this->start); + } + + public function clearStart() + { + unset($this->start); + } + + /** + * The initial position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed. + * + * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position start = 3; + * @param \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position::class); + $this->start = $var; + + return $this; + } + + /** + * The end position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed.. + * + * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position end = 4; + * @return \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position|null + */ + public function getEnd() + { + return $this->end; + } + + public function hasEnd() + { + return isset($this->end); + } + + public function clearEnd() + { + unset($this->end); + } + + /** + * The end position of the error in the uploaded text version of the + * module. This field may be omitted if no specific position applies, or if + * one could not be computed.. + * + * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position end = 4; + * @param \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position::class); + $this->end = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomModuleValidationError::class, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationError::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php new file mode 100644 index 000000000000..4382229dee30 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php @@ -0,0 +1,104 @@ +google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + */ +class Position extends \Google\Protobuf\Internal\Message +{ + /** + * The line position in the text + * + * Generated from protobuf field int32 line_number = 1; + */ + protected $line_number = 0; + /** + * The column position in the line + * + * Generated from protobuf field int32 column_number = 2; + */ + protected $column_number = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $line_number + * The line position in the text + * @type int $column_number + * The column position in the line + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); + parent::__construct($data); + } + + /** + * The line position in the text + * + * Generated from protobuf field int32 line_number = 1; + * @return int + */ + public function getLineNumber() + { + return $this->line_number; + } + + /** + * The line position in the text + * + * Generated from protobuf field int32 line_number = 1; + * @param int $var + * @return $this + */ + public function setLineNumber($var) + { + GPBUtil::checkInt32($var); + $this->line_number = $var; + + return $this; + } + + /** + * The column position in the line + * + * Generated from protobuf field int32 column_number = 2; + * @return int + */ + public function getColumnNumber() + { + return $this->column_number; + } + + /** + * The column position in the line + * + * Generated from protobuf field int32 column_number = 2; + * @param int $var + * @return $this + */ + public function setColumnNumber($var) + { + GPBUtil::checkInt32($var); + $this->column_number = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Position::class, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse_Position::class); + diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php new file mode 100644 index 000000000000..0d733d61eacb --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + + // Call the API and handle any network failures. + try { + /** @var EventThreatDetectionCustomModule $response */ + $response = $securityCenterManagementClient->createEventThreatDetectionCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + create_event_threat_detection_custom_module_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php new file mode 100644 index 000000000000..7fea0ed62fdb --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php @@ -0,0 +1,84 @@ +setParent($formattedParent) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); + + // Call the API and handle any network failures. + try { + /** @var SecurityHealthAnalyticsCustomModule $response */ + $response = $securityCenterManagementClient->createSecurityHealthAnalyticsCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + create_security_health_analytics_custom_module_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php new file mode 100644 index 000000000000..d250735b71ec --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $securityCenterManagementClient->deleteEventThreatDetectionCustomModule($request); + 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 = SecurityCenterManagementClient::eventThreatDetectionCustomModuleName( + '[ORGANIZATION]', + '[LOCATION]', + '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]' + ); + + delete_event_threat_detection_custom_module_sample($formattedName); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php new file mode 100644 index 000000000000..2b585f52f524 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $securityCenterManagementClient->deleteSecurityHealthAnalyticsCustomModule($request); + 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 = SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]' + ); + + delete_security_health_analytics_custom_module_sample($formattedName); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php new file mode 100644 index 000000000000..aa70954b0302 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EffectiveEventThreatDetectionCustomModule $response */ + $response = $securityCenterManagementClient->getEffectiveEventThreatDetectionCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecurityCenterManagementClient::effectiveEventThreatDetectionCustomModuleName( + '[ORGANIZATION]', + '[LOCATION]', + '[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]' + ); + + get_effective_event_threat_detection_custom_module_sample($formattedName); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php new file mode 100644 index 000000000000..a69b33c3d5e4 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EffectiveSecurityHealthAnalyticsCustomModule $response */ + $response = $securityCenterManagementClient->getEffectiveSecurityHealthAnalyticsCustomModule( + $request + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecurityCenterManagementClient::effectiveSecurityHealthAnalyticsCustomModuleName( + '[ORGANIZATION]', + '[LOCATION]', + '[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]' + ); + + get_effective_security_health_analytics_custom_module_sample($formattedName); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php new file mode 100644 index 000000000000..0bea004f72af --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EventThreatDetectionCustomModule $response */ + $response = $securityCenterManagementClient->getEventThreatDetectionCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecurityCenterManagementClient::eventThreatDetectionCustomModuleName( + '[ORGANIZATION]', + '[LOCATION]', + '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]' + ); + + get_event_threat_detection_custom_module_sample($formattedName); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php new file mode 100644 index 000000000000..f1ac3f69886b --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetLocation_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php new file mode 100644 index 000000000000..a832f451e258 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SecurityCenterService $response */ + $response = $securityCenterManagementClient->getSecurityCenterService($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecurityCenterManagementClient::securityCenterServiceName( + '[PROJECT]', + '[LOCATION]', + '[SERVICE]' + ); + + get_security_center_service_sample($formattedName); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php new file mode 100644 index 000000000000..96b85ef9597f --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SecurityHealthAnalyticsCustomModule $response */ + $response = $securityCenterManagementClient->getSecurityHealthAnalyticsCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]' + ); + + get_security_health_analytics_custom_module_sample($formattedName); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php new file mode 100644 index 000000000000..74c1ee95f54f --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php @@ -0,0 +1,87 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securityCenterManagementClient->listDescendantEventThreatDetectionCustomModules( + $request + ); + + /** @var EventThreatDetectionCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_descendant_event_threat_detection_custom_modules_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php new file mode 100644 index 000000000000..4a84159d249f --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php @@ -0,0 +1,88 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securityCenterManagementClient->listDescendantSecurityHealthAnalyticsCustomModules( + $request + ); + + /** @var SecurityHealthAnalyticsCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_descendant_security_health_analytics_custom_modules_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php new file mode 100644 index 000000000000..58d1b0020844 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php @@ -0,0 +1,88 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securityCenterManagementClient->listEffectiveEventThreatDetectionCustomModules( + $request + ); + + /** @var EffectiveEventThreatDetectionCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_effective_event_threat_detection_custom_modules_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php new file mode 100644 index 000000000000..7bff44b85886 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php @@ -0,0 +1,90 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securityCenterManagementClient->listEffectiveSecurityHealthAnalyticsCustomModules( + $request + ); + + /** @var EffectiveSecurityHealthAnalyticsCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_effective_security_health_analytics_custom_modules_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php new file mode 100644 index 000000000000..7c979942ba80 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securityCenterManagementClient->listEventThreatDetectionCustomModules($request); + + /** @var EventThreatDetectionCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_event_threat_detection_custom_modules_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php new file mode 100644 index 000000000000..53fa3fb57571 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListLocations_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php new file mode 100644 index 000000000000..ead3764fc0b0 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php @@ -0,0 +1,86 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securityCenterManagementClient->listSecurityCenterServices($request); + + /** @var SecurityCenterService $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 = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_security_center_services_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php new file mode 100644 index 000000000000..d05177c641eb --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php @@ -0,0 +1,86 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securityCenterManagementClient->listSecurityHealthAnalyticsCustomModules($request); + + /** @var SecurityHealthAnalyticsCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_security_health_analytics_custom_modules_sample($formattedParent); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php new file mode 100644 index 000000000000..529415da4454 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php @@ -0,0 +1,86 @@ +setResourceType($resourceResourceType); + $request = (new SimulateSecurityHealthAnalyticsCustomModuleRequest()) + ->setParent($parent) + ->setCustomConfig($customConfig) + ->setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var SimulateSecurityHealthAnalyticsCustomModuleResponse $response */ + $response = $securityCenterManagementClient->simulateSecurityHealthAnalyticsCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $resourceResourceType = '[RESOURCE_TYPE]'; + + simulate_security_health_analytics_custom_module_sample($parent, $resourceResourceType); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php new file mode 100644 index 000000000000..926ff6d29f65 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php @@ -0,0 +1,67 @@ +setUpdateMask($updateMask) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + + // Call the API and handle any network failures. + try { + /** @var EventThreatDetectionCustomModule $response */ + $response = $securityCenterManagementClient->updateEventThreatDetectionCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php new file mode 100644 index 000000000000..004b435f70f8 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php @@ -0,0 +1,62 @@ +setSecurityCenterService($securityCenterService) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var SecurityCenterService $response */ + $response = $securityCenterManagementClient->updateSecurityCenterService($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php new file mode 100644 index 000000000000..9d0d06d19ae6 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php @@ -0,0 +1,66 @@ +setUpdateMask($updateMask) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); + + // Call the API and handle any network failures. + try { + /** @var SecurityHealthAnalyticsCustomModule $response */ + $response = $securityCenterManagementClient->updateSecurityHealthAnalyticsCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php new file mode 100644 index 000000000000..4c6b49a167c1 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setRawText($rawText) + ->setType($type); + + // Call the API and handle any network failures. + try { + /** @var ValidateEventThreatDetectionCustomModuleResponse $response */ + $response = $securityCenterManagementClient->validateEventThreatDetectionCustomModule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecurityCenterManagementClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + $rawText = '[RAW_TEXT]'; + $type = '[TYPE]'; + + validate_event_threat_detection_custom_module_sample($formattedParent, $rawText, $type); +} +// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php new file mode 100644 index 000000000000..2c5eb44c1283 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php @@ -0,0 +1,1371 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/security_center_management_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/security_center_management_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/security_center_management_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/security_center_management_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * effective_event_threat_detection_custom_module resource. + * + * @param string $organization + * @param string $location + * @param string $effectiveEventThreatDetectionCustomModule + * + * @return string The formatted effective_event_threat_detection_custom_module resource. + */ + public static function effectiveEventThreatDetectionCustomModuleName(string $organization, string $location, string $effectiveEventThreatDetectionCustomModule): string + { + return self::getPathTemplate('effectiveEventThreatDetectionCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * effective_security_health_analytics_custom_module resource. + * + * @param string $organization + * @param string $location + * @param string $effectiveSecurityHealthAnalyticsCustomModule + * + * @return string The formatted effective_security_health_analytics_custom_module resource. + */ + public static function effectiveSecurityHealthAnalyticsCustomModuleName(string $organization, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('effectiveSecurityHealthAnalyticsCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * event_threat_detection_custom_module resource. + * + * @param string $organization + * @param string $location + * @param string $eventThreatDetectionCustomModule + * + * @return string The formatted event_threat_detection_custom_module resource. + */ + public static function eventThreatDetectionCustomModuleName(string $organization, string $location, string $eventThreatDetectionCustomModule): string + { + return self::getPathTemplate('eventThreatDetectionCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted folder_location resource. + */ + public static function folderLocationName(string $folder, string $location): string + { + return self::getPathTemplate('folderLocation')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_effective_event_threat_detection_custom_module resource. + * + * @param string $folder + * @param string $location + * @param string $effectiveEventThreatDetectionCustomModule + * + * @return string The formatted folder_location_effective_event_threat_detection_custom_module resource. + */ + public static function folderLocationEffectiveEventThreatDetectionCustomModuleName(string $folder, string $location, string $effectiveEventThreatDetectionCustomModule): string + { + return self::getPathTemplate('folderLocationEffectiveEventThreatDetectionCustomModule')->render([ + 'folder' => $folder, + 'location' => $location, + 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_effective_security_health_analytics_custom_module resource. + * + * @param string $folder + * @param string $location + * @param string $effectiveSecurityHealthAnalyticsCustomModule + * + * @return string The formatted folder_location_effective_security_health_analytics_custom_module resource. + */ + public static function folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(string $folder, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('folderLocationEffectiveSecurityHealthAnalyticsCustomModule')->render([ + 'folder' => $folder, + 'location' => $location, + 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_event_threat_detection_custom_module resource. + * + * @param string $folder + * @param string $location + * @param string $eventThreatDetectionCustomModule + * + * @return string The formatted folder_location_event_threat_detection_custom_module resource. + */ + public static function folderLocationEventThreatDetectionCustomModuleName(string $folder, string $location, string $eventThreatDetectionCustomModule): string + { + return self::getPathTemplate('folderLocationEventThreatDetectionCustomModule')->render([ + 'folder' => $folder, + 'location' => $location, + 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_security_health_analytics_custom_module resource. + * + * @param string $folder + * @param string $location + * @param string $securityHealthAnalyticsCustomModule + * + * @return string The formatted folder_location_security_health_analytics_custom_module resource. + */ + public static function folderLocationSecurityHealthAnalyticsCustomModuleName(string $folder, string $location, string $securityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('folderLocationSecurityHealthAnalyticsCustomModule')->render([ + 'folder' => $folder, + 'location' => $location, + 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_service resource. + * + * @param string $folder + * @param string $location + * @param string $service + * + * @return string The formatted folder_location_service resource. + */ + public static function folderLocationServiceName(string $folder, string $location, string $service): string + { + return self::getPathTemplate('folderLocationService')->render([ + 'folder' => $folder, + 'location' => $location, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location resource. + * + * @param string $organization + * @param string $location + * + * @return string The formatted organization_location resource. + */ + public static function organizationLocationName(string $organization, string $location): string + { + return self::getPathTemplate('organizationLocation')->render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_effective_event_threat_detection_custom_module resource. + * + * @param string $organization + * @param string $location + * @param string $effectiveEventThreatDetectionCustomModule + * + * @return string The formatted organization_location_effective_event_threat_detection_custom_module resource. + */ + public static function organizationLocationEffectiveEventThreatDetectionCustomModuleName(string $organization, string $location, string $effectiveEventThreatDetectionCustomModule): string + { + return self::getPathTemplate('organizationLocationEffectiveEventThreatDetectionCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_effective_security_health_analytics_custom_module + * resource. + * + * @param string $organization + * @param string $location + * @param string $effectiveSecurityHealthAnalyticsCustomModule + * + * @return string The formatted organization_location_effective_security_health_analytics_custom_module resource. + */ + public static function organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(string $organization, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('organizationLocationEffectiveSecurityHealthAnalyticsCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_event_threat_detection_custom_module resource. + * + * @param string $organization + * @param string $location + * @param string $eventThreatDetectionCustomModule + * + * @return string The formatted organization_location_event_threat_detection_custom_module resource. + */ + public static function organizationLocationEventThreatDetectionCustomModuleName(string $organization, string $location, string $eventThreatDetectionCustomModule): string + { + return self::getPathTemplate('organizationLocationEventThreatDetectionCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_security_health_analytics_custom_module resource. + * + * @param string $organization + * @param string $location + * @param string $securityHealthAnalyticsCustomModule + * + * @return string The formatted organization_location_security_health_analytics_custom_module resource. + */ + public static function organizationLocationSecurityHealthAnalyticsCustomModuleName(string $organization, string $location, string $securityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('organizationLocationSecurityHealthAnalyticsCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_service resource. + * + * @param string $organization + * @param string $location + * @param string $service + * + * @return string The formatted organization_location_service resource. + */ + public static function organizationLocationServiceName(string $organization, string $location, string $service): string + { + return self::getPathTemplate('organizationLocationService')->render([ + 'organization' => $organization, + 'location' => $location, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_effective_event_threat_detection_custom_module resource. + * + * @param string $project + * @param string $location + * @param string $effectiveEventThreatDetectionCustomModule + * + * @return string The formatted project_location_effective_event_threat_detection_custom_module resource. + */ + public static function projectLocationEffectiveEventThreatDetectionCustomModuleName(string $project, string $location, string $effectiveEventThreatDetectionCustomModule): string + { + return self::getPathTemplate('projectLocationEffectiveEventThreatDetectionCustomModule')->render([ + 'project' => $project, + 'location' => $location, + 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_effective_security_health_analytics_custom_module resource. + * + * @param string $project + * @param string $location + * @param string $effectiveSecurityHealthAnalyticsCustomModule + * + * @return string The formatted project_location_effective_security_health_analytics_custom_module resource. + */ + public static function projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(string $project, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('projectLocationEffectiveSecurityHealthAnalyticsCustomModule')->render([ + 'project' => $project, + 'location' => $location, + 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_event_threat_detection_custom_module resource. + * + * @param string $project + * @param string $location + * @param string $eventThreatDetectionCustomModule + * + * @return string The formatted project_location_event_threat_detection_custom_module resource. + */ + public static function projectLocationEventThreatDetectionCustomModuleName(string $project, string $location, string $eventThreatDetectionCustomModule): string + { + return self::getPathTemplate('projectLocationEventThreatDetectionCustomModule')->render([ + 'project' => $project, + 'location' => $location, + 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_security_health_analytics_custom_module resource. + * + * @param string $project + * @param string $location + * @param string $securityHealthAnalyticsCustomModule + * + * @return string The formatted project_location_security_health_analytics_custom_module resource. + */ + public static function projectLocationSecurityHealthAnalyticsCustomModuleName(string $project, string $location, string $securityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('projectLocationSecurityHealthAnalyticsCustomModule')->render([ + 'project' => $project, + 'location' => $location, + 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_service resource. + * + * @param string $project + * @param string $location + * @param string $service + * + * @return string The formatted project_location_service resource. + */ + public static function projectLocationServiceName(string $project, string $location, string $service): string + { + return self::getPathTemplate('projectLocationService')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_center_service resource. + * + * @param string $project + * @param string $location + * @param string $service + * + * @return string The formatted security_center_service resource. + */ + public static function securityCenterServiceName(string $project, string $location, string $service): string + { + return self::getPathTemplate('securityCenterService')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_health_analytics_custom_module resource. + * + * @param string $organization + * @param string $location + * @param string $securityHealthAnalyticsCustomModule + * + * @return string The formatted security_health_analytics_custom_module resource. + */ + public static function securityHealthAnalyticsCustomModuleName(string $organization, string $location, string $securityHealthAnalyticsCustomModule): string + { + return self::getPathTemplate('securityHealthAnalyticsCustomModule')->render([ + 'organization' => $organization, + 'location' => $location, + 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - effectiveEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} + * - effectiveSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} + * - eventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} + * - folderLocation: folders/{folder}/locations/{location} + * - folderLocationEffectiveEventThreatDetectionCustomModule: folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} + * - folderLocationEffectiveSecurityHealthAnalyticsCustomModule: folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} + * - folderLocationEventThreatDetectionCustomModule: folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} + * - folderLocationSecurityHealthAnalyticsCustomModule: folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} + * - folderLocationService: folders/{folder}/locations/{location}/securityCenterServices/{service} + * - location: projects/{project}/locations/{location} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationEffectiveEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} + * - organizationLocationEffectiveSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} + * - organizationLocationEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} + * - organizationLocationSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} + * - organizationLocationService: organizations/{organization}/locations/{location}/securityCenterServices/{service} + * - projectLocationEffectiveEventThreatDetectionCustomModule: projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} + * - projectLocationEffectiveSecurityHealthAnalyticsCustomModule: projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} + * - projectLocationEventThreatDetectionCustomModule: projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} + * - projectLocationSecurityHealthAnalyticsCustomModule: projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} + * - projectLocationService: projects/{project}/locations/{location}/securityCenterServices/{service} + * - securityCenterService: projects/{project}/locations/{location}/securityCenterServices/{service} + * - securityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $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 'securitycentermanagement.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); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a resident Event Threat Detection custom module at the scope of the + * given Resource Manager parent, and also creates inherited custom modules + * for all descendants of the given parent. These modules are enabled by + * default. + * + * The async variant is + * {@see SecurityCenterManagementClient::createEventThreatDetectionCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php + * + * @param CreateEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EventThreatDetectionCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEventThreatDetectionCustomModule(CreateEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EventThreatDetectionCustomModule + { + return $this->startApiCall('CreateEventThreatDetectionCustomModule', $request, $callOptions)->wait(); + } + + /** + * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the + * given CRM parent, and also creates inherited + * SecurityHealthAnalyticsCustomModules for all CRM descendants of the given + * parent. These modules are enabled by default. + * + * The async variant is + * {@see SecurityCenterManagementClient::createSecurityHealthAnalyticsCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php + * + * @param CreateSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecurityHealthAnalyticsCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SecurityHealthAnalyticsCustomModule + { + return $this->startApiCall('CreateSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified Event Threat Detection custom module and all of its + * descendants in the Resource Manager hierarchy. This method is only + * supported for resident custom modules. + * + * The async variant is + * {@see SecurityCenterManagementClient::deleteEventThreatDetectionCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php + * + * @param DeleteEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEventThreatDetectionCustomModule(DeleteEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEventThreatDetectionCustomModule', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its + * descendants in the CRM hierarchy. This method is only supported for + * resident custom modules. + * + * The async variant is + * {@see SecurityCenterManagementClient::deleteSecurityHealthAnalyticsCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php + * + * @param DeleteSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); + } + + /** + * Gets an effective ETD custom module. Retrieves the effective module at the + * given level. The difference between an EffectiveCustomModule and a + * CustomModule is that the fields for an EffectiveCustomModule are computed + * from ancestors if needed. For example, the enablement_state for a + * CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the + * enablement_state for an EffectiveCustomModule is always computed to ENABLED + * or DISABLED (the effective enablement_state). + * + * The async variant is + * {@see SecurityCenterManagementClient::getEffectiveEventThreatDetectionCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php + * + * @param GetEffectiveEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EffectiveEventThreatDetectionCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEffectiveEventThreatDetectionCustomModule(GetEffectiveEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EffectiveEventThreatDetectionCustomModule + { + return $this->startApiCall('GetEffectiveEventThreatDetectionCustomModule', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule. + * + * The async variant is + * {@see SecurityCenterManagementClient::getEffectiveSecurityHealthAnalyticsCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php + * + * @param GetEffectiveSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EffectiveSecurityHealthAnalyticsCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): EffectiveSecurityHealthAnalyticsCustomModule + { + return $this->startApiCall('GetEffectiveSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); + } + + /** + * Gets an Event Threat Detection custom module. + * + * The async variant is + * {@see SecurityCenterManagementClient::getEventThreatDetectionCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php + * + * @param GetEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EventThreatDetectionCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEventThreatDetectionCustomModule(GetEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EventThreatDetectionCustomModule + { + return $this->startApiCall('GetEventThreatDetectionCustomModule', $request, $callOptions)->wait(); + } + + /** + * Gets service settings for the specified Security Command Center service. + * + * The async variant is + * {@see SecurityCenterManagementClient::getSecurityCenterServiceAsync()} . + * + * @example samples/V1/SecurityCenterManagementClient/get_security_center_service.php + * + * @param GetSecurityCenterServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecurityCenterService + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSecurityCenterService(GetSecurityCenterServiceRequest $request, array $callOptions = []): SecurityCenterService + { + return $this->startApiCall('GetSecurityCenterService', $request, $callOptions)->wait(); + } + + /** + * Retrieves a SecurityHealthAnalyticsCustomModule. + * + * The async variant is + * {@see SecurityCenterManagementClient::getSecurityHealthAnalyticsCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php + * + * @param GetSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecurityHealthAnalyticsCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SecurityHealthAnalyticsCustomModule + { + return $this->startApiCall('GetSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); + } + + /** + * Lists all resident Event Threat Detection custom modules under the + * given Resource Manager parent and its descendants. + * + * The async variant is + * {@see SecurityCenterManagementClient::listDescendantEventThreatDetectionCustomModulesAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php + * + * @param ListDescendantEventThreatDetectionCustomModulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDescendantEventThreatDetectionCustomModules(ListDescendantEventThreatDetectionCustomModulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDescendantEventThreatDetectionCustomModules', $request, $callOptions); + } + + /** + * Returns a list of all resident SecurityHealthAnalyticsCustomModules under + * the given CRM parent and all of the parent's CRM descendants. + * + * The async variant is + * {@see SecurityCenterManagementClient::listDescendantSecurityHealthAnalyticsCustomModulesAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php + * + * @param ListDescendantSecurityHealthAnalyticsCustomModulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDescendantSecurityHealthAnalyticsCustomModules', $request, $callOptions); + } + + /** + * Lists all effective Event Threat Detection custom modules for the + * given parent. This includes resident modules defined at the scope of the + * parent along with modules inherited from its ancestors. + * + * The async variant is + * {@see SecurityCenterManagementClient::listEffectiveEventThreatDetectionCustomModulesAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php + * + * @param ListEffectiveEventThreatDetectionCustomModulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEffectiveEventThreatDetectionCustomModules(ListEffectiveEventThreatDetectionCustomModulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEffectiveEventThreatDetectionCustomModules', $request, $callOptions); + } + + /** + * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + * given parent. This includes resident modules defined at the scope of the + * parent, and inherited modules, inherited from CRM ancestors (no + * descendants). + * + * The async variant is + * {@see SecurityCenterManagementClient::listEffectiveSecurityHealthAnalyticsCustomModulesAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php + * + * @param ListEffectiveSecurityHealthAnalyticsCustomModulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEffectiveSecurityHealthAnalyticsCustomModules', $request, $callOptions); + } + + /** + * Lists all Event Threat Detection custom modules for the given + * Resource Manager parent. This includes resident modules defined at the + * scope of the parent along with modules inherited from ancestors. + * + * The async variant is + * {@see SecurityCenterManagementClient::listEventThreatDetectionCustomModulesAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php + * + * @param ListEventThreatDetectionCustomModulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEventThreatDetectionCustomModules(ListEventThreatDetectionCustomModulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEventThreatDetectionCustomModules', $request, $callOptions); + } + + /** + * Returns a list of all Security Command Center services for the given + * parent. + * + * The async variant is + * {@see SecurityCenterManagementClient::listSecurityCenterServicesAsync()} . + * + * @example samples/V1/SecurityCenterManagementClient/list_security_center_services.php + * + * @param ListSecurityCenterServicesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSecurityCenterServices(ListSecurityCenterServicesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSecurityCenterServices', $request, $callOptions); + } + + /** + * Returns a list of all SecurityHealthAnalyticsCustomModules for the given + * parent. This includes resident modules defined at the scope of the parent, + * and inherited modules, inherited from CRM ancestors (no descendants). + * + * The async variant is + * {@see SecurityCenterManagementClient::listSecurityHealthAnalyticsCustomModulesAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php + * + * @param ListSecurityHealthAnalyticsCustomModulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSecurityHealthAnalyticsCustomModules(ListSecurityHealthAnalyticsCustomModulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSecurityHealthAnalyticsCustomModules', $request, $callOptions); + } + + /** + * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + * + * The async variant is + * {@see SecurityCenterManagementClient::simulateSecurityHealthAnalyticsCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php + * + * @param SimulateSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SimulateSecurityHealthAnalyticsCustomModuleResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function simulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SimulateSecurityHealthAnalyticsCustomModuleResponse + { + return $this->startApiCall('SimulateSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); + } + + /** + * Updates the Event Threat Detection custom module with the given name based + * on the given update mask. Updating the enablement state is supported for + * both resident and inherited modules (though resident modules cannot have an + * enablement state of "inherited"). Updating the display name or + * configuration of a module is supported for resident modules only. The type + * of a module cannot be changed. + * + * The async variant is + * {@see SecurityCenterManagementClient::updateEventThreatDetectionCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php + * + * @param UpdateEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EventThreatDetectionCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEventThreatDetectionCustomModule(UpdateEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EventThreatDetectionCustomModule + { + return $this->startApiCall('UpdateEventThreatDetectionCustomModule', $request, $callOptions)->wait(); + } + + /** + * Updates a Security Command Center service using the given update mask. + * + * The async variant is + * {@see SecurityCenterManagementClient::updateSecurityCenterServiceAsync()} . + * + * @example samples/V1/SecurityCenterManagementClient/update_security_center_service.php + * + * @param UpdateSecurityCenterServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecurityCenterService + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSecurityCenterService(UpdateSecurityCenterServiceRequest $request, array $callOptions = []): SecurityCenterService + { + return $this->startApiCall('UpdateSecurityCenterService', $request, $callOptions)->wait(); + } + + /** + * Updates the SecurityHealthAnalyticsCustomModule under the given name based + * on the given update mask. Updating the enablement state is supported on + * both resident and inherited modules (though resident modules cannot have an + * enablement state of "inherited"). Updating the display name and custom + * config of a module is supported on resident modules only. + * + * The async variant is + * {@see SecurityCenterManagementClient::updateSecurityHealthAnalyticsCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php + * + * @param UpdateSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecurityHealthAnalyticsCustomModule + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SecurityHealthAnalyticsCustomModule + { + return $this->startApiCall('UpdateSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); + } + + /** + * Validates the given Event Threat Detection custom module. + * + * The async variant is + * {@see SecurityCenterManagementClient::validateEventThreatDetectionCustomModuleAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php + * + * @param ValidateEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ValidateEventThreatDetectionCustomModuleResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function validateEventThreatDetectionCustomModule(ValidateEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): ValidateEventThreatDetectionCustomModuleResponse + { + return $this->startApiCall('ValidateEventThreatDetectionCustomModule', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see SecurityCenterManagementClient::getLocationAsync()} . + * + * @example samples/V1/SecurityCenterManagementClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see SecurityCenterManagementClient::listLocationsAsync()} + * . + * + * @example samples/V1/SecurityCenterManagementClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..b7aad2f739fd --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json @@ -0,0 +1,133 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.securitycentermanagement.v1", + "libraryPackage": "Google\\Cloud\\SecurityCenterManagement\\V1", + "services": { + "SecurityCenterManagement": { + "clients": { + "grpc": { + "libraryClient": "SecurityCenterManagementGapicClient", + "rpcs": { + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "createEventThreatDetectionCustomModule" + ] + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "createSecurityHealthAnalyticsCustomModule" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "deleteEventThreatDetectionCustomModule" + ] + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "methods": [ + "deleteSecurityHealthAnalyticsCustomModule" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "getEffectiveEventThreatDetectionCustomModule" + ] + }, + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "methods": [ + "getEffectiveSecurityHealthAnalyticsCustomModule" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "getEventThreatDetectionCustomModule" + ] + }, + "GetSecurityCenterService": { + "methods": [ + "getSecurityCenterService" + ] + }, + "GetSecurityHealthAnalyticsCustomModule": { + "methods": [ + "getSecurityHealthAnalyticsCustomModule" + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "listDescendantEventThreatDetectionCustomModules" + ] + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listDescendantSecurityHealthAnalyticsCustomModules" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "listEffectiveEventThreatDetectionCustomModules" + ] + }, + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listEffectiveSecurityHealthAnalyticsCustomModules" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "listEventThreatDetectionCustomModules" + ] + }, + "ListSecurityCenterServices": { + "methods": [ + "listSecurityCenterServices" + ] + }, + "ListSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listSecurityHealthAnalyticsCustomModules" + ] + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "simulateSecurityHealthAnalyticsCustomModule" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "updateEventThreatDetectionCustomModule" + ] + }, + "UpdateSecurityCenterService": { + "methods": [ + "updateSecurityCenterService" + ] + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "updateSecurityHealthAnalyticsCustomModule" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validateEventThreatDetectionCustomModule" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json new file mode 100644 index 000000000000..cefc54399731 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json @@ -0,0 +1,160 @@ +{ + "interfaces": { + "google.cloud.securitycentermanagement.v1.SecurityCenterManagement": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSecurityCenterService": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDescendantEventThreatDetectionCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEventThreatDetectionCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSecurityCenterServices": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSecurityHealthAnalyticsCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSecurityCenterService": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ValidateEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php new file mode 100644 index 000000000000..840299f2b1b6 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php @@ -0,0 +1,398 @@ + [ + 'google.cloud.securitycentermanagement.v1.SecurityCenterManagement' => [ + 'CreateEventThreatDetectionCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSecurityHealthAnalyticsCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEventThreatDetectionCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSecurityHealthAnalyticsCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEffectiveEventThreatDetectionCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEffectiveSecurityHealthAnalyticsCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEventThreatDetectionCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSecurityCenterService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSecurityHealthAnalyticsCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDescendantEventThreatDetectionCustomModules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEventThreatDetectionCustomModules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListDescendantEventThreatDetectionCustomModulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDescendantSecurityHealthAnalyticsCustomModules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSecurityHealthAnalyticsCustomModules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListDescendantSecurityHealthAnalyticsCustomModulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEffectiveEventThreatDetectionCustomModules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEffectiveEventThreatDetectionCustomModules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListEffectiveEventThreatDetectionCustomModulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEffectiveSecurityHealthAnalyticsCustomModules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEffectiveSecurityHealthAnalyticsCustomModules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEventThreatDetectionCustomModules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEventThreatDetectionCustomModules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListEventThreatDetectionCustomModulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSecurityCenterServices' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSecurityCenterServices', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListSecurityCenterServicesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSecurityHealthAnalyticsCustomModules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSecurityHealthAnalyticsCustomModules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListSecurityHealthAnalyticsCustomModulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SimulateSecurityHealthAnalyticsCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEventThreatDetectionCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'event_threat_detection_custom_module.name', + 'fieldAccessors' => [ + 'getEventThreatDetectionCustomModule', + 'getName', + ], + ], + ], + ], + 'UpdateSecurityCenterService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService', + 'headerParams' => [ + [ + 'keyName' => 'security_center_service.name', + 'fieldAccessors' => [ + 'getSecurityCenterService', + 'getName', + ], + ], + ], + ], + 'UpdateSecurityHealthAnalyticsCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule', + 'headerParams' => [ + [ + 'keyName' => 'security_health_analytics_custom_module.name', + 'fieldAccessors' => [ + 'getSecurityHealthAnalyticsCustomModule', + 'getName', + ], + ], + ], + ], + 'ValidateEventThreatDetectionCustomModule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'effectiveEventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', + 'effectiveSecurityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', + 'eventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', + 'folderLocation' => 'folders/{folder}/locations/{location}', + 'folderLocationEffectiveEventThreatDetectionCustomModule' => 'folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', + 'folderLocationEffectiveSecurityHealthAnalyticsCustomModule' => 'folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', + 'folderLocationEventThreatDetectionCustomModule' => 'folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', + 'folderLocationSecurityHealthAnalyticsCustomModule' => 'folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', + 'folderLocationService' => 'folders/{folder}/locations/{location}/securityCenterServices/{service}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationEffectiveEventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', + 'organizationLocationEffectiveSecurityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', + 'organizationLocationEventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', + 'organizationLocationSecurityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', + 'organizationLocationService' => 'organizations/{organization}/locations/{location}/securityCenterServices/{service}', + 'projectLocationEffectiveEventThreatDetectionCustomModule' => 'projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', + 'projectLocationEffectiveSecurityHealthAnalyticsCustomModule' => 'projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', + 'projectLocationEventThreatDetectionCustomModule' => 'projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', + 'projectLocationSecurityHealthAnalyticsCustomModule' => 'projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', + 'projectLocationService' => 'projects/{project}/locations/{location}/securityCenterServices/{service}', + 'securityCenterService' => 'projects/{project}/locations/{location}/securityCenterServices/{service}', + 'securityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', + ], + ], + ], +]; diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php new file mode 100644 index 000000000000..545daa6979b5 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php @@ -0,0 +1,545 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.securitycentermanagement.v1.SecurityCenterManagement' => [ + 'CreateEventThreatDetectionCustomModule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules', + 'body' => 'event_threat_detection_custom_module', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules', + 'body' => 'event_threat_detection_custom_module', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules', + 'body' => 'event_threat_detection_custom_module', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSecurityHealthAnalyticsCustomModule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules', + 'body' => 'security_health_analytics_custom_module', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules', + 'body' => 'security_health_analytics_custom_module', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules', + 'body' => 'security_health_analytics_custom_module', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEventThreatDetectionCustomModule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSecurityHealthAnalyticsCustomModule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEffectiveEventThreatDetectionCustomModule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEffectiveSecurityHealthAnalyticsCustomModule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEventThreatDetectionCustomModule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSecurityCenterService' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/securityCenterServices/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/securityCenterServices/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityCenterServices/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSecurityHealthAnalyticsCustomModule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDescendantEventThreatDetectionCustomModules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendant', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDescendantSecurityHealthAnalyticsCustomModules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEffectiveEventThreatDetectionCustomModules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModules', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEffectiveSecurityHealthAnalyticsCustomModules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEventThreatDetectionCustomModules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSecurityCenterServices' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityCenterServices', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityCenterServices', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityCenterServices', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSecurityHealthAnalyticsCustomModules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SimulateSecurityHealthAnalyticsCustomModule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEventThreatDetectionCustomModule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}', + 'body' => 'event_threat_detection_custom_module', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}', + 'body' => 'event_threat_detection_custom_module', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}', + 'body' => 'event_threat_detection_custom_module', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'event_threat_detection_custom_module.name' => [ + 'getters' => [ + 'getEventThreatDetectionCustomModule', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSecurityCenterService' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}', + 'body' => 'security_center_service', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}', + 'body' => 'security_center_service', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}', + 'body' => 'security_center_service', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'security_center_service.name' => [ + 'getters' => [ + 'getSecurityCenterService', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSecurityHealthAnalyticsCustomModule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}', + 'body' => 'security_health_analytics_custom_module', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}', + 'body' => 'security_health_analytics_custom_module', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}', + 'body' => 'security_health_analytics_custom_module', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'security_health_analytics_custom_module.name' => [ + 'getters' => [ + 'getSecurityHealthAnalyticsCustomModule', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'ValidateEventThreatDetectionCustomModule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php b/owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php new file mode 100644 index 000000000000..d7ffccab1458 --- /dev/null +++ b/owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php @@ -0,0 +1,1774 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SecurityCenterManagementClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SecurityCenterManagementClient($options); + } + + /** @test */ + public function createEventThreatDetectionCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $ancestorModule = 'ancestorModule-521996712'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $lastEditor = 'lastEditor1620154166'; + $expectedResponse = new EventThreatDetectionCustomModule(); + $expectedResponse->setName($name); + $expectedResponse->setAncestorModule($ancestorModule); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLastEditor($lastEditor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); + $request = (new CreateEventThreatDetectionCustomModuleRequest()) + ->setParent($formattedParent) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + $response = $gapicClient->createEventThreatDetectionCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/CreateEventThreatDetectionCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEventThreatDetectionCustomModule(); + $this->assertProtobufEquals($eventThreatDetectionCustomModule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEventThreatDetectionCustomModuleExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); + $request = (new CreateEventThreatDetectionCustomModuleRequest()) + ->setParent($formattedParent) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + try { + $gapicClient->createEventThreatDetectionCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSecurityHealthAnalyticsCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $lastEditor = 'lastEditor1620154166'; + $ancestorModule = 'ancestorModule-521996712'; + $expectedResponse = new SecurityHealthAnalyticsCustomModule(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setAncestorModule($ancestorModule); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); + $request = (new CreateSecurityHealthAnalyticsCustomModuleRequest()) + ->setParent($formattedParent) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); + $response = $gapicClient->createSecurityHealthAnalyticsCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/CreateSecurityHealthAnalyticsCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSecurityHealthAnalyticsCustomModule(); + $this->assertProtobufEquals($securityHealthAnalyticsCustomModule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSecurityHealthAnalyticsCustomModuleExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); + $request = (new CreateSecurityHealthAnalyticsCustomModuleRequest()) + ->setParent($formattedParent) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); + try { + $gapicClient->createSecurityHealthAnalyticsCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEventThreatDetectionCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); + $request = (new DeleteEventThreatDetectionCustomModuleRequest()) + ->setName($formattedName); + $gapicClient->deleteEventThreatDetectionCustomModule($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/DeleteEventThreatDetectionCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEventThreatDetectionCustomModuleExceptionTest() + { + $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->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); + $request = (new DeleteEventThreatDetectionCustomModuleRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteEventThreatDetectionCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSecurityHealthAnalyticsCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); + $request = (new DeleteSecurityHealthAnalyticsCustomModuleRequest()) + ->setName($formattedName); + $gapicClient->deleteSecurityHealthAnalyticsCustomModule($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/DeleteSecurityHealthAnalyticsCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSecurityHealthAnalyticsCustomModuleExceptionTest() + { + $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->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); + $request = (new DeleteSecurityHealthAnalyticsCustomModuleRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSecurityHealthAnalyticsCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEffectiveEventThreatDetectionCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new EffectiveEventThreatDetectionCustomModule(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->effectiveEventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); + $request = (new GetEffectiveEventThreatDetectionCustomModuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getEffectiveEventThreatDetectionCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetEffectiveEventThreatDetectionCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEffectiveEventThreatDetectionCustomModuleExceptionTest() + { + $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->effectiveEventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); + $request = (new GetEffectiveEventThreatDetectionCustomModuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getEffectiveEventThreatDetectionCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEffectiveSecurityHealthAnalyticsCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new EffectiveSecurityHealthAnalyticsCustomModule(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->effectiveSecurityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); + $request = (new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getEffectiveSecurityHealthAnalyticsCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetEffectiveSecurityHealthAnalyticsCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEffectiveSecurityHealthAnalyticsCustomModuleExceptionTest() + { + $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->effectiveSecurityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); + $request = (new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getEffectiveSecurityHealthAnalyticsCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventThreatDetectionCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $ancestorModule = 'ancestorModule-521996712'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $lastEditor = 'lastEditor1620154166'; + $expectedResponse = new EventThreatDetectionCustomModule(); + $expectedResponse->setName($name2); + $expectedResponse->setAncestorModule($ancestorModule); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLastEditor($lastEditor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); + $request = (new GetEventThreatDetectionCustomModuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getEventThreatDetectionCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetEventThreatDetectionCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventThreatDetectionCustomModuleExceptionTest() + { + $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->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); + $request = (new GetEventThreatDetectionCustomModuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getEventThreatDetectionCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecurityCenterServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SecurityCenterService(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->securityCenterServiceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new GetSecurityCenterServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->getSecurityCenterService($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetSecurityCenterService', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecurityCenterServiceExceptionTest() + { + $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->securityCenterServiceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new GetSecurityCenterServiceRequest()) + ->setName($formattedName); + try { + $gapicClient->getSecurityCenterService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecurityHealthAnalyticsCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $lastEditor = 'lastEditor1620154166'; + $ancestorModule = 'ancestorModule-521996712'; + $expectedResponse = new SecurityHealthAnalyticsCustomModule(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setAncestorModule($ancestorModule); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); + $request = (new GetSecurityHealthAnalyticsCustomModuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getSecurityHealthAnalyticsCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetSecurityHealthAnalyticsCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecurityHealthAnalyticsCustomModuleExceptionTest() + { + $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->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); + $request = (new GetSecurityHealthAnalyticsCustomModuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getSecurityHealthAnalyticsCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDescendantEventThreatDetectionCustomModulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $eventThreatDetectionCustomModulesElement = new EventThreatDetectionCustomModule(); + $eventThreatDetectionCustomModules = [ + $eventThreatDetectionCustomModulesElement, + ]; + $expectedResponse = new ListDescendantEventThreatDetectionCustomModulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEventThreatDetectionCustomModules($eventThreatDetectionCustomModules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListDescendantEventThreatDetectionCustomModulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDescendantEventThreatDetectionCustomModules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEventThreatDetectionCustomModules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListDescendantEventThreatDetectionCustomModules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDescendantEventThreatDetectionCustomModulesExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListDescendantEventThreatDetectionCustomModulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDescendantEventThreatDetectionCustomModules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDescendantSecurityHealthAnalyticsCustomModulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $securityHealthAnalyticsCustomModulesElement = new SecurityHealthAnalyticsCustomModule(); + $securityHealthAnalyticsCustomModules = [ + $securityHealthAnalyticsCustomModulesElement, + ]; + $expectedResponse = new ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSecurityHealthAnalyticsCustomModules($securityHealthAnalyticsCustomModules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListDescendantSecurityHealthAnalyticsCustomModulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDescendantSecurityHealthAnalyticsCustomModules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSecurityHealthAnalyticsCustomModules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListDescendantSecurityHealthAnalyticsCustomModules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDescendantSecurityHealthAnalyticsCustomModulesExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListDescendantSecurityHealthAnalyticsCustomModulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDescendantSecurityHealthAnalyticsCustomModules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEffectiveEventThreatDetectionCustomModulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $effectiveEventThreatDetectionCustomModulesElement = new EffectiveEventThreatDetectionCustomModule(); + $effectiveEventThreatDetectionCustomModules = [ + $effectiveEventThreatDetectionCustomModulesElement, + ]; + $expectedResponse = new ListEffectiveEventThreatDetectionCustomModulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEffectiveEventThreatDetectionCustomModules($effectiveEventThreatDetectionCustomModules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListEffectiveEventThreatDetectionCustomModulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEffectiveEventThreatDetectionCustomModules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEffectiveEventThreatDetectionCustomModules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListEffectiveEventThreatDetectionCustomModules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEffectiveEventThreatDetectionCustomModulesExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListEffectiveEventThreatDetectionCustomModulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEffectiveEventThreatDetectionCustomModules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEffectiveSecurityHealthAnalyticsCustomModulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $effectiveSecurityHealthAnalyticsCustomModulesElement = new EffectiveSecurityHealthAnalyticsCustomModule(); + $effectiveSecurityHealthAnalyticsCustomModules = [ + $effectiveSecurityHealthAnalyticsCustomModulesElement, + ]; + $expectedResponse = new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEffectiveSecurityHealthAnalyticsCustomModules($effectiveSecurityHealthAnalyticsCustomModules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEffectiveSecurityHealthAnalyticsCustomModules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEffectiveSecurityHealthAnalyticsCustomModules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListEffectiveSecurityHealthAnalyticsCustomModules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEffectiveSecurityHealthAnalyticsCustomModulesExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEffectiveSecurityHealthAnalyticsCustomModules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventThreatDetectionCustomModulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $eventThreatDetectionCustomModulesElement = new EventThreatDetectionCustomModule(); + $eventThreatDetectionCustomModules = [ + $eventThreatDetectionCustomModulesElement, + ]; + $expectedResponse = new ListEventThreatDetectionCustomModulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEventThreatDetectionCustomModules($eventThreatDetectionCustomModules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListEventThreatDetectionCustomModulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEventThreatDetectionCustomModules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEventThreatDetectionCustomModules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListEventThreatDetectionCustomModules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventThreatDetectionCustomModulesExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListEventThreatDetectionCustomModulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEventThreatDetectionCustomModules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecurityCenterServicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $securityCenterServicesElement = new SecurityCenterService(); + $securityCenterServices = [ + $securityCenterServicesElement, + ]; + $expectedResponse = new ListSecurityCenterServicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSecurityCenterServices($securityCenterServices); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListSecurityCenterServicesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSecurityCenterServices($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSecurityCenterServices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListSecurityCenterServices', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecurityCenterServicesExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListSecurityCenterServicesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSecurityCenterServices($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecurityHealthAnalyticsCustomModulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $securityHealthAnalyticsCustomModulesElement = new SecurityHealthAnalyticsCustomModule(); + $securityHealthAnalyticsCustomModules = [ + $securityHealthAnalyticsCustomModulesElement, + ]; + $expectedResponse = new ListSecurityHealthAnalyticsCustomModulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSecurityHealthAnalyticsCustomModules($securityHealthAnalyticsCustomModules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListSecurityHealthAnalyticsCustomModulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSecurityHealthAnalyticsCustomModules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSecurityHealthAnalyticsCustomModules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListSecurityHealthAnalyticsCustomModules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecurityHealthAnalyticsCustomModulesExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListSecurityHealthAnalyticsCustomModulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSecurityHealthAnalyticsCustomModules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function simulateSecurityHealthAnalyticsCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SimulateSecurityHealthAnalyticsCustomModuleResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $customConfig = new CustomConfig(); + $resource = new SimulatedResource(); + $resourceResourceType = 'resourceResourceType305300374'; + $resource->setResourceType($resourceResourceType); + $request = (new SimulateSecurityHealthAnalyticsCustomModuleRequest()) + ->setParent($parent) + ->setCustomConfig($customConfig) + ->setResource($resource); + $response = $gapicClient->simulateSecurityHealthAnalyticsCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/SimulateSecurityHealthAnalyticsCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getCustomConfig(); + $this->assertProtobufEquals($customConfig, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function simulateSecurityHealthAnalyticsCustomModuleExceptionTest() + { + $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 + $parent = 'parent-995424086'; + $customConfig = new CustomConfig(); + $resource = new SimulatedResource(); + $resourceResourceType = 'resourceResourceType305300374'; + $resource->setResourceType($resourceResourceType); + $request = (new SimulateSecurityHealthAnalyticsCustomModuleRequest()) + ->setParent($parent) + ->setCustomConfig($customConfig) + ->setResource($resource); + try { + $gapicClient->simulateSecurityHealthAnalyticsCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEventThreatDetectionCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $ancestorModule = 'ancestorModule-521996712'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $lastEditor = 'lastEditor1620154166'; + $expectedResponse = new EventThreatDetectionCustomModule(); + $expectedResponse->setName($name); + $expectedResponse->setAncestorModule($ancestorModule); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLastEditor($lastEditor); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); + $request = (new UpdateEventThreatDetectionCustomModuleRequest()) + ->setUpdateMask($updateMask) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + $response = $gapicClient->updateEventThreatDetectionCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/UpdateEventThreatDetectionCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getEventThreatDetectionCustomModule(); + $this->assertProtobufEquals($eventThreatDetectionCustomModule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEventThreatDetectionCustomModuleExceptionTest() + { + $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 + $updateMask = new FieldMask(); + $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); + $request = (new UpdateEventThreatDetectionCustomModuleRequest()) + ->setUpdateMask($updateMask) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + try { + $gapicClient->updateEventThreatDetectionCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecurityCenterServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SecurityCenterService(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $securityCenterService = new SecurityCenterService(); + $updateMask = new FieldMask(); + $request = (new UpdateSecurityCenterServiceRequest()) + ->setSecurityCenterService($securityCenterService) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSecurityCenterService($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/UpdateSecurityCenterService', $actualFuncCall); + $actualValue = $actualRequestObject->getSecurityCenterService(); + $this->assertProtobufEquals($securityCenterService, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecurityCenterServiceExceptionTest() + { + $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 + $securityCenterService = new SecurityCenterService(); + $updateMask = new FieldMask(); + $request = (new UpdateSecurityCenterServiceRequest()) + ->setSecurityCenterService($securityCenterService) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateSecurityCenterService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecurityHealthAnalyticsCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $lastEditor = 'lastEditor1620154166'; + $ancestorModule = 'ancestorModule-521996712'; + $expectedResponse = new SecurityHealthAnalyticsCustomModule(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setAncestorModule($ancestorModule); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); + $request = (new UpdateSecurityHealthAnalyticsCustomModuleRequest()) + ->setUpdateMask($updateMask) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); + $response = $gapicClient->updateSecurityHealthAnalyticsCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/UpdateSecurityHealthAnalyticsCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getSecurityHealthAnalyticsCustomModule(); + $this->assertProtobufEquals($securityHealthAnalyticsCustomModule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecurityHealthAnalyticsCustomModuleExceptionTest() + { + $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 + $updateMask = new FieldMask(); + $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); + $request = (new UpdateSecurityHealthAnalyticsCustomModuleRequest()) + ->setUpdateMask($updateMask) + ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); + try { + $gapicClient->updateSecurityHealthAnalyticsCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateEventThreatDetectionCustomModuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ValidateEventThreatDetectionCustomModuleResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $rawText = 'rawText503586532'; + $type = 'type3575610'; + $request = (new ValidateEventThreatDetectionCustomModuleRequest()) + ->setParent($formattedParent) + ->setRawText($rawText) + ->setType($type); + $response = $gapicClient->validateEventThreatDetectionCustomModule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ValidateEventThreatDetectionCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRawText(); + $this->assertProtobufEquals($rawText, $actualValue); + $actualValue = $actualRequestObject->getType(); + $this->assertProtobufEquals($type, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateEventThreatDetectionCustomModuleExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $rawText = 'rawText503586532'; + $type = 'type3575610'; + $request = (new ValidateEventThreatDetectionCustomModuleRequest()) + ->setParent($formattedParent) + ->setRawText($rawText) + ->setType($type); + try { + $gapicClient->validateEventThreatDetectionCustomModule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEventThreatDetectionCustomModuleAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $ancestorModule = 'ancestorModule-521996712'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $lastEditor = 'lastEditor1620154166'; + $expectedResponse = new EventThreatDetectionCustomModule(); + $expectedResponse->setName($name); + $expectedResponse->setAncestorModule($ancestorModule); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLastEditor($lastEditor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); + $request = (new CreateEventThreatDetectionCustomModuleRequest()) + ->setParent($formattedParent) + ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); + $response = $gapicClient->createEventThreatDetectionCustomModuleAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/CreateEventThreatDetectionCustomModule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEventThreatDetectionCustomModule(); + $this->assertProtobufEquals($eventThreatDetectionCustomModule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From e6e7d7ac1e7cff1f823909d003463bff5120b99f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 7 Jun 2024 03:15:39 +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/UpdateSecurityCenterServiceRequest.php | 48 +- .../V1/SecurityCenterManagement.php | Bin 27496 -> 0 bytes ...ventThreatDetectionCustomModuleRequest.php | 215 -- ...rityHealthAnalyticsCustomModuleRequest.php | 210 -- .../V1/CustomConfig.php | 309 --- .../V1/CustomConfig/CustomOutputSpec.php | 73 - .../CustomOutputSpec/Property.php | 122 -- .../V1/CustomConfig/ResourceSelector.php | 70 - .../V1/CustomConfig/Severity.php | 78 - ...ventThreatDetectionCustomModuleRequest.php | 161 -- ...rityHealthAnalyticsCustomModuleRequest.php | 161 -- ...ectiveEventThreatDetectionCustomModule.php | 273 --- .../EnablementState.php | 64 - ...iveSecurityHealthAnalyticsCustomModule.php | 215 -- .../EnablementState.php | 64 - .../V1/EventThreatDetectionCustomModule.php | 401 ---- .../EnablementState.php | 75 - ...ventThreatDetectionCustomModuleRequest.php | 103 - ...rityHealthAnalyticsCustomModuleRequest.php | 102 - ...ventThreatDetectionCustomModuleRequest.php | 103 - .../V1/GetSecurityCenterServiceRequest.php | 135 -- ...rityHealthAnalyticsCustomModuleRequest.php | 81 - ...entThreatDetectionCustomModulesRequest.php | 178 -- ...ntThreatDetectionCustomModulesResponse.php | 102 - ...ityHealthAnalyticsCustomModulesRequest.php | 175 -- ...tyHealthAnalyticsCustomModulesResponse.php | 102 - ...entThreatDetectionCustomModulesRequest.php | 174 -- ...ntThreatDetectionCustomModulesResponse.php | 102 - ...ityHealthAnalyticsCustomModulesRequest.php | 179 -- ...tyHealthAnalyticsCustomModulesResponse.php | 102 - ...entThreatDetectionCustomModulesRequest.php | 197 -- ...ntThreatDetectionCustomModulesResponse.php | 101 - .../V1/ListSecurityCenterServicesRequest.php | 175 -- .../V1/ListSecurityCenterServicesResponse.php | 101 - ...ityHealthAnalyticsCustomModulesRequest.php | 174 -- ...tyHealthAnalyticsCustomModulesResponse.php | 101 - .../V1/SecurityCenterService.php | 345 ---- .../SecurityCenterService/EnablementState.php | 73 - .../SecurityCenterService/ModuleSettings.php | 128 -- .../SecurityHealthAnalyticsCustomModule.php | 339 ---- .../EnablementState.php | 75 - ...rityHealthAnalyticsCustomModuleRequest.php | 193 -- .../SimulatedResource.php | 168 -- ...ityHealthAnalyticsCustomModuleResponse.php | 78 - .../SimulatedResult.php | 147 -- .../V1/SimulatedFinding.php | 454 ----- .../V1/SimulatedFinding/FindingClass.php | 95 - .../V1/SimulatedFinding/Severity.php | 116 -- .../V1/SimulatedFinding/State.php | 65 - ...ventThreatDetectionCustomModuleRequest.php | 214 -- .../V1/UpdateSecurityCenterServiceRequest.php | 205 -- ...rityHealthAnalyticsCustomModuleRequest.php | 209 -- ...ventThreatDetectionCustomModuleRequest.php | 147 -- ...entThreatDetectionCustomModuleResponse.php | 71 - .../CustomModuleValidationError.php | 213 -- .../Position.php | 104 - ...e_event_threat_detection_custom_module.php | 83 - ...ecurity_health_analytics_custom_module.php | 84 - ...e_event_threat_detection_custom_module.php | 81 - ...ecurity_health_analytics_custom_module.php | 81 - ...e_event_threat_detection_custom_module.php | 87 - ...ecurity_health_analytics_custom_module.php | 82 - ...t_event_threat_detection_custom_module.php | 81 - .../get_location.php | 57 - .../get_security_center_service.php | 89 - ...ecurity_health_analytics_custom_module.php | 75 - ..._event_threat_detection_custom_modules.php | 87 - ...curity_health_analytics_custom_modules.php | 88 - ..._event_threat_detection_custom_modules.php | 88 - ...curity_health_analytics_custom_modules.php | 90 - ..._event_threat_detection_custom_modules.php | 85 - .../list_locations.php | 62 - .../list_security_center_services.php | 86 - ...curity_health_analytics_custom_modules.php | 86 - ...ecurity_health_analytics_custom_module.php | 86 - ...e_event_threat_detection_custom_module.php | 67 - .../update_security_center_service.php | 62 - ...ecurity_health_analytics_custom_module.php | 66 - ...e_event_threat_detection_custom_module.php | 88 - .../Client/SecurityCenterManagementClient.php | 1371 ------------- .../v1/src/V1/gapic_metadata.json | 133 -- ...urity_center_management_client_config.json | 160 -- ...ty_center_management_descriptor_config.php | 398 ---- ...y_center_management_rest_client_config.php | 545 ----- .../SecurityCenterManagementClientTest.php | 1774 ----------------- 85 files changed, 24 insertions(+), 14663 deletions(-) delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/GPBMetadata/Google/Cloud/Securitycentermanagement/V1/SecurityCenterManagement.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php delete mode 100644 owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php diff --git a/SecurityCenterManagement/src/V1/UpdateSecurityCenterServiceRequest.php b/SecurityCenterManagement/src/V1/UpdateSecurityCenterServiceRequest.php index 1a92796d7465..9f8693b99a17 100644 --- a/SecurityCenterManagement/src/V1/UpdateSecurityCenterServiceRequest.php +++ b/SecurityCenterManagement/src/V1/UpdateSecurityCenterServiceRequest.php @@ -30,13 +30,13 @@ class UpdateSecurityCenterServiceRequest extends \Google\Protobuf\Internal\Messa */ protected $update_mask = null; /** - * Optional. When set to true, only validations (including IAM checks) will + * Optional. When set to true, only validations (including IAM checks) will be * done for the request (service will not be updated). An OK response - * indicates the request is valid while an error response indicates the - * request is invalid. Note that a subsequent request to actually update the - * service could still fail because 1. the state could have changed (e.g. IAM - * permission lost) or - * 2. A failure occurred while trying to delete the module. + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. * * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -73,13 +73,13 @@ public static function build(\Google\Cloud\SecurityCenterManagement\V1\SecurityC * * "intended_enablement_state" * * "modules" * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will + * Optional. When set to true, only validations (including IAM checks) will be * done for the request (service will not be updated). An OK response - * indicates the request is valid while an error response indicates the - * request is invalid. Note that a subsequent request to actually update the - * service could still fail because 1. the state could have changed (e.g. IAM - * permission lost) or - * 2. A failure occurred while trying to delete the module. + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. * } */ public function __construct($data = NULL) { @@ -164,13 +164,13 @@ public function setUpdateMask($var) } /** - * Optional. When set to true, only validations (including IAM checks) will + * Optional. When set to true, only validations (including IAM checks) will be * done for the request (service will not be updated). An OK response - * indicates the request is valid while an error response indicates the - * request is invalid. Note that a subsequent request to actually update the - * service could still fail because 1. the state could have changed (e.g. IAM - * permission lost) or - * 2. A failure occurred while trying to delete the module. + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. * * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool @@ -181,13 +181,13 @@ public function getValidateOnly() } /** - * Optional. When set to true, only validations (including IAM checks) will + * Optional. When set to true, only validations (including IAM checks) will be * done for the request (service will not be updated). An OK response - * indicates the request is valid while an error response indicates the - * request is invalid. Note that a subsequent request to actually update the - * service could still fail because 1. the state could have changed (e.g. IAM - * permission lost) or - * 2. A failure occurred while trying to delete the module. + * indicates that the request is valid, while an error response indicates that + * the request is invalid. Note that a subsequent request to actually update + * the service could still fail for one of the following reasons: + * - The state could have changed (e.g. IAM permission lost). + * - A failure occurred while trying to delete the module. * * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/GPBMetadata/Google/Cloud/Securitycentermanagement/V1/SecurityCenterManagement.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/GPBMetadata/Google/Cloud/Securitycentermanagement/V1/SecurityCenterManagement.php deleted file mode 100644 index 993d200288e858a980171037b2a842fc9b21faf5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27496 zcmdr#TWllObsmz^YOnU8y~%oIIY#JNudS7}fJwd|^mrr& zQoS1AY;J8CX1rA2ZB(j;nTW@y7UK(xEAi}9ZslHBYSo)&$w-Fubkt|i~&2rK* zN=>t3@0X04ZJ4{oT5;Rhh0n>oYtFR-yI459nxI$_sugz)t5GZ&@tLKGdBZN2i*|8i zh9cOQBnUS09T04+U3&zfQnhGVadFQiC1Tzo0=*f;Nnoe&Uwj%)Y&FE#0mVm2l#YY*9>2wQ`H{-V1G~C$ZanrDy zX6+G5Hvw?qeA;Nk&P=1Sk*U?{gbVeWl};b-=@3Mxg_G3^@K$Zjbj7HaCybrqUZrlT zEnPOavPlz}EAE0uY%JA5();qr9FYOTvbzoYC`;)+=Zn^JM?jkgsg@M@>d?DV0n4$A zyA64y%Z<`T9;Dw?kp0Sj!`R3^-{>GeY5`Y%ro#0-Q!YE|Jq=D|)KN&Ho)4g3{3{LR zy5>IcCYhjZsEWhC{*9|7uN`7gC zU#b*$iMMM|)#KOh=GUm71DB9Ah;s3Z!h<>&8RlJ3A%4gE{L3w>C;X})+F5T4W#Bi6 z?V62Jl6aJ+#V_2+;o2b9qyb`O-|N4J(0Q*D%^T)krDWi9C`O$0uol-wPfkSN&J5sN z=q@7gTG=QUj9PKCN*#WIATov{aNn8KVuB$G7fqrq+CxNOZf_u1|qLW9i)#6P1z#5vpt+Zjxa z2s}d83CHlsswjR4ow1mx3Z;5&tFk@ZPZwTjS;$-s#WnJB1f5|N||~_mz^5A1D{4Ga|^TC<=hJVsR7L=*n+8{ z2tI`drgC|*d}=6~{@cjy%$pH(v!i2VHVQt`Nl7Buf!usJLFBL8%dtkz2` ziAcUEJ{~yP9!tWw|A19oJrD5oR=rv_O!$g@I4Ydwy18AfRbCJzxc@vN%&|KKlf2ZY z&bR$u|K15So)xZ0@NL#8R_&b(Z&?i~9u{Jz}sm8a<-=!cmmorRADO z%OmN3irvoqLkz75L9trHRciROTxE0kHO;MDptQYq&Q`dnY>CfGWITL3vB_u|AeyTtJ9^Z`YqQYQw}U zP?Oa3f7Q?jj<7ka0cE6te^o;%hnKQSYym4s9<|mRuY@n4vo+&+yWrX|ajz%!-_p>H z8AC~qLX6LPQeh#)-gqAUTLb8#gweJOEPm%pH_lYxXFG<6r{x79K~}q{ph2$c$#6+f zkjQX{(I7N=?1E9QKp%zX#VnM7U7amLPX@xQSzx}ACch^q@{k$7o0&%+7A`d`C`fDx zx5Vocl>TGH>mz1>or9q_IgF-13$gJtvF@_r<3|XILJR>J5=|6YD={?w?a79}F5|W3 zLS1*Uj@>5%FLhDkF8!T8bjqDH;>!>!OfW1+=UItAm^vpM0qGGWNb85Wj*^qE)|+;t zY17Cun3@r{hu1}J%nA0#A_bLi7$t^e8=VtP7KkKOC_BL7Nu)YDBGF3Bb8rmN8XB;S zJ%eRHCl^Vf&LZ&0Hz05K za|Bl)UYqrXVcHewJFs}UbVMrsz!OUhGV48zETRGNMQcRS@KrQKYvBTE85x#EsAttm z2W=Tiq9H%y83$Njw?LGO?TP0gkD~#>Nj!|+o6oM168A}8@e2j+Bz&El%*;XUJAh)d zxtUogd=cuOhcU(K{7@91K+(CyCx&AB*EEzQX-%F_5Q4mqi18&~ss@n+GPQZ!)kvb8 zpnY9KSLJuY^Rk~uqrxYIcvPWW^YY3i!PCw;*kAK}lT1g5HPrqei0E%LlqMol-P4b~ zupqs^0tvH(z=aJJJ$W*>pspq%`X5Hn)k)KUsHH&HkHofL*3iZSl6J>^Xm`zy#Gwct zL8rlES7RC(ZTjalpEJw*T`7}ZlZzH6nq_>g&AOh4FC&t8OvGE zi%r927(*u5bedV=4+hYXL)&zvR)#4|Ywk6G&p1M(bv!=rqLB7hX(I;@p#hS_Z`Vzh z(4NFAsE>{0$Rz1Z>O+E-@I>8DR>GOVMe%d!98cj~xoJP`#8|x@FcHJ6uB?85?t1b#yXKiaeg>W1Vgf4A^CrV5DQtz(r)9rf;FIL| z3S{5s^KJL<8Ax674y5iBI|Dh;QzwZvGOnV7rH4@;6&WbYxpp%oNS8B{E4j5SB+-yk z=N9;15xoa#I2hq6_jd6;=&tG9!c=ZyrZ72|$>)7JJ`lGuyPVCe0CDHg>9y6lh3s-> zA~y%+0HpfwMMLws{N&=obZ%yKIkS>mT!5tiEE-&#$Y+<=*cUO<3CT}R7P8CBi_1fO zgb_=N`IXh>Y+)_8ILGelPk&Flow=={OCn&iJ`v}vGZ+)r`5|}rzhxM}%!2eWs4NeX zTxZ}L{^>t5NtQ#8;6r@h@Px=od=(=Yy(^oSX& z&^wO{$5B5Y@Us9N6q2I&6P*WvB|&Mp=%fj5*YAyzXh!OM+F;==TYqnw#3p{p*E(^! zBi$bvz7B2Czlfp7y;d(VG7Od5XOGYvb!I1F(7};7_ZA>Fk+?{8s8AM4ELwCYLPY0BdsXr*$$>1`O2 zsqTsgieG}Jo5MaSEfw9Td=LCm=N{A-HFVuQ2Mm*&5Zkt=xxt0j16QK|{s4-H5!J3< zP>B;7^q5;lXlyXNL`P_kp;>7s85Yy_+sqzW>wR58@*!B-1tOA0vOwfS8?EJpiW6=$ zXg_;;_@wM$O=|xDlav_knjpR-dcFZBDIQqJJK6y-`SIWPqqj5PjdoFlF9asQ;wTuz zDe>_jX@m%j1U0Ep)@YLi3pBmKSZhhvdx~%D-cVkp;$gSwU)9h!b=_fn7Y^;CzBmMi z4-=2aaQ6&fIsE)Nw45dPz@yGSx+J4TBGf$AJ%`gd!u%x`$;v;N<>K6PYOO z=Eqn%kf)51_#Yw?VI|La!alc=?s-=IcO&Qu8)(Q<)O))so%(Wcn!pk;(X zk_FxX|2VLVjWA@{b+q|~EDKmk-g_31+>Eo}%itv0+(MQGJ=WpCiNzm7SpfY>I*^j3 zxAz);9>x^KTLl|V3erYDP0J!qy2vtNG8fSQB!;fa)6f0hD;nyjJt7OBlhclS@^MEM z89z|N`bT^*w6U_JMK$tz1l{fKFZr(H_jog2T99HmRKcE0Y834q#vXV`gv=C7o7=oX zD@l1jOLYsL(X7{I@A$N);UctfFBr zOAeo>#=jCn*Jx(0att1C%DX*f;GEwh3O?ZoIGEn)pNqVe;YayD@$G+pE%H(XKTaO~ ze32dRzv+~yW3ES}#-IpRVb}UHUUCB!Rp_x`egv<%VS4NM<3Ps$9YslZBTeW|z-c@D zQF(<>1TEBIO&&v5K{)y^g9gwCV!iSwgZK{8R}+46?7)#f1=?2n>M(`;Da-)rD?`R_ zMbW6+We3RJ!cWSJMHZ%zxIzWADVn3zHA<@UozU$%i_2Nr3p@W9YK<(ORtFb)|v!NS>dMzLiNZ(;64d z2ss!}gZw{6^sYJkwDj5FbyM$FSWrOvyx!daB99t>zYksZ)>T1HL_zPQf%Zu6ek1l) z=DMW9jW^jZfRHoRRQdisnrcwTEeRme1@|N`wDm7&sk%COZ3CP0`w;M* z)l{c0AU1ZNM*M40bXofNxr)1$1}fCP!%?@EI5@_+P&&sI4<&(qwmK$?3G4~`}Guab<5qw>@py$UCU-Ff7( zvR{kSnbyYES9O`5hj4;HE+Xv)`;;!<_D}_m|0jwPq&RXK2w{T_3m4>dL=Cb~6NS!- zDgv%4pY|0*|Eb{x8I^E)V4+-E7ddTk9i#wo73bX~26%W^uP&5M{7w{&yZcjNE3kqQ ztH2e)@5Ko^{S{Bg%aL}F`4WKq2kWP@n`BzaB-GsLg~N8L+TI^HB<* zkgr1JED4v}^ml#zt?y_!>o%B9Zr%uE#ria!asz6c`AHlSTc5*^x#0v`a2QqiwHSLc z{IDk!X1bP2&zdk_0kjZrQ7t$qVc>%Pg3o!s8o?`Wz8+c7zJAcUu)z=)9wsS2*r)K5 zZgP*O20q~U52ENIal0Wz;T3r~Nq`g5@8aPR{T)y1%CY7^pB=JmQhGVo9OSBH;0S9D z_s|m1@S8Dozueg=mENNq#9m16lhCMokmusm!-hQOK{NAjM)dBu?6lOOul1_l6~``# z&D6W-{^fAuH~P^1talXZ5flQm9K>Fz)w`fpS7r36r3v+C(bTil?aHhU>_AZf0S~^> z29KNqeojkO6p3n^eMp>8ho+MpO}{SMVe*U$2w`2M41WsdGjgW|ReYozM4`-`8chCZ zHO3s-@uSrkb5X~RR%6WhbSGN<8_dgP55uX<%Vl8-X()8ihT>aGHA8AS)CdGtZ`IqWB2@z~Sn)5^`GUt&21G(Zj_-{;?x|{7Mv!kSeS#%Pjn1 zdA@gsA~>(`Q}98+xaoY|SBg7=;FVOT3avda)`cK~>#z=sg&_Fi08tzsC-I6Ce>sNk zW+_iwQD6n;1%MHvIJOb|7u3hjFDd$tmbRot-;AV|siF$@`4$9bLSl`VUu3@3>D=gg zHN|@GVrg4+ipJI%o0($gTmrELs6=N2?}&5csW&o*1M(6*Bi-?-{BLCvJGR}h(#hnl zTerADJ3rY`Y}z~Q4MkVrSIFUqJI&n*==zMq4=_sG{=_|bKKEflIy?uvM1FE*Nn77x zKcOJrbpgMjzg>6s?WaEp#JOIISrAUcRgeBIly&-Ph z;4e^e-k{{)#Rj}E=XT^l1~{Fjkkjc-pwnr%JM%I0!A?~AMX>1lmHs*Y!T@~Dt1%M4 zr+zzAKsRJ@PSZCGIM^-;YY2Sfz-B)mbqRZ?mI diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php deleted file mode 100644 index f10cdbc65818..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateEventThreatDetectionCustomModuleRequest.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - */ -class CreateEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of parent for the module. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The module to create. The - * event_threat_detection_custom_module.name will be ignored and server - * generated. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_threat_detection_custom_module = null; - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred during creation of the module. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. Name of parent for the module. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule Required. The module to create. The - * event_threat_detection_custom_module.name will be ignored and server - * generated. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\CreateEventThreatDetectionCustomModuleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule): self - { - return (new self()) - ->setParent($parent) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of parent for the module. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * @type \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $event_threat_detection_custom_module - * Required. The module to create. The - * event_threat_detection_custom_module.name will be ignored and server - * generated. - * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred during creation of the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of parent for the module. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of parent for the module. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The module to create. The - * event_threat_detection_custom_module.name will be ignored and server - * generated. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule|null - */ - public function getEventThreatDetectionCustomModule() - { - return $this->event_threat_detection_custom_module; - } - - public function hasEventThreatDetectionCustomModule() - { - return isset($this->event_threat_detection_custom_module); - } - - public function clearEventThreatDetectionCustomModule() - { - unset($this->event_threat_detection_custom_module); - } - - /** - * Required. The module to create. The - * event_threat_detection_custom_module.name will be ignored and server - * generated. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $var - * @return $this - */ - public function setEventThreatDetectionCustomModule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); - $this->event_threat_detection_custom_module = $var; - - return $this; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred during creation of the module. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred during creation of the module. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php deleted file mode 100644 index 582fa03482dc..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CreateSecurityHealthAnalyticsCustomModuleRequest.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - */ -class CreateSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent organization, folder, or project of the - * module, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $security_health_analytics_custom_module = null; - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because: - * 1. the state could have changed (e.g. IAM permission lost) or - * 2. A failure occurred during creation of the module. - * Defaults to false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. Name of the parent organization, folder, or project of the - * module, specified in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule Required. The resource being created - * - * @return \Google\Cloud\SecurityCenterManagement\V1\CreateSecurityHealthAnalyticsCustomModuleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule): self - { - return (new self()) - ->setParent($parent) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the parent organization, folder, or project of the - * module, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @type \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $security_health_analytics_custom_module - * Required. The resource being created - * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because: - * 1. the state could have changed (e.g. IAM permission lost) or - * 2. A failure occurred during creation of the module. - * Defaults to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent organization, folder, or project of the - * module, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the parent organization, folder, or project of the - * module, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule|null - */ - public function getSecurityHealthAnalyticsCustomModule() - { - return $this->security_health_analytics_custom_module; - } - - public function hasSecurityHealthAnalyticsCustomModule() - { - return isset($this->security_health_analytics_custom_module); - } - - public function clearSecurityHealthAnalyticsCustomModule() - { - unset($this->security_health_analytics_custom_module); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $var - * @return $this - */ - public function setSecurityHealthAnalyticsCustomModule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); - $this->security_health_analytics_custom_module = $var; - - return $this; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because: - * 1. the state could have changed (e.g. IAM permission lost) or - * 2. A failure occurred during creation of the module. - * Defaults to false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because: - * 1. the state could have changed (e.g. IAM permission lost) or - * 2. A failure occurred during creation of the module. - * Defaults to false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php deleted file mode 100644 index 77cd3e176778..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.securitycentermanagement.v1.CustomConfig - */ -class CustomConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The CEL expression to evaluate to produce findings. When the - * expression evaluates to true against a resource, a finding is generated. - * - * Generated from protobuf field .google.type.Expr predicate = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $predicate = null; - /** - * Optional. Custom output properties. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_output = null; - /** - * Optional. The Cloud Asset Inventory resource types that the custom module - * operates on. For information about resource types, see [Supported asset - * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - * Each custom module can specify up to 5 resource types. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_selector = null; - /** - * Optional. The severity to assign to findings generated by the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $severity = 0; - /** - * Optional. Text that describes the vulnerability or misconfiguration that - * the custom module detects. This explanation is returned with each finding - * instance to help investigators understand the detected issue. The text must - * be enclosed in quotation marks. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. An explanation of the recommended steps that security teams can - * take to resolve the detected issue. This explanation is returned with each - * finding generated by this module in the `nextSteps` property of the finding - * JSON. - * - * Generated from protobuf field string recommendation = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $recommendation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Expr $predicate - * Optional. The CEL expression to evaluate to produce findings. When the - * expression evaluates to true against a resource, a finding is generated. - * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec $custom_output - * Optional. Custom output properties. - * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector $resource_selector - * Optional. The Cloud Asset Inventory resource types that the custom module - * operates on. For information about resource types, see [Supported asset - * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - * Each custom module can specify up to 5 resource types. - * @type int $severity - * Optional. The severity to assign to findings generated by the module. - * @type string $description - * Optional. Text that describes the vulnerability or misconfiguration that - * the custom module detects. This explanation is returned with each finding - * instance to help investigators understand the detected issue. The text must - * be enclosed in quotation marks. - * @type string $recommendation - * Optional. An explanation of the recommended steps that security teams can - * take to resolve the detected issue. This explanation is returned with each - * finding generated by this module in the `nextSteps` property of the finding - * JSON. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The CEL expression to evaluate to produce findings. When the - * expression evaluates to true against a resource, a finding is generated. - * - * Generated from protobuf field .google.type.Expr predicate = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Expr|null - */ - public function getPredicate() - { - return $this->predicate; - } - - public function hasPredicate() - { - return isset($this->predicate); - } - - public function clearPredicate() - { - unset($this->predicate); - } - - /** - * Optional. The CEL expression to evaluate to produce findings. When the - * expression evaluates to true against a resource, a finding is generated. - * - * Generated from protobuf field .google.type.Expr predicate = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Expr $var - * @return $this - */ - public function setPredicate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Expr::class); - $this->predicate = $var; - - return $this; - } - - /** - * Optional. Custom output properties. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec|null - */ - public function getCustomOutput() - { - return $this->custom_output; - } - - public function hasCustomOutput() - { - return isset($this->custom_output); - } - - public function clearCustomOutput() - { - unset($this->custom_output); - } - - /** - * Optional. Custom output properties. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec $var - * @return $this - */ - public function setCustomOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec::class); - $this->custom_output = $var; - - return $this; - } - - /** - * Optional. The Cloud Asset Inventory resource types that the custom module - * operates on. For information about resource types, see [Supported asset - * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - * Each custom module can specify up to 5 resource types. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector|null - */ - public function getResourceSelector() - { - return $this->resource_selector; - } - - public function hasResourceSelector() - { - return isset($this->resource_selector); - } - - public function clearResourceSelector() - { - unset($this->resource_selector); - } - - /** - * Optional. The Cloud Asset Inventory resource types that the custom module - * operates on. For information about resource types, see [Supported asset - * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - * Each custom module can specify up to 5 resource types. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector $var - * @return $this - */ - public function setResourceSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\ResourceSelector::class); - $this->resource_selector = $var; - - return $this; - } - - /** - * Optional. The severity to assign to findings generated by the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Optional. The severity to assign to findings generated by the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Optional. Text that describes the vulnerability or misconfiguration that - * the custom module detects. This explanation is returned with each finding - * instance to help investigators understand the detected issue. The text must - * be enclosed in quotation marks. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Text that describes the vulnerability or misconfiguration that - * the custom module detects. This explanation is returned with each finding - * instance to help investigators understand the detected issue. The text must - * be enclosed in quotation marks. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. An explanation of the recommended steps that security teams can - * take to resolve the detected issue. This explanation is returned with each - * finding generated by this module in the `nextSteps` property of the finding - * JSON. - * - * Generated from protobuf field string recommendation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRecommendation() - { - return $this->recommendation; - } - - /** - * Optional. An explanation of the recommended steps that security teams can - * take to resolve the detected issue. This explanation is returned with each - * finding generated by this module in the `nextSteps` property of the finding - * JSON. - * - * Generated from protobuf field string recommendation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRecommendation($var) - { - GPBUtil::checkString($var, True); - $this->recommendation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php deleted file mode 100644 index 089a7a7ac196..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - */ -class CustomOutputSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of custom output properties to add to the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property properties = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec\Property>|\Google\Protobuf\Internal\RepeatedField $properties - * Optional. A list of custom output properties to add to the finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of custom output properties to add to the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property properties = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A list of custom output properties to add to the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property properties = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec\Property>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig\CustomOutputSpec\Property::class); - $this->properties = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomOutputSpec::class, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig_CustomOutputSpec::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php deleted file mode 100644 index 8d1f277eb048..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/CustomOutputSpec/Property.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - */ -class Property extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the property for the custom output. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. The CEL expression for the custom output. A resource property - * can be specified to return the value of the property or a text string - * enclosed in quotation marks. - * - * Generated from protobuf field .google.type.Expr value_expression = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value_expression = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. Name of the property for the custom output. - * @type \Google\Type\Expr $value_expression - * Optional. The CEL expression for the custom output. A resource property - * can be specified to return the value of the property or a text string - * enclosed in quotation marks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the property for the custom output. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. Name of the property for the custom output. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The CEL expression for the custom output. A resource property - * can be specified to return the value of the property or a text string - * enclosed in quotation marks. - * - * Generated from protobuf field .google.type.Expr value_expression = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Expr|null - */ - public function getValueExpression() - { - return $this->value_expression; - } - - public function hasValueExpression() - { - return isset($this->value_expression); - } - - public function clearValueExpression() - { - unset($this->value_expression); - } - - /** - * Optional. The CEL expression for the custom output. A resource property - * can be specified to return the value of the property or a text string - * enclosed in quotation marks. - * - * Generated from protobuf field .google.type.Expr value_expression = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Expr $var - * @return $this - */ - public function setValueExpression($var) - { - GPBUtil::checkMessage($var, \Google\Type\Expr::class); - $this->value_expression = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Property::class, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig_CustomOutputSpec_Property::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php deleted file mode 100644 index bcfbea5cd70a..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/ResourceSelector.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - */ -class ResourceSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The resource types to run the detector on. - * - * Generated from protobuf field repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $resource_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_types - * Optional. The resource types to run the detector on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The resource types to run the detector on. - * - * Generated from protobuf field repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceTypes() - { - return $this->resource_types; - } - - /** - * Optional. The resource types to run the detector on. - * - * Generated from protobuf field repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_types = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceSelector::class, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig_ResourceSelector::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php deleted file mode 100644 index 0b778edf55c5..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/CustomConfig/Severity.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.securitycentermanagement.v1.CustomConfig.Severity - */ -class Severity -{ - /** - * Unspecified severity. - * - * 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\SecurityCenterManagement\V1\CustomConfig_Severity::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php deleted file mode 100644 index 4f08f7d5180f..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteEventThreatDetectionCustomModuleRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - */ -class DeleteEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $name Required. The resource name of the ETD custom module. - * - * Its format is: - * - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. Please see - * {@see SecurityCenterManagementClient::eventThreatDetectionCustomModuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\DeleteEventThreatDetectionCustomModuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * 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 resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * 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; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php deleted file mode 100644 index ccb2146822e6..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/DeleteSecurityHealthAnalyticsCustomModuleRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - */ -class DeleteSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the SHA custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $name Required. The resource name of the SHA custom module. - * - * Its format is: - * - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. Please see - * {@see SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\DeleteSecurityHealthAnalyticsCustomModuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the SHA custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the SHA custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * - * 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 resource name of the SHA custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * - * 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; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php deleted file mode 100644 index 659b3cd6a15e..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - */ -class EffectiveEventThreatDetectionCustomModule extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Config for the effective module. - * - * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $config = null; - /** - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enablement_state = 0; - /** - * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = ''; - /** - * Output only. The human readable name to be displayed for the module. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The description for the module. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * @type \Google\Protobuf\Struct $config - * Output only. Config for the effective module. - * @type int $enablement_state - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * @type string $type - * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * @type string $display_name - * Output only. The human readable name to be displayed for the module. - * @type string $description - * Output only. The description for the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Config for the effective module. - * - * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Struct|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Output only. Config for the effective module. - * - * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->config = $var; - - return $this; - } - - /** - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEnablementState() - { - return $this->enablement_state; - } - - /** - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule\EnablementState::class); - $this->enablement_state = $var; - - return $this; - } - - /** - * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. The human readable name to be displayed for the module. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The human readable name to be displayed for the module. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The description for the module. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. The description for the module. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php deleted file mode 100644 index dca4aa3f2033..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveEventThreatDetectionCustomModule/EnablementState.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState - */ -class EnablementState -{ - /** - * Unspecified enablement state. - * - * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; - */ - const ENABLEMENT_STATE_UNSPECIFIED = 0; - /** - * The module is enabled at the given level. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The module is disabled at the given level. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule_EnablementState::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php deleted file mode 100644 index 1345238cbc2f..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - */ -class EffectiveSecurityHealthAnalyticsCustomModule extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The user-specified configuration for the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $custom_config = null; - /** - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enablement_state = 0; - /** - * Output only. The display name for the custom module. The name must be - * between 1 and 128 characters, start with a lowercase letter, and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $custom_config - * Output only. The user-specified configuration for the module. - * @type int $enablement_state - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * @type string $display_name - * Output only. The display name for the custom module. The name must be - * between 1 and 128 characters, start with a lowercase letter, and contain - * alphanumeric characters or underscores only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The user-specified configuration for the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig|null - */ - public function getCustomConfig() - { - return $this->custom_config; - } - - public function hasCustomConfig() - { - return isset($this->custom_config); - } - - public function clearCustomConfig() - { - unset($this->custom_config); - } - - /** - * Output only. The user-specified configuration for the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $var - * @return $this - */ - public function setCustomConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig::class); - $this->custom_config = $var; - - return $this; - } - - /** - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEnablementState() - { - return $this->enablement_state; - } - - /** - * Output only. The effective state of enablement for the module at the given - * level of the hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule\EnablementState::class); - $this->enablement_state = $var; - - return $this; - } - - /** - * Output only. The display name for the custom module. The name must be - * between 1 and 128 characters, start with a lowercase letter, and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The display name for the custom module. The name must be - * between 1 and 128 characters, start with a lowercase letter, and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php deleted file mode 100644 index 5dcb86d363a4..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EffectiveSecurityHealthAnalyticsCustomModule/EnablementState.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState - */ -class EnablementState -{ - /** - * Unspecified enablement state. - * - * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; - */ - const ENABLEMENT_STATE_UNSPECIFIED = 0; - /** - * The module is enabled at the given level. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The module is disabled at the given level. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule_EnablementState::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php deleted file mode 100644 index c6dc2492db74..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule.php +++ /dev/null @@ -1,401 +0,0 @@ -google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - */ -class EventThreatDetectionCustomModule extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. Config for the module. For the resident module, its config value - * is defined at this level. For the inherited module, its config value is - * inherited from the ancestor module. - * - * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config = null; - /** - * Output only. The closest ancestor module that this module inherits the - * enablement state from. If empty, indicates that the custom module was - * created in the requesting parent organization, folder, or project. The - * format is the same as the EventThreatDetectionCustomModule resource name. - * - * Generated from protobuf field string ancestor_module = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $ancestor_module = ''; - /** - * Optional. The state of enablement for the module at the given level of the - * hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState enablement_state = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enablement_state = 0; - /** - * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * - * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = ''; - /** - * Optional. The human readable name to be displayed for the module. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. The description for the module. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The time the module was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The editor the module was last updated by. - * - * Generated from protobuf field string last_editor = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_editor = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * @type \Google\Protobuf\Struct $config - * Optional. Config for the module. For the resident module, its config value - * is defined at this level. For the inherited module, its config value is - * inherited from the ancestor module. - * @type string $ancestor_module - * Output only. The closest ancestor module that this module inherits the - * enablement state from. If empty, indicates that the custom module was - * created in the requesting parent organization, folder, or project. The - * format is the same as the EventThreatDetectionCustomModule resource name. - * @type int $enablement_state - * Optional. The state of enablement for the module at the given level of the - * hierarchy. - * @type string $type - * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * @type string $display_name - * Optional. The human readable name to be displayed for the module. - * @type string $description - * Optional. The description for the module. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the module was last updated. - * @type string $last_editor - * Output only. The editor the module was last updated by. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Config for the module. For the resident module, its config value - * is defined at this level. For the inherited module, its config value is - * inherited from the ancestor module. - * - * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Optional. Config for the module. For the resident module, its config value - * is defined at this level. For the inherited module, its config value is - * inherited from the ancestor module. - * - * Generated from protobuf field .google.protobuf.Struct config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->config = $var; - - return $this; - } - - /** - * Output only. The closest ancestor module that this module inherits the - * enablement state from. If empty, indicates that the custom module was - * created in the requesting parent organization, folder, or project. The - * format is the same as the EventThreatDetectionCustomModule resource name. - * - * Generated from protobuf field string ancestor_module = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getAncestorModule() - { - return $this->ancestor_module; - } - - /** - * Output only. The closest ancestor module that this module inherits the - * enablement state from. If empty, indicates that the custom module was - * created in the requesting parent organization, folder, or project. The - * format is the same as the EventThreatDetectionCustomModule resource name. - * - * Generated from protobuf field string ancestor_module = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAncestorModule($var) - { - GPBUtil::checkString($var, True); - $this->ancestor_module = $var; - - return $this; - } - - /** - * Optional. The state of enablement for the module at the given level of the - * hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState enablement_state = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEnablementState() - { - return $this->enablement_state; - } - - /** - * Optional. The state of enablement for the module at the given level of the - * hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState enablement_state = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule\EnablementState::class); - $this->enablement_state = $var; - - return $this; - } - - /** - * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * - * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. - * - * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Optional. The human readable name to be displayed for the module. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. The human readable name to be displayed for the module. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. The description for the module. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description for the module. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The time the module was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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 time the module was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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. The editor the module was last updated by. - * - * Generated from protobuf field string last_editor = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLastEditor() - { - return $this->last_editor; - } - - /** - * Output only. The editor the module was last updated by. - * - * Generated from protobuf field string last_editor = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLastEditor($var) - { - GPBUtil::checkString($var, True); - $this->last_editor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php deleted file mode 100644 index 3fd3c6e9c1dc..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/EventThreatDetectionCustomModule/EnablementState.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState - */ -class EnablementState -{ - /** - * Unspecified enablement state. - * - * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; - */ - const ENABLEMENT_STATE_UNSPECIFIED = 0; - /** - * The module is enabled at the given level. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The module is disabled at the given level. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - /** - * State is inherited from an ancestor module. The module will either - * be effectively ENABLED or DISABLED based on its closest non-inherited - * ancestor module in the CRM hierarchy. Attempting to set a top level - * module (module with no parent) to the INHERITED state will result in an - * error. - * - * Generated from protobuf enum INHERITED = 3; - */ - const INHERITED = 3; - - private static $valueToName = [ - self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - self::INHERITED => 'INHERITED', - ]; - - 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule_EnablementState::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php deleted file mode 100644 index 34bdee84cc97..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveEventThreatDetectionCustomModuleRequest.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - */ -class GetEffectiveEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the ETD custom module. - * - * Its format is: - * - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. Please see - * {@see SecurityCenterManagementClient::effectiveEventThreatDetectionCustomModuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\GetEffectiveEventThreatDetectionCustomModuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * - * 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 resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php deleted file mode 100644 index e784437bc70f..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - */ -class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the custom module, specified in one of - * the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the custom module, specified in one of - * the following formats: - * - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * Please see {@see SecurityCenterManagementClient::effectiveSecurityHealthAnalyticsCustomModuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the custom module, specified in one of - * the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the custom module, specified in one of - * the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * - * 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 full resource name of the custom module, specified in one of - * the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php deleted file mode 100644 index e280d8f676fa..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetEventThreatDetectionCustomModuleRequest.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - */ -class GetEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the ETD custom module. - * - * Its format is: - * - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. Please see - * {@see SecurityCenterManagementClient::eventThreatDetectionCustomModuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\GetEventThreatDetectionCustomModuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * 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 resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php deleted file mode 100644 index d84834c46546..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityCenterServiceRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - */ -class GetSecurityCenterServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Security Command Center service to retrieve. - * Formats: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Security Command Center service to retrieve. - * - * Formats: - * - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * - * The possible values for id {service} are: - * - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * Please see {@see SecurityCenterManagementClient::securityCenterServiceName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\GetSecurityCenterServiceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Security Command Center service to retrieve. - * Formats: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Security Command Center service to retrieve. - * Formats: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * - * 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 Security Command Center service to retrieve. - * Formats: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php deleted file mode 100644 index 5069157c7578..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/GetSecurityHealthAnalyticsCustomModuleRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - */ -class GetSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\GetSecurityHealthAnalyticsCustomModuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php deleted file mode 100644 index 6ea98488fc72..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - */ -class ListDescendantEventThreatDetectionCustomModulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\ListDescendantEventThreatDetectionCustomModulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php deleted file mode 100644 index 91e329e5f403..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantEventThreatDetectionCustomModulesResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - */ -class ListDescendantEventThreatDetectionCustomModulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of EventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - */ - private $event_threat_detection_custom_modules; - /** - * A token identifying a page of results the server should return. - * - * 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\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $event_threat_detection_custom_modules - * The list of EventThreatDetectionCustomModules - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of EventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventThreatDetectionCustomModules() - { - return $this->event_threat_detection_custom_modules; - } - - /** - * The list of EventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventThreatDetectionCustomModules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); - $this->event_threat_detection_custom_modules = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php deleted file mode 100644 index 4db8d6b92e86..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - */ -class ListDescendantSecurityHealthAnalyticsCustomModulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php deleted file mode 100644 index b28b46e3c747..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListDescendantSecurityHealthAnalyticsCustomModulesResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - */ -class ListDescendantSecurityHealthAnalyticsCustomModulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of SecurityHealthAnalyticsCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - */ - private $security_health_analytics_custom_modules; - /** - * A token identifying a page of results the server should return. - * - * 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\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $security_health_analytics_custom_modules - * The list of SecurityHealthAnalyticsCustomModules - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of SecurityHealthAnalyticsCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityHealthAnalyticsCustomModules() - { - return $this->security_health_analytics_custom_modules; - } - - /** - * The list of SecurityHealthAnalyticsCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityHealthAnalyticsCustomModules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); - $this->security_health_analytics_custom_modules = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php deleted file mode 100644 index 40094fd46acf..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - */ -class ListEffectiveEventThreatDetectionCustomModulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value returned by the last call indicating a continuation - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\ListEffectiveEventThreatDetectionCustomModulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @type string $page_token - * Optional. The value returned by the last call indicating a continuation - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The value returned by the last call indicating a continuation - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The value returned by the last call indicating a continuation - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php deleted file mode 100644 index 66317828ab95..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveEventThreatDetectionCustomModulesResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - */ -class ListEffectiveEventThreatDetectionCustomModulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of EffectiveEventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule effective_event_threat_detection_custom_modules = 1; - */ - private $effective_event_threat_detection_custom_modules; - /** - * A token identifying a page of results the server should return. - * - * 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\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $effective_event_threat_detection_custom_modules - * The list of EffectiveEventThreatDetectionCustomModules - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of EffectiveEventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule effective_event_threat_detection_custom_modules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEffectiveEventThreatDetectionCustomModules() - { - return $this->effective_event_threat_detection_custom_modules; - } - - /** - * The list of EffectiveEventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule effective_event_threat_detection_custom_modules = 1; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEffectiveEventThreatDetectionCustomModules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule::class); - $this->effective_event_threat_detection_custom_modules = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php deleted file mode 100644 index 4e8e3f4aceaf..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - */ -class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value returned by the last call indicating a continuation. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of parent to list effective custom modules. specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @type string $page_token - * Optional. The value returned by the last call indicating a continuation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The value returned by the last call indicating a continuation. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The value returned by the last call indicating a continuation. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php deleted file mode 100644 index 7a21fad782a9..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - */ -class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of EffectiveSecurityHealthAnalyticsCustomModule - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule effective_security_health_analytics_custom_modules = 1; - */ - private $effective_security_health_analytics_custom_modules; - /** - * A token identifying a page of results the server should return. - * - * 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\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $effective_security_health_analytics_custom_modules - * The list of EffectiveSecurityHealthAnalyticsCustomModule - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of EffectiveSecurityHealthAnalyticsCustomModule - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule effective_security_health_analytics_custom_modules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEffectiveSecurityHealthAnalyticsCustomModules() - { - return $this->effective_security_health_analytics_custom_modules; - } - - /** - * The list of EffectiveSecurityHealthAnalyticsCustomModule - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule effective_security_health_analytics_custom_modules = 1; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEffectiveSecurityHealthAnalyticsCustomModules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule::class); - $this->effective_security_health_analytics_custom_modules = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php deleted file mode 100644 index 16e359448211..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - */ -class ListEventThreatDetectionCustomModulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\ListEventThreatDetectionCustomModulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php deleted file mode 100644 index ee2dd6dd74e4..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListEventThreatDetectionCustomModulesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - */ -class ListEventThreatDetectionCustomModulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of EventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - */ - private $event_threat_detection_custom_modules; - /** - * A token identifying a page of results the server should return. - * - * 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\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $event_threat_detection_custom_modules - * The list of EventThreatDetectionCustomModules - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of EventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventThreatDetectionCustomModules() - { - return $this->event_threat_detection_custom_modules; - } - - /** - * The list of EventThreatDetectionCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventThreatDetectionCustomModules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); - $this->event_threat_detection_custom_modules = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php deleted file mode 100644 index c4a0cd81d3af..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - */ -class ListSecurityCenterServicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent to list Security Command Center services. - * Formats: - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value returned by the last call indicating a continuation. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the parent to list Security Command Center services. - * - * Formats: - * - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\ListSecurityCenterServicesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent to list Security Command Center services. - * Formats: - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} - * @type int $page_size - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @type string $page_token - * Optional. The value returned by the last call indicating a continuation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent to list Security Command Center services. - * Formats: - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the parent to list Security Command Center services. - * Formats: - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The value returned by the last call indicating a continuation. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The value returned by the last call indicating a continuation. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php deleted file mode 100644 index 772555d39002..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityCenterServicesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - */ -class ListSecurityCenterServicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of services. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_services = 1; - */ - private $security_center_services; - /** - * A token identifying a page of results the server should return. - * - * 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\SecurityCenterManagement\V1\SecurityCenterService>|\Google\Protobuf\Internal\RepeatedField $security_center_services - * The list of services. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of services. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_services = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityCenterServices() - { - return $this->security_center_services; - } - - /** - * The list of services. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_services = 1; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityCenterServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService::class); - $this->security_center_services = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php deleted file mode 100644 index 2e52af07903c..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - */ -class ListSecurityHealthAnalyticsCustomModulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\ListSecurityHealthAnalyticsCustomModulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php deleted file mode 100644 index 4ed6c5ea9a78..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ListSecurityHealthAnalyticsCustomModulesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - */ -class ListSecurityHealthAnalyticsCustomModulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of SecurityHealthAnalyticsCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - */ - private $security_health_analytics_custom_modules; - /** - * A token identifying a page of results the server should return. - * - * 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\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $security_health_analytics_custom_modules - * The list of SecurityHealthAnalyticsCustomModules - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The list of SecurityHealthAnalyticsCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityHealthAnalyticsCustomModules() - { - return $this->security_health_analytics_custom_modules; - } - - /** - * The list of SecurityHealthAnalyticsCustomModules - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityHealthAnalyticsCustomModules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); - $this->security_health_analytics_custom_modules = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php deleted file mode 100644 index 6482912da57a..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService.php +++ /dev/null @@ -1,345 +0,0 @@ -google.cloud.securitycentermanagement.v1.SecurityCenterService - */ -class SecurityCenterService extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the service. - * Its format is: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The intended state of enablement for the service at its level of - * the resource hierarchy. A DISABLED state will override all module - * enablement_states to DISABLED. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $intended_enablement_state = 0; - /** - * Output only. The effective enablement state for the service at its level of - * the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an ancestor. - * This state may differ from the intended enablement state due to billing - * eligibility or onboarding status. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_enablement_state = 0; - /** - * Optional. The configurations including the state of enablement for the - * service's different modules. The absence of a module in the map implies its - * configuration is inherited from its parents. - * - * Generated from protobuf field map modules = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $modules; - /** - * Output only. The time the service was last updated. This could be due to an - * explicit user update or due to a side effect of another system change such - * as billing subscription expiry. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Additional service specific configuration. Not all services will - * utilize this field. - * - * Generated from protobuf field .google.protobuf.Struct service_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the service. - * Its format is: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * @type int $intended_enablement_state - * Optional. The intended state of enablement for the service at its level of - * the resource hierarchy. A DISABLED state will override all module - * enablement_states to DISABLED. - * @type int $effective_enablement_state - * Output only. The effective enablement state for the service at its level of - * the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an ancestor. - * This state may differ from the intended enablement state due to billing - * eligibility or onboarding status. - * @type array|\Google\Protobuf\Internal\MapField $modules - * Optional. The configurations including the state of enablement for the - * service's different modules. The absence of a module in the map implies its - * configuration is inherited from its parents. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the service was last updated. This could be due to an - * explicit user update or due to a side effect of another system change such - * as billing subscription expiry. - * @type \Google\Protobuf\Struct $service_config - * Optional. Additional service specific configuration. Not all services will - * utilize this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the service. - * Its format is: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the service. - * Its format is: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The intended state of enablement for the service at its level of - * the resource hierarchy. A DISABLED state will override all module - * enablement_states to DISABLED. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIntendedEnablementState() - { - return $this->intended_enablement_state; - } - - /** - * Optional. The intended state of enablement for the service at its level of - * the resource hierarchy. A DISABLED state will override all module - * enablement_states to DISABLED. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIntendedEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); - $this->intended_enablement_state = $var; - - return $this; - } - - /** - * Output only. The effective enablement state for the service at its level of - * the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an ancestor. - * This state may differ from the intended enablement state due to billing - * eligibility or onboarding status. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEffectiveEnablementState() - { - return $this->effective_enablement_state; - } - - /** - * Output only. The effective enablement state for the service at its level of - * the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an ancestor. - * This state may differ from the intended enablement state due to billing - * eligibility or onboarding status. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEffectiveEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); - $this->effective_enablement_state = $var; - - return $this; - } - - /** - * Optional. The configurations including the state of enablement for the - * service's different modules. The absence of a module in the map implies its - * configuration is inherited from its parents. - * - * Generated from protobuf field map modules = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getModules() - { - return $this->modules; - } - - /** - * Optional. The configurations including the state of enablement for the - * service's different modules. The absence of a module in the map implies its - * configuration is inherited from its parents. - * - * Generated from protobuf field map modules = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setModules($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\ModuleSettings::class); - $this->modules = $arr; - - return $this; - } - - /** - * Output only. The time the service was last updated. This could be due to an - * explicit user update or due to a side effect of another system change such - * as billing subscription expiry. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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 time the service was last updated. This could be due to an - * explicit user update or due to a side effect of another system change such - * as billing subscription expiry. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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; - } - - /** - * Optional. Additional service specific configuration. Not all services will - * utilize this field. - * - * Generated from protobuf field .google.protobuf.Struct service_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getServiceConfig() - { - return $this->service_config; - } - - public function hasServiceConfig() - { - return isset($this->service_config); - } - - public function clearServiceConfig() - { - unset($this->service_config); - } - - /** - * Optional. Additional service specific configuration. Not all services will - * utilize this field. - * - * Generated from protobuf field .google.protobuf.Struct service_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setServiceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->service_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php deleted file mode 100644 index fcc179827fd4..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/EnablementState.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState - */ -class EnablementState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; - */ - const ENABLEMENT_STATE_UNSPECIFIED = 0; - /** - * State is inherited from the parent resource. Not a valid effective - * enablement state. - * - * Generated from protobuf enum INHERITED = 1; - */ - const INHERITED = 1; - /** - * State is enabled. - * - * Generated from protobuf enum ENABLED = 2; - */ - const ENABLED = 2; - /** - * State is disabled. - * - * Generated from protobuf enum DISABLED = 3; - */ - const DISABLED = 3; - - private static $valueToName = [ - self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', - self::INHERITED => 'INHERITED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService_EnablementState::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php deleted file mode 100644 index 5a4691b1b19b..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityCenterService/ModuleSettings.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - */ -class ModuleSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The intended state of enablement for the module at its level of - * the resource hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $intended_enablement_state = 0; - /** - * Output only. The effective enablement state for the module at its level - * of the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an - * ancestor. This state may - * differ from the intended enablement state due to billing eligibility or - * onboarding status. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_enablement_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $intended_enablement_state - * Optional. The intended state of enablement for the module at its level of - * the resource hierarchy. - * @type int $effective_enablement_state - * Output only. The effective enablement state for the module at its level - * of the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an - * ancestor. This state may - * differ from the intended enablement state due to billing eligibility or - * onboarding status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The intended state of enablement for the module at its level of - * the resource hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIntendedEnablementState() - { - return $this->intended_enablement_state; - } - - /** - * Optional. The intended state of enablement for the module at its level of - * the resource hierarchy. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState intended_enablement_state = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIntendedEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); - $this->intended_enablement_state = $var; - - return $this; - } - - /** - * Output only. The effective enablement state for the module at its level - * of the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an - * ancestor. This state may - * differ from the intended enablement state due to billing eligibility or - * onboarding status. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEffectiveEnablementState() - { - return $this->effective_enablement_state; - } - - /** - * Output only. The effective enablement state for the module at its level - * of the resource hierarchy. If the intended state is set to INHERITED, the - * effective state will be inherited from the enablement state of an - * ancestor. This state may - * differ from the intended enablement state due to billing eligibility or - * onboarding status. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState effective_enablement_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEffectiveEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService\EnablementState::class); - $this->effective_enablement_state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ModuleSettings::class, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService_ModuleSettings::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php deleted file mode 100644 index db568064f325..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - */ -class SecurityHealthAnalyticsCustomModule extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The display name of the Security Health Analytics custom module. - * This display name becomes the finding category for all findings that are - * returned by this custom module. The display name must be between 1 and - * 128 characters, start with a lowercase letter, and contain alphanumeric - * characters or underscores only. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. The enablement state of the custom module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enablement_state = 0; - /** - * Output only. The time at which the custom module was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The editor that last updated the custom module. - * - * Generated from protobuf field string last_editor = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_editor = ''; - /** - * Output only. Specifies the organization or folder from which the custom - * module is inherited. If empty, indicates that the custom module was created - * in the organization, folder, or project in which you are viewing the custom - * module. - * - * Generated from protobuf field string ancestor_module = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $ancestor_module = ''; - /** - * Optional. The user specified custom configuration for the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * @type string $display_name - * Optional. The display name of the Security Health Analytics custom module. - * This display name becomes the finding category for all findings that are - * returned by this custom module. The display name must be between 1 and - * 128 characters, start with a lowercase letter, and contain alphanumeric - * characters or underscores only. - * @type int $enablement_state - * Optional. The enablement state of the custom module. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the custom module was last updated. - * @type string $last_editor - * Output only. The editor that last updated the custom module. - * @type string $ancestor_module - * Output only. Specifies the organization or folder from which the custom - * module is inherited. If empty, indicates that the custom module was created - * in the organization, folder, or project in which you are viewing the custom - * module. - * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $custom_config - * Optional. The user specified custom configuration for the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The full resource name of the custom module, specified in one - * of the following formats: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The display name of the Security Health Analytics custom module. - * This display name becomes the finding category for all findings that are - * returned by this custom module. The display name must be between 1 and - * 128 characters, start with a lowercase letter, and contain alphanumeric - * characters or underscores only. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. The display name of the Security Health Analytics custom module. - * This display name becomes the finding category for all findings that are - * returned by this custom module. The display name must be between 1 and - * 128 characters, start with a lowercase letter, and contain alphanumeric - * characters or underscores only. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. The enablement state of the custom module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEnablementState() - { - return $this->enablement_state; - } - - /** - * Optional. The enablement state of the custom module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEnablementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule\EnablementState::class); - $this->enablement_state = $var; - - return $this; - } - - /** - * Output only. The time at which the custom module was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.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 time at which the custom module was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.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. The editor that last updated the custom module. - * - * Generated from protobuf field string last_editor = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLastEditor() - { - return $this->last_editor; - } - - /** - * Output only. The editor that last updated the custom module. - * - * Generated from protobuf field string last_editor = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLastEditor($var) - { - GPBUtil::checkString($var, True); - $this->last_editor = $var; - - return $this; - } - - /** - * Output only. Specifies the organization or folder from which the custom - * module is inherited. If empty, indicates that the custom module was created - * in the organization, folder, or project in which you are viewing the custom - * module. - * - * Generated from protobuf field string ancestor_module = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getAncestorModule() - { - return $this->ancestor_module; - } - - /** - * Output only. Specifies the organization or folder from which the custom - * module is inherited. If empty, indicates that the custom module was created - * in the organization, folder, or project in which you are viewing the custom - * module. - * - * Generated from protobuf field string ancestor_module = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAncestorModule($var) - { - GPBUtil::checkString($var, True); - $this->ancestor_module = $var; - - return $this; - } - - /** - * Optional. The user specified custom configuration for the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig|null - */ - public function getCustomConfig() - { - return $this->custom_config; - } - - public function hasCustomConfig() - { - return isset($this->custom_config); - } - - public function clearCustomConfig() - { - unset($this->custom_config); - } - - /** - * Optional. The user specified custom configuration for the module. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $var - * @return $this - */ - public function setCustomConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig::class); - $this->custom_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php deleted file mode 100644 index d769e1d16088..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SecurityHealthAnalyticsCustomModule/EnablementState.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState - */ -class EnablementState -{ - /** - * Unspecified enablement state. - * - * Generated from protobuf enum ENABLEMENT_STATE_UNSPECIFIED = 0; - */ - const ENABLEMENT_STATE_UNSPECIFIED = 0; - /** - * The module is enabled at the given CRM resource. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The module is disabled at the given CRM resource. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - /** - * State is inherited from an ancestor module. The module will either - * be effectively ENABLED or DISABLED based on its closest non-inherited - * ancestor module in the CRM hierarchy. Attempting to set a top level - * module (module with no parent) to the INHERITED state will result in an - * INVALID_ARGUMENT error. - * - * Generated from protobuf enum INHERITED = 3; - */ - const INHERITED = 3; - - private static $valueToName = [ - self::ENABLEMENT_STATE_UNSPECIFIED => 'ENABLEMENT_STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - self::INHERITED => 'INHERITED', - ]; - - 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(EnablementState::class, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule_EnablementState::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php deleted file mode 100644 index b7c4bdddc09b..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - */ -class SimulateSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see [Relative - * Resource - * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * Example: `organizations/{organization_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The custom configuration that you need to test. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $custom_config = null; - /** - * Required. Resource data to simulate custom module against. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - - /** - * @param string $parent Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see [Relative - * Resource - * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * Example: `organizations/{organization_id}`. - * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $customConfig Required. The custom configuration that you need to test. - * @param \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $resource Required. Resource data to simulate custom module against. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $customConfig, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $resource): self - { - return (new self()) - ->setParent($parent) - ->setCustomConfig($customConfig) - ->setResource($resource); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see [Relative - * Resource - * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * Example: `organizations/{organization_id}`. - * @type \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $custom_config - * Required. The custom configuration that you need to test. - * @type \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $resource - * Required. Resource data to simulate custom module against. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see [Relative - * Resource - * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * Example: `organizations/{organization_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see [Relative - * Resource - * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * Example: `organizations/{organization_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The custom configuration that you need to test. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenterManagement\V1\CustomConfig|null - */ - public function getCustomConfig() - { - return $this->custom_config; - } - - public function hasCustomConfig() - { - return isset($this->custom_config); - } - - public function clearCustomConfig() - { - unset($this->custom_config); - } - - /** - * Required. The custom configuration that you need to test. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenterManagement\V1\CustomConfig $var - * @return $this - */ - public function setCustomConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\CustomConfig::class); - $this->custom_config = $var; - - return $this; - } - - /** - * Required. Resource data to simulate custom module against. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. Resource data to simulate custom module against. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource::class); - $this->resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php deleted file mode 100644 index 74086409b0e8..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleRequest/SimulatedResource.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - */ -class SimulatedResource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of the resource, for example, - * `compute.googleapis.com/Disk`. - * - * Generated from protobuf field string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_type = ''; - /** - * Optional. A representation of the Google Cloud resource. Should match the - * Google Cloud resource JSON format. - * - * Generated from protobuf field .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_data = null; - /** - * Optional. A representation of the IAM policy. - * - * Generated from protobuf field .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $iam_policy_data = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_type - * Required. The type of the resource, for example, - * `compute.googleapis.com/Disk`. - * @type \Google\Protobuf\Struct $resource_data - * Optional. A representation of the Google Cloud resource. Should match the - * Google Cloud resource JSON format. - * @type \Google\Cloud\Iam\V1\Policy $iam_policy_data - * Optional. A representation of the IAM policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of the resource, for example, - * `compute.googleapis.com/Disk`. - * - * Generated from protobuf field string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Required. The type of the resource, for example, - * `compute.googleapis.com/Disk`. - * - * Generated from protobuf field string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - - /** - * Optional. A representation of the Google Cloud resource. Should match the - * Google Cloud resource JSON format. - * - * Generated from protobuf field .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getResourceData() - { - return $this->resource_data; - } - - public function hasResourceData() - { - return isset($this->resource_data); - } - - public function clearResourceData() - { - unset($this->resource_data); - } - - /** - * Optional. A representation of the Google Cloud resource. Should match the - * Google Cloud resource JSON format. - * - * Generated from protobuf field .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setResourceData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->resource_data = $var; - - return $this; - } - - /** - * Optional. A representation of the IAM policy. - * - * Generated from protobuf field .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Iam\V1\Policy|null - */ - public function getIamPolicyData() - { - return $this->iam_policy_data; - } - - public function hasIamPolicyData() - { - return isset($this->iam_policy_data); - } - - public function clearIamPolicyData() - { - unset($this->iam_policy_data); - } - - /** - * Optional. A representation of the IAM policy. - * - * Generated from protobuf field .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Iam\V1\Policy $var - * @return $this - */ - public function setIamPolicyData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\Policy::class); - $this->iam_policy_data = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SimulatedResource::class, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php deleted file mode 100644 index 4e49642f855f..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - */ -class SimulateSecurityHealthAnalyticsCustomModuleResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Result for test case in the corresponding request. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; - */ - protected $result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult $result - * Result for test case in the corresponding request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Result for test case in the corresponding request. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; - * @return \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * Result for test case in the corresponding request. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; - * @param \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse\SimulatedResult::class); - $this->result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php deleted file mode 100644 index c731ff8552f4..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulateSecurityHealthAnalyticsCustomModuleResponse/SimulatedResult.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - */ -class SimulatedResult extends \Google\Protobuf\Internal\Message -{ - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding $finding - * Finding that would be published for the test case, - * if a violation is detected. - * @type \Google\Protobuf\GPBEmpty $no_violation - * Indicates that the test case does not trigger any violation. - * @type \Google\Rpc\Status $error - * Error encountered during the test. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Finding that would be published for the test case, - * if a violation is detected. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding finding = 1; - * @return \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding|null - */ - public function getFinding() - { - return $this->readOneof(1); - } - - public function hasFinding() - { - return $this->hasOneof(1); - } - - /** - * Finding that would be published for the test case, - * if a violation is detected. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding finding = 1; - * @param \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Indicates that the test case does not trigger any violation. - * - * Generated from protobuf field .google.protobuf.Empty no_violation = 2; - * @return \Google\Protobuf\GPBEmpty|null - */ - public function getNoViolation() - { - return $this->readOneof(2); - } - - public function hasNoViolation() - { - return $this->hasOneof(2); - } - - /** - * Indicates that the test case does not trigger any violation. - * - * Generated from protobuf field .google.protobuf.Empty no_violation = 2; - * @param \Google\Protobuf\GPBEmpty $var - * @return $this - */ - public function setNoViolation($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\GPBEmpty::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Error encountered during the test. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->readOneof(3); - } - - public function hasError() - { - return $this->hasOneof(3); - } - - /** - * Error encountered during the test. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SimulatedResult::class, \Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php deleted file mode 100644 index 4ca02b40dcf3..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding.php +++ /dev/null @@ -1,454 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulatedFinding - */ -class SimulatedFinding extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. 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) = IDENTIFIER]; - */ - 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 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 = 4; - */ - protected $category = ''; - /** - * Output only. The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * 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 = 6; - */ - private $source_properties; - /** - * 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 = 7; - */ - protected $event_time = null; - /** - * The severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8; - */ - protected $severity = 0; - /** - * The class of the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9; - */ - protected $finding_class = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. 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 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 string $category - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * @type int $state - * Output only. The state of the finding. - * @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\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 int $severity - * The severity of the finding. This field is managed by the source that - * writes the finding. - * @type int $finding_class - * The class of the finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. 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) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. 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) = IDENTIFIER]; - * @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 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 = 4; - * @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 = 4; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * Output only. The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding\State::class); - $this->state = $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 = 6; - * @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 = 6; - * @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; - } - - /** - * 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 = 7; - * @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 = 7; - * @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 severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8; - * @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.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * The class of the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9; - * @return int - */ - public function getFindingClass() - { - return $this->finding_class; - } - - /** - * The class of the finding. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9; - * @param int $var - * @return $this - */ - public function setFindingClass($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenterManagement\V1\SimulatedFinding\FindingClass::class); - $this->finding_class = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php deleted file mode 100644 index 95ab932a7bb3..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/FindingClass.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulatedFinding.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; - /** - * Describes a potential security risk due to a change in the security - * posture. - * - * Generated from protobuf enum POSTURE_VIOLATION = 6; - */ - const POSTURE_VIOLATION = 6; - - 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', - self::POSTURE_VIOLATION => 'POSTURE_VIOLATION', - ]; - - 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\SecurityCenterManagement\V1\SimulatedFinding_FindingClass::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php deleted file mode 100644 index 16d260098f6c..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/Severity.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulatedFinding.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 and public SSH access with weak or no - * passwords. - * Threat: - * Indicates a threat that is able to access, modify, or delete data or - * execute unauthorized code within existing resources. - * - * 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\SecurityCenterManagement\V1\SimulatedFinding_Severity::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php deleted file mode 100644 index 4bc4eb004882..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/SimulatedFinding/State.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.securitycentermanagement.v1.SimulatedFinding.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\SecurityCenterManagement\V1\SimulatedFinding_State::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php deleted file mode 100644 index 85584147f21c..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateEventThreatDetectionCustomModuleRequest.php +++ /dev/null @@ -1,214 +0,0 @@ -google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - */ -class UpdateEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * EventThreatDetectionCustomModule resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The module being updated - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_threat_detection_custom_module = null; - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule Required. The module being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * EventThreatDetectionCustomModule resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\UpdateEventThreatDetectionCustomModuleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $eventThreatDetectionCustomModule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * EventThreatDetectionCustomModule resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $event_threat_detection_custom_module - * Required. The module being updated - * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * EventThreatDetectionCustomModule resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * EventThreatDetectionCustomModule resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The module being updated - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule|null - */ - public function getEventThreatDetectionCustomModule() - { - return $this->event_threat_detection_custom_module; - } - - public function hasEventThreatDetectionCustomModule() - { - return isset($this->event_threat_detection_custom_module); - } - - public function clearEventThreatDetectionCustomModule() - { - unset($this->event_threat_detection_custom_module); - } - - /** - * Required. The module being updated - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule $var - * @return $this - */ - public function setEventThreatDetectionCustomModule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule::class); - $this->event_threat_detection_custom_module = $var; - - return $this; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php deleted file mode 100644 index 9f8693b99a17..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityCenterServiceRequest.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - */ -class UpdateSecurityCenterServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated service. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_service = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $security_center_service = null; - /** - * Required. The list of fields to be updated. Possible values: - * * "intended_enablement_state" - * * "modules" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. When set to true, only validations (including IAM checks) will be - * done for the request (service will not be updated). An OK response - * indicates that the request is valid, while an error response indicates that - * the request is invalid. Note that a subsequent request to actually update - * the service could still fail for one of the following reasons: - * - The state could have changed (e.g. IAM permission lost). - * - A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $securityCenterService Required. The updated service. - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to be updated. Possible values: - * - * * "intended_enablement_state" - * * "modules" - * - * @return \Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityCenterServiceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $securityCenterService, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSecurityCenterService($securityCenterService) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $security_center_service - * Required. The updated service. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Possible values: - * * "intended_enablement_state" - * * "modules" - * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will be - * done for the request (service will not be updated). An OK response - * indicates that the request is valid, while an error response indicates that - * the request is invalid. Note that a subsequent request to actually update - * the service could still fail for one of the following reasons: - * - The state could have changed (e.g. IAM permission lost). - * - A failure occurred while trying to delete the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated service. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService|null - */ - public function getSecurityCenterService() - { - return $this->security_center_service; - } - - public function hasSecurityCenterService() - { - return isset($this->security_center_service); - } - - public function clearSecurityCenterService() - { - unset($this->security_center_service); - } - - /** - * Required. The updated service. - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityCenterService security_center_service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService $var - * @return $this - */ - public function setSecurityCenterService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService::class); - $this->security_center_service = $var; - - return $this; - } - - /** - * Required. The list of fields to be updated. Possible values: - * * "intended_enablement_state" - * * "modules" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The list of fields to be updated. Possible values: - * * "intended_enablement_state" - * * "modules" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will be - * done for the request (service will not be updated). An OK response - * indicates that the request is valid, while an error response indicates that - * the request is invalid. Note that a subsequent request to actually update - * the service could still fail for one of the following reasons: - * - The state could have changed (e.g. IAM permission lost). - * - A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will be - * done for the request (service will not be updated). An OK response - * indicates that the request is valid, while an error response indicates that - * the request is invalid. Note that a subsequent request to actually update - * the service could still fail for one of the following reasons: - * - The state could have changed (e.g. IAM permission lost). - * - A failure occurred while trying to delete the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php deleted file mode 100644 index 9fb49e8da926..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/UpdateSecurityHealthAnalyticsCustomModuleRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - */ -class UpdateSecurityHealthAnalyticsCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of fields to be updated. The only fields that can be - * updated are `enablement_state` and `custom_config`. If empty or set to the - * wildcard value `*`, both `enablement_state` and `custom_config` are - * updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $security_health_analytics_custom_module = null; - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to be updated. The only fields that can be - * updated are `enablement_state` and `custom_config`. If empty or set to the - * wildcard value `*`, both `enablement_state` and `custom_config` are - * updated. - * - * @return \Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityHealthAnalyticsCustomModuleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $securityHealthAnalyticsCustomModule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. The only fields that can be - * updated are `enablement_state` and `custom_config`. If empty or set to the - * wildcard value `*`, both `enablement_state` and `custom_config` are - * updated. - * @type \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $security_health_analytics_custom_module - * Required. The resource being updated - * @type bool $validate_only - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of fields to be updated. The only fields that can be - * updated are `enablement_state` and `custom_config`. If empty or set to the - * wildcard value `*`, both `enablement_state` and `custom_config` are - * updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The list of fields to be updated. The only fields that can be - * updated are `enablement_state` and `custom_config`. If empty or set to the - * wildcard value `*`, both `enablement_state` and `custom_config` are - * updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule|null - */ - public function getSecurityHealthAnalyticsCustomModule() - { - return $this->security_health_analytics_custom_module; - } - - public function hasSecurityHealthAnalyticsCustomModule() - { - return isset($this->security_health_analytics_custom_module); - } - - public function clearSecurityHealthAnalyticsCustomModule() - { - unset($this->security_health_analytics_custom_module); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule $var - * @return $this - */ - public function setSecurityHealthAnalyticsCustomModule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule::class); - $this->security_health_analytics_custom_module = $var; - - return $this; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php deleted file mode 100644 index 40ac0673ade5..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - */ -class ValidateEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent to validate the Custom Module under. - * Its format is: - * * `organizations/{organization}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The raw text of the module's contents. Used to generate error - * messages. - * - * Generated from protobuf field string raw_text = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $raw_text = ''; - /** - * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - * - * Generated from protobuf field string type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent to validate the Custom Module under. - * Its format is: - * * `organizations/{organization}/locations/{location}`. - * @type string $raw_text - * Required. The raw text of the module's contents. Used to generate error - * messages. - * @type string $type - * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent to validate the Custom Module under. - * Its format is: - * * `organizations/{organization}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the parent to validate the Custom Module under. - * Its format is: - * * `organizations/{organization}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The raw text of the module's contents. Used to generate error - * messages. - * - * Generated from protobuf field string raw_text = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRawText() - { - return $this->raw_text; - } - - /** - * Required. The raw text of the module's contents. Used to generate error - * messages. - * - * Generated from protobuf field string raw_text = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRawText($var) - { - GPBUtil::checkString($var, True); - $this->raw_text = $var; - - return $this; - } - - /** - * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - * - * Generated from protobuf field string type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - * - * Generated from protobuf field string type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php deleted file mode 100644 index d5707cbe2e7c..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - */ -class ValidateEventThreatDetectionCustomModuleResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of errors returned by the validator. If the list is empty, there - * were no errors. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError errors = 2; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\CustomModuleValidationError>|\Google\Protobuf\Internal\RepeatedField $errors - * A list of errors returned by the validator. If the list is empty, there - * were no errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * A list of errors returned by the validator. If the list is empty, there - * were no errors. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError errors = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * A list of errors returned by the validator. If the list is empty, there - * were no errors. - * - * Generated from protobuf field repeated .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError errors = 2; - * @param array<\Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\CustomModuleValidationError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\CustomModuleValidationError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php deleted file mode 100644 index 661bc6edd5d9..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/CustomModuleValidationError.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - */ -class CustomModuleValidationError extends \Google\Protobuf\Internal\Message -{ - /** - * A description of the error, suitable for human consumption. Required. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - /** - * The path, in RFC 8901 JSON Pointer format, to the field that failed - * validation. This may be left empty if no specific field is affected. - * - * Generated from protobuf field string field_path = 2; - */ - protected $field_path = ''; - /** - * The initial position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed. - * - * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position start = 3; - */ - protected $start = null; - /** - * The end position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed.. - * - * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position end = 4; - */ - protected $end = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $description - * A description of the error, suitable for human consumption. Required. - * @type string $field_path - * The path, in RFC 8901 JSON Pointer format, to the field that failed - * validation. This may be left empty if no specific field is affected. - * @type \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $start - * The initial position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed. - * @type \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $end - * The end position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed.. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * A description of the error, suitable for human consumption. Required. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the error, suitable for human consumption. Required. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The path, in RFC 8901 JSON Pointer format, to the field that failed - * validation. This may be left empty if no specific field is affected. - * - * Generated from protobuf field string field_path = 2; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * The path, in RFC 8901 JSON Pointer format, to the field that failed - * validation. This may be left empty if no specific field is affected. - * - * Generated from protobuf field string field_path = 2; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * The initial position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed. - * - * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position start = 3; - * @return \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position|null - */ - public function getStart() - { - return $this->start; - } - - public function hasStart() - { - return isset($this->start); - } - - public function clearStart() - { - unset($this->start); - } - - /** - * The initial position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed. - * - * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position start = 3; - * @param \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position::class); - $this->start = $var; - - return $this; - } - - /** - * The end position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed.. - * - * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position end = 4; - * @return \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position|null - */ - public function getEnd() - { - return $this->end; - } - - public function hasEnd() - { - return isset($this->end); - } - - public function clearEnd() - { - unset($this->end); - } - - /** - * The end position of the error in the uploaded text version of the - * module. This field may be omitted if no specific position applies, or if - * one could not be computed.. - * - * Generated from protobuf field optional .google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position end = 4; - * @param \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse\Position::class); - $this->end = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomModuleValidationError::class, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationError::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php b/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php deleted file mode 100644 index 4382229dee30..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/proto/src/Google/Cloud/SecurityCenterManagement/V1/ValidateEventThreatDetectionCustomModuleResponse/Position.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - */ -class Position extends \Google\Protobuf\Internal\Message -{ - /** - * The line position in the text - * - * Generated from protobuf field int32 line_number = 1; - */ - protected $line_number = 0; - /** - * The column position in the line - * - * Generated from protobuf field int32 column_number = 2; - */ - protected $column_number = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $line_number - * The line position in the text - * @type int $column_number - * The column position in the line - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce(); - parent::__construct($data); - } - - /** - * The line position in the text - * - * Generated from protobuf field int32 line_number = 1; - * @return int - */ - public function getLineNumber() - { - return $this->line_number; - } - - /** - * The line position in the text - * - * Generated from protobuf field int32 line_number = 1; - * @param int $var - * @return $this - */ - public function setLineNumber($var) - { - GPBUtil::checkInt32($var); - $this->line_number = $var; - - return $this; - } - - /** - * The column position in the line - * - * Generated from protobuf field int32 column_number = 2; - * @return int - */ - public function getColumnNumber() - { - return $this->column_number; - } - - /** - * The column position in the line - * - * Generated from protobuf field int32 column_number = 2; - * @param int $var - * @return $this - */ - public function setColumnNumber($var) - { - GPBUtil::checkInt32($var); - $this->column_number = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Position::class, \Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse_Position::class); - diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php deleted file mode 100644 index 0d733d61eacb..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - - // Call the API and handle any network failures. - try { - /** @var EventThreatDetectionCustomModule $response */ - $response = $securityCenterManagementClient->createEventThreatDetectionCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - create_event_threat_detection_custom_module_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php deleted file mode 100644 index 7fea0ed62fdb..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); - - // Call the API and handle any network failures. - try { - /** @var SecurityHealthAnalyticsCustomModule $response */ - $response = $securityCenterManagementClient->createSecurityHealthAnalyticsCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - create_security_health_analytics_custom_module_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php deleted file mode 100644 index d250735b71ec..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $securityCenterManagementClient->deleteEventThreatDetectionCustomModule($request); - 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 = SecurityCenterManagementClient::eventThreatDetectionCustomModuleName( - '[ORGANIZATION]', - '[LOCATION]', - '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]' - ); - - delete_event_threat_detection_custom_module_sample($formattedName); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php deleted file mode 100644 index 2b585f52f524..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $securityCenterManagementClient->deleteSecurityHealthAnalyticsCustomModule($request); - 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 = SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName( - '[ORGANIZATION]', - '[LOCATION]', - '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]' - ); - - delete_security_health_analytics_custom_module_sample($formattedName); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php deleted file mode 100644 index aa70954b0302..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EffectiveEventThreatDetectionCustomModule $response */ - $response = $securityCenterManagementClient->getEffectiveEventThreatDetectionCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecurityCenterManagementClient::effectiveEventThreatDetectionCustomModuleName( - '[ORGANIZATION]', - '[LOCATION]', - '[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]' - ); - - get_effective_event_threat_detection_custom_module_sample($formattedName); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php deleted file mode 100644 index a69b33c3d5e4..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EffectiveSecurityHealthAnalyticsCustomModule $response */ - $response = $securityCenterManagementClient->getEffectiveSecurityHealthAnalyticsCustomModule( - $request - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecurityCenterManagementClient::effectiveSecurityHealthAnalyticsCustomModuleName( - '[ORGANIZATION]', - '[LOCATION]', - '[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]' - ); - - get_effective_security_health_analytics_custom_module_sample($formattedName); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php deleted file mode 100644 index 0bea004f72af..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EventThreatDetectionCustomModule $response */ - $response = $securityCenterManagementClient->getEventThreatDetectionCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecurityCenterManagementClient::eventThreatDetectionCustomModuleName( - '[ORGANIZATION]', - '[LOCATION]', - '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]' - ); - - get_event_threat_detection_custom_module_sample($formattedName); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php deleted file mode 100644 index f1ac3f69886b..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetLocation_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php deleted file mode 100644 index a832f451e258..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_center_service.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SecurityCenterService $response */ - $response = $securityCenterManagementClient->getSecurityCenterService($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecurityCenterManagementClient::securityCenterServiceName( - '[PROJECT]', - '[LOCATION]', - '[SERVICE]' - ); - - get_security_center_service_sample($formattedName); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php deleted file mode 100644 index 96b85ef9597f..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SecurityHealthAnalyticsCustomModule $response */ - $response = $securityCenterManagementClient->getSecurityHealthAnalyticsCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName( - '[ORGANIZATION]', - '[LOCATION]', - '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]' - ); - - get_security_health_analytics_custom_module_sample($formattedName); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php deleted file mode 100644 index 74c1ee95f54f..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securityCenterManagementClient->listDescendantEventThreatDetectionCustomModules( - $request - ); - - /** @var EventThreatDetectionCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - list_descendant_event_threat_detection_custom_modules_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php deleted file mode 100644 index 4a84159d249f..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securityCenterManagementClient->listDescendantSecurityHealthAnalyticsCustomModules( - $request - ); - - /** @var SecurityHealthAnalyticsCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - list_descendant_security_health_analytics_custom_modules_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php deleted file mode 100644 index 58d1b0020844..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securityCenterManagementClient->listEffectiveEventThreatDetectionCustomModules( - $request - ); - - /** @var EffectiveEventThreatDetectionCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - list_effective_event_threat_detection_custom_modules_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php deleted file mode 100644 index 7bff44b85886..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securityCenterManagementClient->listEffectiveSecurityHealthAnalyticsCustomModules( - $request - ); - - /** @var EffectiveSecurityHealthAnalyticsCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - list_effective_security_health_analytics_custom_modules_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php deleted file mode 100644 index 7c979942ba80..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securityCenterManagementClient->listEventThreatDetectionCustomModules($request); - - /** @var EventThreatDetectionCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - list_event_threat_detection_custom_modules_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php deleted file mode 100644 index 53fa3fb57571..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListLocations_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php deleted file mode 100644 index ead3764fc0b0..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_center_services.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securityCenterManagementClient->listSecurityCenterServices($request); - - /** @var SecurityCenterService $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 = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - list_security_center_services_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php deleted file mode 100644 index d05177c641eb..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securityCenterManagementClient->listSecurityHealthAnalyticsCustomModules($request); - - /** @var SecurityHealthAnalyticsCustomModule $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 = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - - list_security_health_analytics_custom_modules_sample($formattedParent); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php deleted file mode 100644 index 529415da4454..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php +++ /dev/null @@ -1,86 +0,0 @@ -setResourceType($resourceResourceType); - $request = (new SimulateSecurityHealthAnalyticsCustomModuleRequest()) - ->setParent($parent) - ->setCustomConfig($customConfig) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var SimulateSecurityHealthAnalyticsCustomModuleResponse $response */ - $response = $securityCenterManagementClient->simulateSecurityHealthAnalyticsCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $resourceResourceType = '[RESOURCE_TYPE]'; - - simulate_security_health_analytics_custom_module_sample($parent, $resourceResourceType); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php deleted file mode 100644 index 926ff6d29f65..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php +++ /dev/null @@ -1,67 +0,0 @@ -setUpdateMask($updateMask) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - - // Call the API and handle any network failures. - try { - /** @var EventThreatDetectionCustomModule $response */ - $response = $securityCenterManagementClient->updateEventThreatDetectionCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php deleted file mode 100644 index 004b435f70f8..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_center_service.php +++ /dev/null @@ -1,62 +0,0 @@ -setSecurityCenterService($securityCenterService) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var SecurityCenterService $response */ - $response = $securityCenterManagementClient->updateSecurityCenterService($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php deleted file mode 100644 index 9d0d06d19ae6..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php +++ /dev/null @@ -1,66 +0,0 @@ -setUpdateMask($updateMask) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); - - // Call the API and handle any network failures. - try { - /** @var SecurityHealthAnalyticsCustomModule $response */ - $response = $securityCenterManagementClient->updateSecurityHealthAnalyticsCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php b/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php deleted file mode 100644 index 4c6b49a167c1..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setRawText($rawText) - ->setType($type); - - // Call the API and handle any network failures. - try { - /** @var ValidateEventThreatDetectionCustomModuleResponse $response */ - $response = $securityCenterManagementClient->validateEventThreatDetectionCustomModule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecurityCenterManagementClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - $rawText = '[RAW_TEXT]'; - $type = '[TYPE]'; - - validate_event_threat_detection_custom_module_sample($formattedParent, $rawText, $type); -} -// [END securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php deleted file mode 100644 index 2c5eb44c1283..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/Client/SecurityCenterManagementClient.php +++ /dev/null @@ -1,1371 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/security_center_management_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/security_center_management_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/security_center_management_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/security_center_management_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * effective_event_threat_detection_custom_module resource. - * - * @param string $organization - * @param string $location - * @param string $effectiveEventThreatDetectionCustomModule - * - * @return string The formatted effective_event_threat_detection_custom_module resource. - */ - public static function effectiveEventThreatDetectionCustomModuleName(string $organization, string $location, string $effectiveEventThreatDetectionCustomModule): string - { - return self::getPathTemplate('effectiveEventThreatDetectionCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * effective_security_health_analytics_custom_module resource. - * - * @param string $organization - * @param string $location - * @param string $effectiveSecurityHealthAnalyticsCustomModule - * - * @return string The formatted effective_security_health_analytics_custom_module resource. - */ - public static function effectiveSecurityHealthAnalyticsCustomModuleName(string $organization, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('effectiveSecurityHealthAnalyticsCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * event_threat_detection_custom_module resource. - * - * @param string $organization - * @param string $location - * @param string $eventThreatDetectionCustomModule - * - * @return string The formatted event_threat_detection_custom_module resource. - */ - public static function eventThreatDetectionCustomModuleName(string $organization, string $location, string $eventThreatDetectionCustomModule): string - { - return self::getPathTemplate('eventThreatDetectionCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location resource. - */ - public static function folderLocationName(string $folder, string $location): string - { - return self::getPathTemplate('folderLocation')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_effective_event_threat_detection_custom_module resource. - * - * @param string $folder - * @param string $location - * @param string $effectiveEventThreatDetectionCustomModule - * - * @return string The formatted folder_location_effective_event_threat_detection_custom_module resource. - */ - public static function folderLocationEffectiveEventThreatDetectionCustomModuleName(string $folder, string $location, string $effectiveEventThreatDetectionCustomModule): string - { - return self::getPathTemplate('folderLocationEffectiveEventThreatDetectionCustomModule')->render([ - 'folder' => $folder, - 'location' => $location, - 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_effective_security_health_analytics_custom_module resource. - * - * @param string $folder - * @param string $location - * @param string $effectiveSecurityHealthAnalyticsCustomModule - * - * @return string The formatted folder_location_effective_security_health_analytics_custom_module resource. - */ - public static function folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(string $folder, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('folderLocationEffectiveSecurityHealthAnalyticsCustomModule')->render([ - 'folder' => $folder, - 'location' => $location, - 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_event_threat_detection_custom_module resource. - * - * @param string $folder - * @param string $location - * @param string $eventThreatDetectionCustomModule - * - * @return string The formatted folder_location_event_threat_detection_custom_module resource. - */ - public static function folderLocationEventThreatDetectionCustomModuleName(string $folder, string $location, string $eventThreatDetectionCustomModule): string - { - return self::getPathTemplate('folderLocationEventThreatDetectionCustomModule')->render([ - 'folder' => $folder, - 'location' => $location, - 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_security_health_analytics_custom_module resource. - * - * @param string $folder - * @param string $location - * @param string $securityHealthAnalyticsCustomModule - * - * @return string The formatted folder_location_security_health_analytics_custom_module resource. - */ - public static function folderLocationSecurityHealthAnalyticsCustomModuleName(string $folder, string $location, string $securityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('folderLocationSecurityHealthAnalyticsCustomModule')->render([ - 'folder' => $folder, - 'location' => $location, - 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_service resource. - * - * @param string $folder - * @param string $location - * @param string $service - * - * @return string The formatted folder_location_service resource. - */ - public static function folderLocationServiceName(string $folder, string $location, string $service): string - { - return self::getPathTemplate('folderLocationService')->render([ - 'folder' => $folder, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName(string $organization, string $location): string - { - return self::getPathTemplate('organizationLocation')->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_effective_event_threat_detection_custom_module resource. - * - * @param string $organization - * @param string $location - * @param string $effectiveEventThreatDetectionCustomModule - * - * @return string The formatted organization_location_effective_event_threat_detection_custom_module resource. - */ - public static function organizationLocationEffectiveEventThreatDetectionCustomModuleName(string $organization, string $location, string $effectiveEventThreatDetectionCustomModule): string - { - return self::getPathTemplate('organizationLocationEffectiveEventThreatDetectionCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_effective_security_health_analytics_custom_module - * resource. - * - * @param string $organization - * @param string $location - * @param string $effectiveSecurityHealthAnalyticsCustomModule - * - * @return string The formatted organization_location_effective_security_health_analytics_custom_module resource. - */ - public static function organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(string $organization, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('organizationLocationEffectiveSecurityHealthAnalyticsCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_event_threat_detection_custom_module resource. - * - * @param string $organization - * @param string $location - * @param string $eventThreatDetectionCustomModule - * - * @return string The formatted organization_location_event_threat_detection_custom_module resource. - */ - public static function organizationLocationEventThreatDetectionCustomModuleName(string $organization, string $location, string $eventThreatDetectionCustomModule): string - { - return self::getPathTemplate('organizationLocationEventThreatDetectionCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_security_health_analytics_custom_module resource. - * - * @param string $organization - * @param string $location - * @param string $securityHealthAnalyticsCustomModule - * - * @return string The formatted organization_location_security_health_analytics_custom_module resource. - */ - public static function organizationLocationSecurityHealthAnalyticsCustomModuleName(string $organization, string $location, string $securityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('organizationLocationSecurityHealthAnalyticsCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_service resource. - * - * @param string $organization - * @param string $location - * @param string $service - * - * @return string The formatted organization_location_service resource. - */ - public static function organizationLocationServiceName(string $organization, string $location, string $service): string - { - return self::getPathTemplate('organizationLocationService')->render([ - 'organization' => $organization, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_effective_event_threat_detection_custom_module resource. - * - * @param string $project - * @param string $location - * @param string $effectiveEventThreatDetectionCustomModule - * - * @return string The formatted project_location_effective_event_threat_detection_custom_module resource. - */ - public static function projectLocationEffectiveEventThreatDetectionCustomModuleName(string $project, string $location, string $effectiveEventThreatDetectionCustomModule): string - { - return self::getPathTemplate('projectLocationEffectiveEventThreatDetectionCustomModule')->render([ - 'project' => $project, - 'location' => $location, - 'effective_event_threat_detection_custom_module' => $effectiveEventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_effective_security_health_analytics_custom_module resource. - * - * @param string $project - * @param string $location - * @param string $effectiveSecurityHealthAnalyticsCustomModule - * - * @return string The formatted project_location_effective_security_health_analytics_custom_module resource. - */ - public static function projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(string $project, string $location, string $effectiveSecurityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('projectLocationEffectiveSecurityHealthAnalyticsCustomModule')->render([ - 'project' => $project, - 'location' => $location, - 'effective_security_health_analytics_custom_module' => $effectiveSecurityHealthAnalyticsCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_event_threat_detection_custom_module resource. - * - * @param string $project - * @param string $location - * @param string $eventThreatDetectionCustomModule - * - * @return string The formatted project_location_event_threat_detection_custom_module resource. - */ - public static function projectLocationEventThreatDetectionCustomModuleName(string $project, string $location, string $eventThreatDetectionCustomModule): string - { - return self::getPathTemplate('projectLocationEventThreatDetectionCustomModule')->render([ - 'project' => $project, - 'location' => $location, - 'event_threat_detection_custom_module' => $eventThreatDetectionCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_security_health_analytics_custom_module resource. - * - * @param string $project - * @param string $location - * @param string $securityHealthAnalyticsCustomModule - * - * @return string The formatted project_location_security_health_analytics_custom_module resource. - */ - public static function projectLocationSecurityHealthAnalyticsCustomModuleName(string $project, string $location, string $securityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('projectLocationSecurityHealthAnalyticsCustomModule')->render([ - 'project' => $project, - 'location' => $location, - 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_service resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted project_location_service resource. - */ - public static function projectLocationServiceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('projectLocationService')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * security_center_service resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted security_center_service resource. - */ - public static function securityCenterServiceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('securityCenterService')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * security_health_analytics_custom_module resource. - * - * @param string $organization - * @param string $location - * @param string $securityHealthAnalyticsCustomModule - * - * @return string The formatted security_health_analytics_custom_module resource. - */ - public static function securityHealthAnalyticsCustomModuleName(string $organization, string $location, string $securityHealthAnalyticsCustomModule): string - { - return self::getPathTemplate('securityHealthAnalyticsCustomModule')->render([ - 'organization' => $organization, - 'location' => $location, - 'security_health_analytics_custom_module' => $securityHealthAnalyticsCustomModule, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - effectiveEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} - * - effectiveSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} - * - eventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} - * - folderLocation: folders/{folder}/locations/{location} - * - folderLocationEffectiveEventThreatDetectionCustomModule: folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} - * - folderLocationEffectiveSecurityHealthAnalyticsCustomModule: folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} - * - folderLocationEventThreatDetectionCustomModule: folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} - * - folderLocationSecurityHealthAnalyticsCustomModule: folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} - * - folderLocationService: folders/{folder}/locations/{location}/securityCenterServices/{service} - * - location: projects/{project}/locations/{location} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationEffectiveEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} - * - organizationLocationEffectiveSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} - * - organizationLocationEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} - * - organizationLocationSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} - * - organizationLocationService: organizations/{organization}/locations/{location}/securityCenterServices/{service} - * - projectLocationEffectiveEventThreatDetectionCustomModule: projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module} - * - projectLocationEffectiveSecurityHealthAnalyticsCustomModule: projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module} - * - projectLocationEventThreatDetectionCustomModule: projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module} - * - projectLocationSecurityHealthAnalyticsCustomModule: projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} - * - projectLocationService: projects/{project}/locations/{location}/securityCenterServices/{service} - * - securityCenterService: projects/{project}/locations/{location}/securityCenterServices/{service} - * - securityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $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 'securitycentermanagement.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); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a resident Event Threat Detection custom module at the scope of the - * given Resource Manager parent, and also creates inherited custom modules - * for all descendants of the given parent. These modules are enabled by - * default. - * - * The async variant is - * {@see SecurityCenterManagementClient::createEventThreatDetectionCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/create_event_threat_detection_custom_module.php - * - * @param CreateEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EventThreatDetectionCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEventThreatDetectionCustomModule(CreateEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EventThreatDetectionCustomModule - { - return $this->startApiCall('CreateEventThreatDetectionCustomModule', $request, $callOptions)->wait(); - } - - /** - * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - * given CRM parent, and also creates inherited - * SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - * parent. These modules are enabled by default. - * - * The async variant is - * {@see SecurityCenterManagementClient::createSecurityHealthAnalyticsCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/create_security_health_analytics_custom_module.php - * - * @param CreateSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecurityHealthAnalyticsCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SecurityHealthAnalyticsCustomModule - { - return $this->startApiCall('CreateSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified Event Threat Detection custom module and all of its - * descendants in the Resource Manager hierarchy. This method is only - * supported for resident custom modules. - * - * The async variant is - * {@see SecurityCenterManagementClient::deleteEventThreatDetectionCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/delete_event_threat_detection_custom_module.php - * - * @param DeleteEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEventThreatDetectionCustomModule(DeleteEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEventThreatDetectionCustomModule', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - * descendants in the CRM hierarchy. This method is only supported for - * resident custom modules. - * - * The async variant is - * {@see SecurityCenterManagementClient::deleteSecurityHealthAnalyticsCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/delete_security_health_analytics_custom_module.php - * - * @param DeleteSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); - } - - /** - * Gets an effective ETD custom module. Retrieves the effective module at the - * given level. The difference between an EffectiveCustomModule and a - * CustomModule is that the fields for an EffectiveCustomModule are computed - * from ancestors if needed. For example, the enablement_state for a - * CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the - * enablement_state for an EffectiveCustomModule is always computed to ENABLED - * or DISABLED (the effective enablement_state). - * - * The async variant is - * {@see SecurityCenterManagementClient::getEffectiveEventThreatDetectionCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/get_effective_event_threat_detection_custom_module.php - * - * @param GetEffectiveEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EffectiveEventThreatDetectionCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEffectiveEventThreatDetectionCustomModule(GetEffectiveEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EffectiveEventThreatDetectionCustomModule - { - return $this->startApiCall('GetEffectiveEventThreatDetectionCustomModule', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule. - * - * The async variant is - * {@see SecurityCenterManagementClient::getEffectiveSecurityHealthAnalyticsCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/get_effective_security_health_analytics_custom_module.php - * - * @param GetEffectiveSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EffectiveSecurityHealthAnalyticsCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): EffectiveSecurityHealthAnalyticsCustomModule - { - return $this->startApiCall('GetEffectiveSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); - } - - /** - * Gets an Event Threat Detection custom module. - * - * The async variant is - * {@see SecurityCenterManagementClient::getEventThreatDetectionCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/get_event_threat_detection_custom_module.php - * - * @param GetEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EventThreatDetectionCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEventThreatDetectionCustomModule(GetEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EventThreatDetectionCustomModule - { - return $this->startApiCall('GetEventThreatDetectionCustomModule', $request, $callOptions)->wait(); - } - - /** - * Gets service settings for the specified Security Command Center service. - * - * The async variant is - * {@see SecurityCenterManagementClient::getSecurityCenterServiceAsync()} . - * - * @example samples/V1/SecurityCenterManagementClient/get_security_center_service.php - * - * @param GetSecurityCenterServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecurityCenterService - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSecurityCenterService(GetSecurityCenterServiceRequest $request, array $callOptions = []): SecurityCenterService - { - return $this->startApiCall('GetSecurityCenterService', $request, $callOptions)->wait(); - } - - /** - * Retrieves a SecurityHealthAnalyticsCustomModule. - * - * The async variant is - * {@see SecurityCenterManagementClient::getSecurityHealthAnalyticsCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/get_security_health_analytics_custom_module.php - * - * @param GetSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecurityHealthAnalyticsCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SecurityHealthAnalyticsCustomModule - { - return $this->startApiCall('GetSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); - } - - /** - * Lists all resident Event Threat Detection custom modules under the - * given Resource Manager parent and its descendants. - * - * The async variant is - * {@see SecurityCenterManagementClient::listDescendantEventThreatDetectionCustomModulesAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/list_descendant_event_threat_detection_custom_modules.php - * - * @param ListDescendantEventThreatDetectionCustomModulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDescendantEventThreatDetectionCustomModules(ListDescendantEventThreatDetectionCustomModulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDescendantEventThreatDetectionCustomModules', $request, $callOptions); - } - - /** - * Returns a list of all resident SecurityHealthAnalyticsCustomModules under - * the given CRM parent and all of the parent's CRM descendants. - * - * The async variant is - * {@see SecurityCenterManagementClient::listDescendantSecurityHealthAnalyticsCustomModulesAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/list_descendant_security_health_analytics_custom_modules.php - * - * @param ListDescendantSecurityHealthAnalyticsCustomModulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDescendantSecurityHealthAnalyticsCustomModules', $request, $callOptions); - } - - /** - * Lists all effective Event Threat Detection custom modules for the - * given parent. This includes resident modules defined at the scope of the - * parent along with modules inherited from its ancestors. - * - * The async variant is - * {@see SecurityCenterManagementClient::listEffectiveEventThreatDetectionCustomModulesAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/list_effective_event_threat_detection_custom_modules.php - * - * @param ListEffectiveEventThreatDetectionCustomModulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEffectiveEventThreatDetectionCustomModules(ListEffectiveEventThreatDetectionCustomModulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEffectiveEventThreatDetectionCustomModules', $request, $callOptions); - } - - /** - * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - * given parent. This includes resident modules defined at the scope of the - * parent, and inherited modules, inherited from CRM ancestors (no - * descendants). - * - * The async variant is - * {@see SecurityCenterManagementClient::listEffectiveSecurityHealthAnalyticsCustomModulesAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/list_effective_security_health_analytics_custom_modules.php - * - * @param ListEffectiveSecurityHealthAnalyticsCustomModulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEffectiveSecurityHealthAnalyticsCustomModules', $request, $callOptions); - } - - /** - * Lists all Event Threat Detection custom modules for the given - * Resource Manager parent. This includes resident modules defined at the - * scope of the parent along with modules inherited from ancestors. - * - * The async variant is - * {@see SecurityCenterManagementClient::listEventThreatDetectionCustomModulesAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/list_event_threat_detection_custom_modules.php - * - * @param ListEventThreatDetectionCustomModulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEventThreatDetectionCustomModules(ListEventThreatDetectionCustomModulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEventThreatDetectionCustomModules', $request, $callOptions); - } - - /** - * Returns a list of all Security Command Center services for the given - * parent. - * - * The async variant is - * {@see SecurityCenterManagementClient::listSecurityCenterServicesAsync()} . - * - * @example samples/V1/SecurityCenterManagementClient/list_security_center_services.php - * - * @param ListSecurityCenterServicesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSecurityCenterServices(ListSecurityCenterServicesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSecurityCenterServices', $request, $callOptions); - } - - /** - * Returns a list of all SecurityHealthAnalyticsCustomModules for the given - * parent. This includes resident modules defined at the scope of the parent, - * and inherited modules, inherited from CRM ancestors (no descendants). - * - * The async variant is - * {@see SecurityCenterManagementClient::listSecurityHealthAnalyticsCustomModulesAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/list_security_health_analytics_custom_modules.php - * - * @param ListSecurityHealthAnalyticsCustomModulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSecurityHealthAnalyticsCustomModules(ListSecurityHealthAnalyticsCustomModulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSecurityHealthAnalyticsCustomModules', $request, $callOptions); - } - - /** - * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. - * - * The async variant is - * {@see SecurityCenterManagementClient::simulateSecurityHealthAnalyticsCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/simulate_security_health_analytics_custom_module.php - * - * @param SimulateSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SimulateSecurityHealthAnalyticsCustomModuleResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function simulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SimulateSecurityHealthAnalyticsCustomModuleResponse - { - return $this->startApiCall('SimulateSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); - } - - /** - * Updates the Event Threat Detection custom module with the given name based - * on the given update mask. Updating the enablement state is supported for - * both resident and inherited modules (though resident modules cannot have an - * enablement state of "inherited"). Updating the display name or - * configuration of a module is supported for resident modules only. The type - * of a module cannot be changed. - * - * The async variant is - * {@see SecurityCenterManagementClient::updateEventThreatDetectionCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/update_event_threat_detection_custom_module.php - * - * @param UpdateEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EventThreatDetectionCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEventThreatDetectionCustomModule(UpdateEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): EventThreatDetectionCustomModule - { - return $this->startApiCall('UpdateEventThreatDetectionCustomModule', $request, $callOptions)->wait(); - } - - /** - * Updates a Security Command Center service using the given update mask. - * - * The async variant is - * {@see SecurityCenterManagementClient::updateSecurityCenterServiceAsync()} . - * - * @example samples/V1/SecurityCenterManagementClient/update_security_center_service.php - * - * @param UpdateSecurityCenterServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecurityCenterService - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSecurityCenterService(UpdateSecurityCenterServiceRequest $request, array $callOptions = []): SecurityCenterService - { - return $this->startApiCall('UpdateSecurityCenterService', $request, $callOptions)->wait(); - } - - /** - * Updates the SecurityHealthAnalyticsCustomModule under the given name based - * on the given update mask. Updating the enablement state is supported on - * both resident and inherited modules (though resident modules cannot have an - * enablement state of "inherited"). Updating the display name and custom - * config of a module is supported on resident modules only. - * - * The async variant is - * {@see SecurityCenterManagementClient::updateSecurityHealthAnalyticsCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/update_security_health_analytics_custom_module.php - * - * @param UpdateSecurityHealthAnalyticsCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecurityHealthAnalyticsCustomModule - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest $request, array $callOptions = []): SecurityHealthAnalyticsCustomModule - { - return $this->startApiCall('UpdateSecurityHealthAnalyticsCustomModule', $request, $callOptions)->wait(); - } - - /** - * Validates the given Event Threat Detection custom module. - * - * The async variant is - * {@see SecurityCenterManagementClient::validateEventThreatDetectionCustomModuleAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/validate_event_threat_detection_custom_module.php - * - * @param ValidateEventThreatDetectionCustomModuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ValidateEventThreatDetectionCustomModuleResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function validateEventThreatDetectionCustomModule(ValidateEventThreatDetectionCustomModuleRequest $request, array $callOptions = []): ValidateEventThreatDetectionCustomModuleResponse - { - return $this->startApiCall('ValidateEventThreatDetectionCustomModule', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see SecurityCenterManagementClient::getLocationAsync()} . - * - * @example samples/V1/SecurityCenterManagementClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see SecurityCenterManagementClient::listLocationsAsync()} - * . - * - * @example samples/V1/SecurityCenterManagementClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json deleted file mode 100644 index b7aad2f739fd..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.securitycentermanagement.v1", - "libraryPackage": "Google\\Cloud\\SecurityCenterManagement\\V1", - "services": { - "SecurityCenterManagement": { - "clients": { - "grpc": { - "libraryClient": "SecurityCenterManagementGapicClient", - "rpcs": { - "CreateEventThreatDetectionCustomModule": { - "methods": [ - "createEventThreatDetectionCustomModule" - ] - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "createSecurityHealthAnalyticsCustomModule" - ] - }, - "DeleteEventThreatDetectionCustomModule": { - "methods": [ - "deleteEventThreatDetectionCustomModule" - ] - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "methods": [ - "deleteSecurityHealthAnalyticsCustomModule" - ] - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "methods": [ - "getEffectiveEventThreatDetectionCustomModule" - ] - }, - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "methods": [ - "getEffectiveSecurityHealthAnalyticsCustomModule" - ] - }, - "GetEventThreatDetectionCustomModule": { - "methods": [ - "getEventThreatDetectionCustomModule" - ] - }, - "GetSecurityCenterService": { - "methods": [ - "getSecurityCenterService" - ] - }, - "GetSecurityHealthAnalyticsCustomModule": { - "methods": [ - "getSecurityHealthAnalyticsCustomModule" - ] - }, - "ListDescendantEventThreatDetectionCustomModules": { - "methods": [ - "listDescendantEventThreatDetectionCustomModules" - ] - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listDescendantSecurityHealthAnalyticsCustomModules" - ] - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "methods": [ - "listEffectiveEventThreatDetectionCustomModules" - ] - }, - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listEffectiveSecurityHealthAnalyticsCustomModules" - ] - }, - "ListEventThreatDetectionCustomModules": { - "methods": [ - "listEventThreatDetectionCustomModules" - ] - }, - "ListSecurityCenterServices": { - "methods": [ - "listSecurityCenterServices" - ] - }, - "ListSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listSecurityHealthAnalyticsCustomModules" - ] - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "simulateSecurityHealthAnalyticsCustomModule" - ] - }, - "UpdateEventThreatDetectionCustomModule": { - "methods": [ - "updateEventThreatDetectionCustomModule" - ] - }, - "UpdateSecurityCenterService": { - "methods": [ - "updateSecurityCenterService" - ] - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "updateSecurityHealthAnalyticsCustomModule" - ] - }, - "ValidateEventThreatDetectionCustomModule": { - "methods": [ - "validateEventThreatDetectionCustomModule" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json deleted file mode 100644 index cefc54399731..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_client_config.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "interfaces": { - "google.cloud.securitycentermanagement.v1.SecurityCenterManagement": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSecurityCenterService": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDescendantEventThreatDetectionCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEventThreatDetectionCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSecurityCenterServices": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSecurityHealthAnalyticsCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateSecurityCenterService": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ValidateEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php deleted file mode 100644 index 840299f2b1b6..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_descriptor_config.php +++ /dev/null @@ -1,398 +0,0 @@ - [ - 'google.cloud.securitycentermanagement.v1.SecurityCenterManagement' => [ - 'CreateEventThreatDetectionCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSecurityHealthAnalyticsCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEventThreatDetectionCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSecurityHealthAnalyticsCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEffectiveEventThreatDetectionCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEffectiveSecurityHealthAnalyticsCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEventThreatDetectionCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSecurityCenterService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSecurityHealthAnalyticsCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDescendantEventThreatDetectionCustomModules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEventThreatDetectionCustomModules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListDescendantEventThreatDetectionCustomModulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDescendantSecurityHealthAnalyticsCustomModules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSecurityHealthAnalyticsCustomModules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListDescendantSecurityHealthAnalyticsCustomModulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEffectiveEventThreatDetectionCustomModules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEffectiveEventThreatDetectionCustomModules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListEffectiveEventThreatDetectionCustomModulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEffectiveSecurityHealthAnalyticsCustomModules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEffectiveSecurityHealthAnalyticsCustomModules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEventThreatDetectionCustomModules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEventThreatDetectionCustomModules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListEventThreatDetectionCustomModulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSecurityCenterServices' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSecurityCenterServices', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListSecurityCenterServicesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSecurityHealthAnalyticsCustomModules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSecurityHealthAnalyticsCustomModules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ListSecurityHealthAnalyticsCustomModulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SimulateSecurityHealthAnalyticsCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEventThreatDetectionCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'event_threat_detection_custom_module.name', - 'fieldAccessors' => [ - 'getEventThreatDetectionCustomModule', - 'getName', - ], - ], - ], - ], - 'UpdateSecurityCenterService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService', - 'headerParams' => [ - [ - 'keyName' => 'security_center_service.name', - 'fieldAccessors' => [ - 'getSecurityCenterService', - 'getName', - ], - ], - ], - ], - 'UpdateSecurityHealthAnalyticsCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule', - 'headerParams' => [ - [ - 'keyName' => 'security_health_analytics_custom_module.name', - 'fieldAccessors' => [ - 'getSecurityHealthAnalyticsCustomModule', - 'getName', - ], - ], - ], - ], - 'ValidateEventThreatDetectionCustomModule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'effectiveEventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', - 'effectiveSecurityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', - 'eventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', - 'folderLocation' => 'folders/{folder}/locations/{location}', - 'folderLocationEffectiveEventThreatDetectionCustomModule' => 'folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', - 'folderLocationEffectiveSecurityHealthAnalyticsCustomModule' => 'folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', - 'folderLocationEventThreatDetectionCustomModule' => 'folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', - 'folderLocationSecurityHealthAnalyticsCustomModule' => 'folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', - 'folderLocationService' => 'folders/{folder}/locations/{location}/securityCenterServices/{service}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationEffectiveEventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', - 'organizationLocationEffectiveSecurityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', - 'organizationLocationEventThreatDetectionCustomModule' => 'organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', - 'organizationLocationSecurityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', - 'organizationLocationService' => 'organizations/{organization}/locations/{location}/securityCenterServices/{service}', - 'projectLocationEffectiveEventThreatDetectionCustomModule' => 'projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}', - 'projectLocationEffectiveSecurityHealthAnalyticsCustomModule' => 'projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}', - 'projectLocationEventThreatDetectionCustomModule' => 'projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}', - 'projectLocationSecurityHealthAnalyticsCustomModule' => 'projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', - 'projectLocationService' => 'projects/{project}/locations/{location}/securityCenterServices/{service}', - 'securityCenterService' => 'projects/{project}/locations/{location}/securityCenterServices/{service}', - 'securityHealthAnalyticsCustomModule' => 'organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}', - ], - ], - ], -]; diff --git a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php b/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php deleted file mode 100644 index 545daa6979b5..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/src/V1/resources/security_center_management_rest_client_config.php +++ /dev/null @@ -1,545 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.securitycentermanagement.v1.SecurityCenterManagement' => [ - 'CreateEventThreatDetectionCustomModule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules', - 'body' => 'event_threat_detection_custom_module', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules', - 'body' => 'event_threat_detection_custom_module', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules', - 'body' => 'event_threat_detection_custom_module', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSecurityHealthAnalyticsCustomModule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules', - 'body' => 'security_health_analytics_custom_module', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules', - 'body' => 'security_health_analytics_custom_module', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules', - 'body' => 'security_health_analytics_custom_module', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEventThreatDetectionCustomModule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSecurityHealthAnalyticsCustomModule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEffectiveEventThreatDetectionCustomModule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEffectiveSecurityHealthAnalyticsCustomModule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEventThreatDetectionCustomModule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSecurityCenterService' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/securityCenterServices/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/securityCenterServices/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityCenterServices/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSecurityHealthAnalyticsCustomModule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDescendantEventThreatDetectionCustomModules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendant', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDescendantSecurityHealthAnalyticsCustomModules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEffectiveEventThreatDetectionCustomModules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModules', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEffectiveSecurityHealthAnalyticsCustomModules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEventThreatDetectionCustomModules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSecurityCenterServices' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityCenterServices', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityCenterServices', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityCenterServices', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSecurityHealthAnalyticsCustomModules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SimulateSecurityHealthAnalyticsCustomModule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEventThreatDetectionCustomModule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}', - 'body' => 'event_threat_detection_custom_module', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}', - 'body' => 'event_threat_detection_custom_module', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}', - 'body' => 'event_threat_detection_custom_module', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'event_threat_detection_custom_module.name' => [ - 'getters' => [ - 'getEventThreatDetectionCustomModule', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSecurityCenterService' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}', - 'body' => 'security_center_service', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}', - 'body' => 'security_center_service', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}', - 'body' => 'security_center_service', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'security_center_service.name' => [ - 'getters' => [ - 'getSecurityCenterService', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSecurityHealthAnalyticsCustomModule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}', - 'body' => 'security_health_analytics_custom_module', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}', - 'body' => 'security_health_analytics_custom_module', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}', - 'body' => 'security_health_analytics_custom_module', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'security_health_analytics_custom_module.name' => [ - 'getters' => [ - 'getSecurityHealthAnalyticsCustomModule', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'ValidateEventThreatDetectionCustomModule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php b/owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php deleted file mode 100644 index d7ffccab1458..000000000000 --- a/owl-bot-staging/SecurityCenterManagement/v1/tests/Unit/V1/Client/SecurityCenterManagementClientTest.php +++ /dev/null @@ -1,1774 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SecurityCenterManagementClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SecurityCenterManagementClient($options); - } - - /** @test */ - public function createEventThreatDetectionCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $ancestorModule = 'ancestorModule-521996712'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $lastEditor = 'lastEditor1620154166'; - $expectedResponse = new EventThreatDetectionCustomModule(); - $expectedResponse->setName($name); - $expectedResponse->setAncestorModule($ancestorModule); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLastEditor($lastEditor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); - $request = (new CreateEventThreatDetectionCustomModuleRequest()) - ->setParent($formattedParent) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - $response = $gapicClient->createEventThreatDetectionCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/CreateEventThreatDetectionCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEventThreatDetectionCustomModule(); - $this->assertProtobufEquals($eventThreatDetectionCustomModule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventThreatDetectionCustomModuleExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); - $request = (new CreateEventThreatDetectionCustomModuleRequest()) - ->setParent($formattedParent) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - try { - $gapicClient->createEventThreatDetectionCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSecurityHealthAnalyticsCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $lastEditor = 'lastEditor1620154166'; - $ancestorModule = 'ancestorModule-521996712'; - $expectedResponse = new SecurityHealthAnalyticsCustomModule(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setAncestorModule($ancestorModule); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); - $request = (new CreateSecurityHealthAnalyticsCustomModuleRequest()) - ->setParent($formattedParent) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); - $response = $gapicClient->createSecurityHealthAnalyticsCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/CreateSecurityHealthAnalyticsCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSecurityHealthAnalyticsCustomModule(); - $this->assertProtobufEquals($securityHealthAnalyticsCustomModule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSecurityHealthAnalyticsCustomModuleExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); - $request = (new CreateSecurityHealthAnalyticsCustomModuleRequest()) - ->setParent($formattedParent) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); - try { - $gapicClient->createSecurityHealthAnalyticsCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventThreatDetectionCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); - $request = (new DeleteEventThreatDetectionCustomModuleRequest()) - ->setName($formattedName); - $gapicClient->deleteEventThreatDetectionCustomModule($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/DeleteEventThreatDetectionCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventThreatDetectionCustomModuleExceptionTest() - { - $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->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); - $request = (new DeleteEventThreatDetectionCustomModuleRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEventThreatDetectionCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSecurityHealthAnalyticsCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); - $request = (new DeleteSecurityHealthAnalyticsCustomModuleRequest()) - ->setName($formattedName); - $gapicClient->deleteSecurityHealthAnalyticsCustomModule($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/DeleteSecurityHealthAnalyticsCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSecurityHealthAnalyticsCustomModuleExceptionTest() - { - $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->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); - $request = (new DeleteSecurityHealthAnalyticsCustomModuleRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSecurityHealthAnalyticsCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEffectiveEventThreatDetectionCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new EffectiveEventThreatDetectionCustomModule(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->effectiveEventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); - $request = (new GetEffectiveEventThreatDetectionCustomModuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getEffectiveEventThreatDetectionCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetEffectiveEventThreatDetectionCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEffectiveEventThreatDetectionCustomModuleExceptionTest() - { - $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->effectiveEventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); - $request = (new GetEffectiveEventThreatDetectionCustomModuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getEffectiveEventThreatDetectionCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEffectiveSecurityHealthAnalyticsCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new EffectiveSecurityHealthAnalyticsCustomModule(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->effectiveSecurityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); - $request = (new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getEffectiveSecurityHealthAnalyticsCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetEffectiveSecurityHealthAnalyticsCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEffectiveSecurityHealthAnalyticsCustomModuleExceptionTest() - { - $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->effectiveSecurityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); - $request = (new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getEffectiveSecurityHealthAnalyticsCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventThreatDetectionCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $ancestorModule = 'ancestorModule-521996712'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $lastEditor = 'lastEditor1620154166'; - $expectedResponse = new EventThreatDetectionCustomModule(); - $expectedResponse->setName($name2); - $expectedResponse->setAncestorModule($ancestorModule); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLastEditor($lastEditor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); - $request = (new GetEventThreatDetectionCustomModuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getEventThreatDetectionCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetEventThreatDetectionCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventThreatDetectionCustomModuleExceptionTest() - { - $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->eventThreatDetectionCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'); - $request = (new GetEventThreatDetectionCustomModuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getEventThreatDetectionCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSecurityCenterServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new SecurityCenterService(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->securityCenterServiceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new GetSecurityCenterServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->getSecurityCenterService($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetSecurityCenterService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSecurityCenterServiceExceptionTest() - { - $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->securityCenterServiceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new GetSecurityCenterServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->getSecurityCenterService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSecurityHealthAnalyticsCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $lastEditor = 'lastEditor1620154166'; - $ancestorModule = 'ancestorModule-521996712'; - $expectedResponse = new SecurityHealthAnalyticsCustomModule(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setAncestorModule($ancestorModule); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); - $request = (new GetSecurityHealthAnalyticsCustomModuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getSecurityHealthAnalyticsCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/GetSecurityHealthAnalyticsCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSecurityHealthAnalyticsCustomModuleExceptionTest() - { - $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->securityHealthAnalyticsCustomModuleName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'); - $request = (new GetSecurityHealthAnalyticsCustomModuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getSecurityHealthAnalyticsCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDescendantEventThreatDetectionCustomModulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventThreatDetectionCustomModulesElement = new EventThreatDetectionCustomModule(); - $eventThreatDetectionCustomModules = [ - $eventThreatDetectionCustomModulesElement, - ]; - $expectedResponse = new ListDescendantEventThreatDetectionCustomModulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEventThreatDetectionCustomModules($eventThreatDetectionCustomModules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListDescendantEventThreatDetectionCustomModulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDescendantEventThreatDetectionCustomModules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEventThreatDetectionCustomModules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListDescendantEventThreatDetectionCustomModules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDescendantEventThreatDetectionCustomModulesExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListDescendantEventThreatDetectionCustomModulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDescendantEventThreatDetectionCustomModules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDescendantSecurityHealthAnalyticsCustomModulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $securityHealthAnalyticsCustomModulesElement = new SecurityHealthAnalyticsCustomModule(); - $securityHealthAnalyticsCustomModules = [ - $securityHealthAnalyticsCustomModulesElement, - ]; - $expectedResponse = new ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSecurityHealthAnalyticsCustomModules($securityHealthAnalyticsCustomModules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListDescendantSecurityHealthAnalyticsCustomModulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDescendantSecurityHealthAnalyticsCustomModules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSecurityHealthAnalyticsCustomModules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListDescendantSecurityHealthAnalyticsCustomModules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDescendantSecurityHealthAnalyticsCustomModulesExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListDescendantSecurityHealthAnalyticsCustomModulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDescendantSecurityHealthAnalyticsCustomModules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEffectiveEventThreatDetectionCustomModulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $effectiveEventThreatDetectionCustomModulesElement = new EffectiveEventThreatDetectionCustomModule(); - $effectiveEventThreatDetectionCustomModules = [ - $effectiveEventThreatDetectionCustomModulesElement, - ]; - $expectedResponse = new ListEffectiveEventThreatDetectionCustomModulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEffectiveEventThreatDetectionCustomModules($effectiveEventThreatDetectionCustomModules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListEffectiveEventThreatDetectionCustomModulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEffectiveEventThreatDetectionCustomModules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEffectiveEventThreatDetectionCustomModules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListEffectiveEventThreatDetectionCustomModules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEffectiveEventThreatDetectionCustomModulesExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListEffectiveEventThreatDetectionCustomModulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEffectiveEventThreatDetectionCustomModules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEffectiveSecurityHealthAnalyticsCustomModulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $effectiveSecurityHealthAnalyticsCustomModulesElement = new EffectiveSecurityHealthAnalyticsCustomModule(); - $effectiveSecurityHealthAnalyticsCustomModules = [ - $effectiveSecurityHealthAnalyticsCustomModulesElement, - ]; - $expectedResponse = new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEffectiveSecurityHealthAnalyticsCustomModules($effectiveSecurityHealthAnalyticsCustomModules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEffectiveSecurityHealthAnalyticsCustomModules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEffectiveSecurityHealthAnalyticsCustomModules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListEffectiveSecurityHealthAnalyticsCustomModules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEffectiveSecurityHealthAnalyticsCustomModulesExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEffectiveSecurityHealthAnalyticsCustomModules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventThreatDetectionCustomModulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventThreatDetectionCustomModulesElement = new EventThreatDetectionCustomModule(); - $eventThreatDetectionCustomModules = [ - $eventThreatDetectionCustomModulesElement, - ]; - $expectedResponse = new ListEventThreatDetectionCustomModulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEventThreatDetectionCustomModules($eventThreatDetectionCustomModules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListEventThreatDetectionCustomModulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEventThreatDetectionCustomModules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEventThreatDetectionCustomModules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListEventThreatDetectionCustomModules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventThreatDetectionCustomModulesExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListEventThreatDetectionCustomModulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEventThreatDetectionCustomModules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSecurityCenterServicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $securityCenterServicesElement = new SecurityCenterService(); - $securityCenterServices = [ - $securityCenterServicesElement, - ]; - $expectedResponse = new ListSecurityCenterServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSecurityCenterServices($securityCenterServices); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListSecurityCenterServicesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSecurityCenterServices($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSecurityCenterServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListSecurityCenterServices', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSecurityCenterServicesExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListSecurityCenterServicesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSecurityCenterServices($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSecurityHealthAnalyticsCustomModulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $securityHealthAnalyticsCustomModulesElement = new SecurityHealthAnalyticsCustomModule(); - $securityHealthAnalyticsCustomModules = [ - $securityHealthAnalyticsCustomModulesElement, - ]; - $expectedResponse = new ListSecurityHealthAnalyticsCustomModulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSecurityHealthAnalyticsCustomModules($securityHealthAnalyticsCustomModules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListSecurityHealthAnalyticsCustomModulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSecurityHealthAnalyticsCustomModules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSecurityHealthAnalyticsCustomModules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ListSecurityHealthAnalyticsCustomModules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSecurityHealthAnalyticsCustomModulesExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListSecurityHealthAnalyticsCustomModulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSecurityHealthAnalyticsCustomModules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function simulateSecurityHealthAnalyticsCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SimulateSecurityHealthAnalyticsCustomModuleResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $customConfig = new CustomConfig(); - $resource = new SimulatedResource(); - $resourceResourceType = 'resourceResourceType305300374'; - $resource->setResourceType($resourceResourceType); - $request = (new SimulateSecurityHealthAnalyticsCustomModuleRequest()) - ->setParent($parent) - ->setCustomConfig($customConfig) - ->setResource($resource); - $response = $gapicClient->simulateSecurityHealthAnalyticsCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/SimulateSecurityHealthAnalyticsCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCustomConfig(); - $this->assertProtobufEquals($customConfig, $actualValue); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function simulateSecurityHealthAnalyticsCustomModuleExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $customConfig = new CustomConfig(); - $resource = new SimulatedResource(); - $resourceResourceType = 'resourceResourceType305300374'; - $resource->setResourceType($resourceResourceType); - $request = (new SimulateSecurityHealthAnalyticsCustomModuleRequest()) - ->setParent($parent) - ->setCustomConfig($customConfig) - ->setResource($resource); - try { - $gapicClient->simulateSecurityHealthAnalyticsCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEventThreatDetectionCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $ancestorModule = 'ancestorModule-521996712'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $lastEditor = 'lastEditor1620154166'; - $expectedResponse = new EventThreatDetectionCustomModule(); - $expectedResponse->setName($name); - $expectedResponse->setAncestorModule($ancestorModule); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLastEditor($lastEditor); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); - $request = (new UpdateEventThreatDetectionCustomModuleRequest()) - ->setUpdateMask($updateMask) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - $response = $gapicClient->updateEventThreatDetectionCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/UpdateEventThreatDetectionCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getEventThreatDetectionCustomModule(); - $this->assertProtobufEquals($eventThreatDetectionCustomModule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEventThreatDetectionCustomModuleExceptionTest() - { - $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 - $updateMask = new FieldMask(); - $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); - $request = (new UpdateEventThreatDetectionCustomModuleRequest()) - ->setUpdateMask($updateMask) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - try { - $gapicClient->updateEventThreatDetectionCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecurityCenterServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new SecurityCenterService(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $securityCenterService = new SecurityCenterService(); - $updateMask = new FieldMask(); - $request = (new UpdateSecurityCenterServiceRequest()) - ->setSecurityCenterService($securityCenterService) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSecurityCenterService($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/UpdateSecurityCenterService', $actualFuncCall); - $actualValue = $actualRequestObject->getSecurityCenterService(); - $this->assertProtobufEquals($securityCenterService, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecurityCenterServiceExceptionTest() - { - $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 - $securityCenterService = new SecurityCenterService(); - $updateMask = new FieldMask(); - $request = (new UpdateSecurityCenterServiceRequest()) - ->setSecurityCenterService($securityCenterService) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateSecurityCenterService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecurityHealthAnalyticsCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $lastEditor = 'lastEditor1620154166'; - $ancestorModule = 'ancestorModule-521996712'; - $expectedResponse = new SecurityHealthAnalyticsCustomModule(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setAncestorModule($ancestorModule); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); - $request = (new UpdateSecurityHealthAnalyticsCustomModuleRequest()) - ->setUpdateMask($updateMask) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); - $response = $gapicClient->updateSecurityHealthAnalyticsCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/UpdateSecurityHealthAnalyticsCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getSecurityHealthAnalyticsCustomModule(); - $this->assertProtobufEquals($securityHealthAnalyticsCustomModule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecurityHealthAnalyticsCustomModuleExceptionTest() - { - $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 - $updateMask = new FieldMask(); - $securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); - $request = (new UpdateSecurityHealthAnalyticsCustomModuleRequest()) - ->setUpdateMask($updateMask) - ->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule); - try { - $gapicClient->updateSecurityHealthAnalyticsCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateEventThreatDetectionCustomModuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ValidateEventThreatDetectionCustomModuleResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $rawText = 'rawText503586532'; - $type = 'type3575610'; - $request = (new ValidateEventThreatDetectionCustomModuleRequest()) - ->setParent($formattedParent) - ->setRawText($rawText) - ->setType($type); - $response = $gapicClient->validateEventThreatDetectionCustomModule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/ValidateEventThreatDetectionCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRawText(); - $this->assertProtobufEquals($rawText, $actualValue); - $actualValue = $actualRequestObject->getType(); - $this->assertProtobufEquals($type, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateEventThreatDetectionCustomModuleExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $rawText = 'rawText503586532'; - $type = 'type3575610'; - $request = (new ValidateEventThreatDetectionCustomModuleRequest()) - ->setParent($formattedParent) - ->setRawText($rawText) - ->setType($type); - try { - $gapicClient->validateEventThreatDetectionCustomModule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventThreatDetectionCustomModuleAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $ancestorModule = 'ancestorModule-521996712'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $lastEditor = 'lastEditor1620154166'; - $expectedResponse = new EventThreatDetectionCustomModule(); - $expectedResponse->setName($name); - $expectedResponse->setAncestorModule($ancestorModule); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLastEditor($lastEditor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule(); - $request = (new CreateEventThreatDetectionCustomModuleRequest()) - ->setParent($formattedParent) - ->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule); - $response = $gapicClient->createEventThreatDetectionCustomModuleAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycentermanagement.v1.SecurityCenterManagement/CreateEventThreatDetectionCustomModule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEventThreatDetectionCustomModule(); - $this->assertProtobufEquals($eventThreatDetectionCustomModule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}