From 41504988ee86ce33dd87a146ddbe95a8a189ec8e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Mar 2026 15:05:36 +0000 Subject: [PATCH 1/2] feat: Publish proto definitions for AuthzPolicy, TlsInspectionPolicy, GatewaySecurityPolicy, GatewaySecurityPolicyRule, and UrlList feat: Publish proto definitions for Intercept, Mirroring and SecurityProfileGroup feat: Publish proto definitions for SSG docs: Update and cleanup docs PiperOrigin-RevId: 889789965 Source-Link: https://github.com/googleapis/googleapis/commit/a4d528d01081a6b01be58007a241867534e81deb Source-Link: https://github.com/googleapis/googleapis-gen/commit/0b793c6cf0f81fa0ab5ae398e6b1ba660788e0ec Copy-Tag: eyJwIjoiTmV0d29ya1NlY3VyaXR5Ly5Pd2xCb3QueWFtbCIsImgiOiIwYjc5M2M2Y2YwZjgxZmEwYWI1YWUzOThlNmIxYmE2NjA3ODhlMGVjIn0= --- .../Cloud/Networksecurity/V1/AddressGroup.php | 34 + .../V1/AuthorizationPolicy.php | 28 + .../Cloud/Networksecurity/V1/AuthzPolicy.php | 29 + .../V1/BackendAuthenticationConfig.php | 28 + .../Networksecurity/V1/ClientTlsPolicy.php | 29 + .../Cloud/Networksecurity/V1/Common.php | 26 + .../Networksecurity/V1/DnsThreatDetector.php | 31 + .../Networksecurity/V1/FirewallActivation.php | 33 + .../V1/GatewaySecurityPolicy.php | 28 + .../V1/GatewaySecurityPolicyRule.php | 28 + .../Cloud/Networksecurity/V1/Intercept.php | 34 + .../Cloud/Networksecurity/V1/Mirroring.php | 34 + .../Networksecurity/V1/NetworkSecurity.php | 38 + .../V1/SecurityProfileGroup.php | 31 + .../V1/SecurityProfileGroupIntercept.php | 26 + .../V1/SecurityProfileGroupMirroring.php | 26 + .../V1/SecurityProfileGroupService.php | 33 + .../SecurityProfileGroupThreatprevention.php | 25 + .../V1/SecurityProfileGroupUrlfiltering.php | 25 + .../Networksecurity/V1/ServerTlsPolicy.php | 29 + .../Google/Cloud/Networksecurity/V1/Tls.php | 25 + .../V1/TlsInspectionPolicy.php | 28 + .../Cloud/Networksecurity/V1/UrlList.php | 28 + .../V1/AddAddressGroupItemsRequest.php | 196 + .../Cloud/NetworkSecurity/V1/AddressGroup.php | 402 ++ .../V1/AddressGroup/Purpose.php | 66 + .../NetworkSecurity/V1/AddressGroup/Type.php | 61 + .../NetworkSecurity/V1/AntivirusOverride.php | 105 + .../V1/AuthorizationPolicy.php | 322 + .../V1/AuthorizationPolicy/Action.php | 63 + .../V1/AuthorizationPolicy/Rule.php | 129 + .../AuthorizationPolicy/Rule/Destination.php | 215 + .../Rule/Destination/HttpHeaderMatch.php | 139 + .../V1/AuthorizationPolicy/Rule/Source.php | 137 + .../Cloud/NetworkSecurity/V1/AuthzPolicy.php | 526 ++ .../V1/AuthzPolicy/AuthzAction.php | 69 + .../V1/AuthzPolicy/AuthzRule.php | 167 + .../V1/AuthzPolicy/AuthzRule/From.php | 129 + .../AuthzRule/From/RequestSource.php | 195 + .../V1/AuthzPolicy/AuthzRule/HeaderMatch.php | 111 + .../V1/AuthzPolicy/AuthzRule/IpBlock.php | 101 + .../V1/AuthzPolicy/AuthzRule/Principal.php | 131 + .../AuthzRule/Principal/PrincipalSelector.php | 87 + .../AuthzPolicy/AuthzRule/RequestResource.php | 134 + .../RequestResource/TagValueIdSet.php | 81 + .../V1/AuthzPolicy/AuthzRule/StringMatch.php | 249 + .../V1/AuthzPolicy/AuthzRule/To.php | 137 + .../AuthzRule/To/RequestOperation.php | 283 + .../BaseProtocolMethodsOption.php | 61 + .../To/RequestOperation/HeaderSet.php | 87 + .../AuthzRule/To/RequestOperation/MCP.php | 150 + .../To/RequestOperation/MCPMethod.php | 145 + .../V1/AuthzPolicy/CustomProvider.php | 146 + .../CustomProvider/AuthzExtension.php | 76 + .../AuthzPolicy/CustomProvider/CloudIap.php | 38 + .../V1/AuthzPolicy/LoadBalancingScheme.php | 74 + .../V1/AuthzPolicy/PolicyProfile.php | 70 + .../NetworkSecurity/V1/AuthzPolicy/Target.php | 121 + .../V1/BackendAuthenticationConfig.php | 422 ++ .../WellKnownRoots.php | 69 + .../V1/CertificateProvider.php | 118 + .../V1/CertificateProviderInstance.php | 78 + .../NetworkSecurity/V1/ClientTlsPolicy.php | 361 ++ .../V1/CloneAddressGroupItemsRequest.php | 197 + .../V1/CreateAddressGroupRequest.php | 257 + .../V1/CreateAuthorizationPolicyRequest.php | 183 + .../V1/CreateAuthzPolicyRequest.php | 242 + ...eateBackendAuthenticationConfigRequest.php | 183 + .../V1/CreateClientTlsPolicyRequest.php | 183 + .../V1/CreateDnsThreatDetectorRequest.php | 168 + ...eateFirewallEndpointAssociationRequest.php | 247 + .../V1/CreateFirewallEndpointRequest.php | 247 + .../V1/CreateGatewaySecurityPolicyRequest.php | 183 + ...CreateGatewaySecurityPolicyRuleRequest.php | 189 + .../CreateInterceptDeploymentGroupRequest.php | 215 + .../V1/CreateInterceptDeploymentRequest.php | 215 + ...terceptEndpointGroupAssociationRequest.php | 220 + .../CreateInterceptEndpointGroupRequest.php | 215 + .../CreateMirroringDeploymentGroupRequest.php | 215 + .../V1/CreateMirroringDeploymentRequest.php | 215 + ...rroringEndpointGroupAssociationRequest.php | 220 + .../CreateMirroringEndpointGroupRequest.php | 215 + .../V1/CreateSecurityProfileGroupRequest.php | 183 + .../V1/CreateSecurityProfileRequest.php | 183 + .../V1/CreateServerTlsPolicyRequest.php | 183 + .../V1/CreateTlsInspectionPolicyRequest.php | 183 + .../V1/CreateUrlListRequest.php | 178 + .../V1/CustomInterceptProfile.php | 76 + .../V1/CustomMirroringProfile.php | 76 + .../V1/DeleteAddressGroupRequest.php | 160 + .../V1/DeleteAuthorizationPolicyRequest.php | 86 + .../V1/DeleteAuthzPolicyRequest.php | 165 + ...leteBackendAuthenticationConfigRequest.php | 129 + .../V1/DeleteClientTlsPolicyRequest.php | 86 + .../V1/DeleteDnsThreatDetectorRequest.php | 81 + ...leteFirewallEndpointAssociationRequest.php | 155 + .../V1/DeleteFirewallEndpointRequest.php | 155 + .../V1/DeleteGatewaySecurityPolicyRequest.php | 86 + ...DeleteGatewaySecurityPolicyRuleRequest.php | 91 + .../DeleteInterceptDeploymentGroupRequest.php | 123 + .../V1/DeleteInterceptDeploymentRequest.php | 123 + ...terceptEndpointGroupAssociationRequest.php | 123 + .../DeleteInterceptEndpointGroupRequest.php | 123 + .../DeleteMirroringDeploymentGroupRequest.php | 123 + .../V1/DeleteMirroringDeploymentRequest.php | 123 + ...rroringEndpointGroupAssociationRequest.php | 123 + .../DeleteMirroringEndpointGroupRequest.php | 123 + .../V1/DeleteSecurityProfileGroupRequest.php | 129 + .../V1/DeleteSecurityProfileRequest.php | 124 + .../V1/DeleteServerTlsPolicyRequest.php | 86 + .../V1/DeleteTlsInspectionPolicyRequest.php | 133 + .../V1/DeleteUrlListRequest.php | 86 + .../NetworkSecurity/V1/DnsThreatDetector.php | 276 + .../V1/DnsThreatDetector/Provider.php | 54 + .../NetworkSecurity/V1/FirewallEndpoint.php | 574 ++ .../FirewallEndpoint/AssociationReference.php | 114 + .../V1/FirewallEndpoint/EndpointSettings.php | 71 + .../V1/FirewallEndpoint/State.php | 75 + .../V1/FirewallEndpointAssociation.php | 401 ++ .../V1/FirewallEndpointAssociation/State.php | 82 + .../V1/GatewaySecurityPolicy.php | 240 + .../V1/GatewaySecurityPolicyRule.php | 427 ++ .../BasicProfile.php | 61 + .../V1/GetAddressGroupRequest.php | 86 + .../V1/GetAuthorizationPolicyRequest.php | 86 + .../V1/GetAuthzPolicyRequest.php | 91 + .../GetBackendAuthenticationConfigRequest.php | 86 + .../V1/GetClientTlsPolicyRequest.php | 86 + .../V1/GetDnsThreatDetectorRequest.php | 81 + .../GetFirewallEndpointAssociationRequest.php | 81 + .../V1/GetFirewallEndpointRequest.php | 81 + .../V1/GetGatewaySecurityPolicyRequest.php | 86 + .../GetGatewaySecurityPolicyRuleRequest.php | 91 + .../V1/GetInterceptDeploymentGroupRequest.php | 91 + .../V1/GetInterceptDeploymentRequest.php | 91 + ...terceptEndpointGroupAssociationRequest.php | 91 + .../V1/GetInterceptEndpointGroupRequest.php | 91 + .../V1/GetMirroringDeploymentGroupRequest.php | 91 + .../V1/GetMirroringDeploymentRequest.php | 91 + ...rroringEndpointGroupAssociationRequest.php | 91 + .../V1/GetMirroringEndpointGroupRequest.php | 91 + .../V1/GetSecurityProfileGroupRequest.php | 86 + .../V1/GetSecurityProfileRequest.php | 86 + .../V1/GetServerTlsPolicyRequest.php | 86 + .../V1/GetTlsInspectionPolicyRequest.php | 86 + .../NetworkSecurity/V1/GetUrlListRequest.php | 86 + .../Cloud/NetworkSecurity/V1/GrpcEndpoint.php | 71 + .../V1/InterceptDeployment.php | 426 ++ .../V1/InterceptDeployment/State.php | 87 + .../V1/InterceptDeploymentGroup.php | 494 ++ .../ConnectedEndpointGroup.php | 75 + .../InterceptDeploymentGroup/Deployment.php | 105 + .../V1/InterceptDeploymentGroup/State.php | 68 + .../V1/InterceptEndpointGroup.php | 467 ++ .../AssociationDetails.php | 151 + .../ConnectedDeploymentGroup.php | 109 + .../V1/InterceptEndpointGroup/State.php | 97 + .../V1/InterceptEndpointGroupAssociation.php | 517 ++ .../LocationDetails.php | 102 + .../LocationDetails/State.php | 64 + .../State.php | 95 + .../NetworkSecurity/V1/InterceptLocation.php | 101 + .../V1/InterceptLocation/State.php | 64 + .../V1/ListAddressGroupReferencesRequest.php | 174 + .../V1/ListAddressGroupReferencesResponse.php | 109 + .../AddressGroupReference.php | 135 + .../V1/ListAddressGroupsRequest.php | 209 + .../V1/ListAddressGroupsResponse.php | 143 + .../V1/ListAuthorizationPoliciesRequest.php | 171 + .../V1/ListAuthorizationPoliciesResponse.php | 109 + .../V1/ListAuthzPoliciesRequest.php | 231 + .../V1/ListAuthzPoliciesResponse.php | 135 + ...istBackendAuthenticationConfigsRequest.php | 171 + ...stBackendAuthenticationConfigsResponse.php | 143 + .../V1/ListClientTlsPoliciesRequest.php | 166 + .../V1/ListClientTlsPoliciesResponse.php | 109 + .../V1/ListDnsThreatDetectorsRequest.php | 161 + .../V1/ListDnsThreatDetectorsResponse.php | 135 + ...istFirewallEndpointAssociationsRequest.php | 221 + ...stFirewallEndpointAssociationsResponse.php | 135 + .../V1/ListFirewallEndpointsRequest.php | 221 + .../V1/ListFirewallEndpointsResponse.php | 135 + .../V1/ListGatewaySecurityPoliciesRequest.php | 171 + .../ListGatewaySecurityPoliciesResponse.php | 143 + .../ListGatewaySecurityPolicyRulesRequest.php | 171 + ...ListGatewaySecurityPolicyRulesResponse.php | 143 + .../ListInterceptDeploymentGroupsRequest.php | 259 + .../ListInterceptDeploymentGroupsResponse.php | 109 + .../V1/ListInterceptDeploymentsRequest.php | 259 + .../V1/ListInterceptDeploymentsResponse.php | 143 + ...erceptEndpointGroupAssociationsRequest.php | 259 + ...rceptEndpointGroupAssociationsResponse.php | 109 + .../V1/ListInterceptEndpointGroupsRequest.php | 263 + .../ListInterceptEndpointGroupsResponse.php | 109 + .../ListMirroringDeploymentGroupsRequest.php | 259 + .../ListMirroringDeploymentGroupsResponse.php | 109 + .../V1/ListMirroringDeploymentsRequest.php | 259 + .../V1/ListMirroringDeploymentsResponse.php | 143 + ...roringEndpointGroupAssociationsRequest.php | 259 + ...oringEndpointGroupAssociationsResponse.php | 109 + .../V1/ListMirroringEndpointGroupsRequest.php | 263 + .../ListMirroringEndpointGroupsResponse.php | 109 + .../V1/ListSecurityProfileGroupsRequest.php | 171 + .../V1/ListSecurityProfileGroupsResponse.php | 109 + .../V1/ListSecurityProfilesRequest.php | 171 + .../V1/ListSecurityProfilesResponse.php | 109 + .../V1/ListServerTlsPoliciesRequest.php | 216 + .../V1/ListServerTlsPoliciesResponse.php | 151 + .../V1/ListTlsInspectionPoliciesRequest.php | 171 + .../V1/ListTlsInspectionPoliciesResponse.php | 143 + .../V1/ListUrlListsRequest.php | 171 + .../V1/ListUrlListsResponse.php | 143 + .../V1/MirroringDeployment.php | 426 ++ .../V1/MirroringDeployment/State.php | 87 + .../V1/MirroringDeploymentGroup.php | 494 ++ .../ConnectedEndpointGroup.php | 75 + .../MirroringDeploymentGroup/Deployment.php | 105 + .../V1/MirroringDeploymentGroup/State.php | 75 + .../V1/MirroringEndpointGroup.php | 495 ++ .../AssociationDetails.php | 151 + .../ConnectedDeploymentGroup.php | 109 + .../V1/MirroringEndpointGroup/State.php | 96 + .../V1/MirroringEndpointGroup/Type.php | 54 + .../V1/MirroringEndpointGroupAssociation.php | 475 ++ .../LocationDetails.php | 102 + .../LocationDetails/State.php | 64 + .../State.php | 95 + .../NetworkSecurity/V1/MirroringLocation.php | 101 + .../V1/MirroringLocation/State.php | 64 + .../NetworkSecurity/V1/OperationMetadata.php | 307 + .../Cloud/NetworkSecurity/V1/Protocol.php | 96 + .../V1/RemoveAddressGroupItemsRequest.php | 196 + .../NetworkSecurity/V1/SecurityProfile.php | 457 ++ .../V1/SecurityProfile/ProfileType.php | 75 + .../V1/SecurityProfileGroup.php | 468 ++ .../NetworkSecurity/V1/ServerTlsPolicy.php | 432 ++ .../V1/ServerTlsPolicy/MTLSPolicy.php | 183 + .../MTLSPolicy/ClientValidationMode.php | 70 + .../Cloud/NetworkSecurity/V1/Severity.php | 95 + .../NetworkSecurity/V1/SeverityOverride.php | 101 + .../Cloud/NetworkSecurity/V1/ThreatAction.php | 77 + .../NetworkSecurity/V1/ThreatOverride.php | 139 + .../V1/ThreatPreventionProfile.php | 144 + .../Cloud/NetworkSecurity/V1/ThreatType.php | 88 + .../V1/TlsInspectionPolicy.php | 536 ++ .../V1/TlsInspectionPolicy/Profile.php | 83 + .../V1/TlsInspectionPolicy/TlsVersion.php | 76 + .../V1/UpdateAddressGroupRequest.php | 230 + .../V1/UpdateAuthorizationPolicyRequest.php | 156 + .../V1/UpdateAuthzPolicyRequest.php | 230 + ...dateBackendAuthenticationConfigRequest.php | 161 + .../V1/UpdateClientTlsPolicyRequest.php | 161 + .../V1/UpdateDnsThreatDetectorRequest.php | 156 + ...dateFirewallEndpointAssociationRequest.php | 230 + .../V1/UpdateFirewallEndpointRequest.php | 230 + .../V1/UpdateGatewaySecurityPolicyRequest.php | 156 + ...UpdateGatewaySecurityPolicyRuleRequest.php | 156 + .../UpdateInterceptDeploymentGroupRequest.php | 198 + .../V1/UpdateInterceptDeploymentRequest.php | 193 + ...terceptEndpointGroupAssociationRequest.php | 198 + .../UpdateInterceptEndpointGroupRequest.php | 193 + .../UpdateMirroringDeploymentGroupRequest.php | 198 + .../V1/UpdateMirroringDeploymentRequest.php | 193 + ...rroringEndpointGroupAssociationRequest.php | 198 + .../UpdateMirroringEndpointGroupRequest.php | 193 + .../V1/UpdateSecurityProfileGroupRequest.php | 151 + .../V1/UpdateSecurityProfileRequest.php | 151 + .../V1/UpdateServerTlsPolicyRequest.php | 161 + .../V1/UpdateTlsInspectionPolicyRequest.php | 156 + .../V1/UpdateUrlListRequest.php | 161 + .../Cloud/NetworkSecurity/V1/UrlFilter.php | 157 + .../V1/UrlFilter/UrlFilteringAction.php | 61 + .../V1/UrlFilteringProfile.php | 71 + .../Cloud/NetworkSecurity/V1/UrlList.php | 240 + .../Cloud/NetworkSecurity/V1/ValidationCA.php | 118 + .../add_address_group_items.php | 92 + .../clone_address_group_items.php | 98 + .../create_address_group.php | 118 + .../delete_address_group.php | 85 + .../get_address_group.php | 76 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_address_group_references.php | 81 + .../list_address_groups.php | 78 + .../list_locations.php | 78 + .../remove_address_group_items.php | 94 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_address_group.php | 96 + .../create_dns_threat_detector.php | 79 + .../delete_dns_threat_detector.php | 73 + .../get_dns_threat_detector.php | 75 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_dns_threat_detectors.php | 76 + .../list_locations.php | 78 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_dns_threat_detector.php | 73 + .../create_firewall_endpoint.php | 95 + .../create_firewall_endpoint_association.php | 98 + .../delete_firewall_endpoint.php | 84 + .../delete_firewall_endpoint_association.php | 84 + .../get_firewall_endpoint.php | 75 + .../get_firewall_endpoint_association.php | 75 + .../get_iam_policy.php | 72 + .../FirewallActivationClient/get_location.php | 57 + .../list_firewall_endpoint_associations.php | 76 + .../list_firewall_endpoints.php | 79 + .../list_locations.php | 78 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_firewall_endpoint.php | 74 + .../update_firewall_endpoint_association.php | 95 + .../create_intercept_deployment.php | 121 + .../create_intercept_deployment_group.php | 104 + .../create_intercept_endpoint_group.php | 109 + ...e_intercept_endpoint_group_association.php | 114 + .../delete_intercept_deployment.php | 85 + .../delete_intercept_deployment_group.php | 85 + .../delete_intercept_endpoint_group.php | 85 + ...e_intercept_endpoint_group_association.php | 85 + .../V1/InterceptClient/get_iam_policy.php | 72 + .../get_intercept_deployment.php | 78 + .../get_intercept_deployment_group.php | 78 + .../get_intercept_endpoint_group.php | 78 + ...t_intercept_endpoint_group_association.php | 78 + .../V1/InterceptClient/get_location.php | 57 + .../list_intercept_deployment_groups.php | 79 + .../list_intercept_deployments.php | 79 + ..._intercept_endpoint_group_associations.php | 79 + .../list_intercept_endpoint_groups.php | 79 + .../V1/InterceptClient/list_locations.php | 78 + .../V1/InterceptClient/set_iam_policy.php | 77 + .../InterceptClient/test_iam_permissions.php | 84 + .../update_intercept_deployment.php | 108 + .../update_intercept_deployment_group.php | 89 + .../update_intercept_endpoint_group.php | 94 + ...e_intercept_endpoint_group_association.php | 107 + .../create_mirroring_deployment.php | 121 + .../create_mirroring_deployment_group.php | 104 + .../create_mirroring_endpoint_group.php | 93 + ...e_mirroring_endpoint_group_association.php | 87 + .../delete_mirroring_deployment.php | 85 + .../delete_mirroring_deployment_group.php | 85 + .../delete_mirroring_endpoint_group.php | 85 + ...e_mirroring_endpoint_group_association.php | 85 + .../V1/MirroringClient/get_iam_policy.php | 72 + .../V1/MirroringClient/get_location.php | 57 + .../get_mirroring_deployment.php | 78 + .../get_mirroring_deployment_group.php | 78 + .../get_mirroring_endpoint_group.php | 78 + ...t_mirroring_endpoint_group_association.php | 78 + .../V1/MirroringClient/list_locations.php | 78 + .../list_mirroring_deployment_groups.php | 79 + .../list_mirroring_deployments.php | 79 + ..._mirroring_endpoint_group_associations.php | 79 + .../list_mirroring_endpoint_groups.php | 79 + .../V1/MirroringClient/set_iam_policy.php | 77 + .../MirroringClient/test_iam_permissions.php | 84 + .../update_mirroring_deployment.php | 108 + .../update_mirroring_deployment_group.php | 89 + .../update_mirroring_endpoint_group.php | 72 + ...e_mirroring_endpoint_group_association.php | 72 + .../create_authorization_policy.php | 110 + .../create_authz_policy.php | 140 + .../create_backend_authentication_config.php | 104 + .../create_client_tls_policy.php | 99 + .../create_gateway_security_policy.php | 105 + .../create_gateway_security_policy_rule.php | 124 + .../create_server_tls_policy.php | 99 + .../create_tls_inspection_policy.php | 117 + .../NetworkSecurityClient/create_url_list.php | 106 + .../delete_authorization_policy.php | 85 + .../delete_authz_policy.php | 86 + .../delete_backend_authentication_config.php | 87 + .../delete_client_tls_policy.php | 85 + .../delete_gateway_security_policy.php | 85 + .../delete_gateway_security_policy_rule.php | 87 + .../delete_server_tls_policy.php | 85 + .../delete_tls_inspection_policy.php | 86 + .../NetworkSecurityClient/delete_url_list.php | 81 + .../get_authorization_policy.php | 76 + .../get_authz_policy.php | 77 + .../get_backend_authentication_config.php | 77 + .../get_client_tls_policy.php | 76 + .../get_gateway_security_policy.php | 76 + .../get_gateway_security_policy_rule.php | 78 + .../NetworkSecurityClient/get_iam_policy.php | 72 + .../V1/NetworkSecurityClient/get_location.php | 57 + .../get_server_tls_policy.php | 76 + .../get_tls_inspection_policy.php | 76 + .../V1/NetworkSecurityClient/get_url_list.php | 72 + .../list_authorization_policies.php | 78 + .../list_authz_policies.php | 78 + .../list_backend_authentication_configs.php | 78 + .../list_client_tls_policies.php | 77 + .../list_gateway_security_policies.php | 78 + .../list_gateway_security_policy_rules.php | 82 + .../NetworkSecurityClient/list_locations.php | 78 + .../list_server_tls_policies.php | 77 + .../list_tls_inspection_policies.php | 78 + .../NetworkSecurityClient/list_url_lists.php | 78 + .../NetworkSecurityClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_authorization_policy.php | 92 + .../update_authz_policy.php | 131 + .../update_backend_authentication_config.php | 88 + .../update_client_tls_policy.php | 85 + .../update_gateway_security_policy.php | 87 + .../update_gateway_security_policy_rule.php | 112 + .../update_server_tls_policy.php | 85 + .../update_tls_inspection_policy.php | 99 + .../NetworkSecurityClient/update_url_list.php | 92 + .../add_address_group_items.php | 92 + .../clone_address_group_items.php | 98 + .../create_address_group.php | 118 + .../delete_address_group.php | 85 + .../get_address_group.php | 76 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_address_group_references.php | 81 + .../list_address_groups.php | 78 + .../list_locations.php | 78 + .../remove_address_group_items.php | 94 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_address_group.php | 96 + .../create_security_profile.php | 95 + .../create_security_profile_group.php | 97 + .../delete_security_profile.php | 85 + .../delete_security_profile_group.php | 86 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../get_security_profile.php | 76 + .../get_security_profile_group.php | 76 + .../list_locations.php | 78 + .../list_security_profile_groups.php | 81 + .../list_security_profiles.php | 81 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_security_profile.php | 74 + .../update_security_profile_group.php | 74 + .../V1/Client/AddressGroupServiceClient.php | 791 +++ .../Client/DnsThreatDetectorServiceClient.php | 581 ++ .../V1/Client/FirewallActivationClient.php | 878 +++ .../v1/src/V1/Client/InterceptClient.php | 1164 ++++ .../v1/src/V1/Client/MirroringClient.php | 1163 ++++ .../src/V1/Client/NetworkSecurityClient.php | 1998 ++++++ .../OrganizationAddressGroupServiceClient.php | 797 +++ ...ationSecurityProfileGroupServiceClient.php | 937 +++ .../v1/src/V1/gapic_metadata.json | 921 +++ .../address_group_service_client_config.json | 92 + ...ddress_group_service_descriptor_config.php | 275 + ...dress_group_service_rest_client_config.php | 358 ++ ...threat_detector_service_client_config.json | 72 + ...eat_detector_service_descriptor_config.php | 175 + ...at_detector_service_rest_client_config.php | 308 + .../firewall_activation_client_config.json | 97 + .../firewall_activation_descriptor_config.php | 291 + ...firewall_activation_rest_client_config.php | 375 ++ .../V1/resources/intercept_client_config.json | 147 + .../resources/intercept_descriptor_config.php | 470 ++ .../intercept_rest_client_config.php | 491 ++ .../V1/resources/mirroring_client_config.json | 147 + .../resources/mirroring_descriptor_config.php | 470 ++ .../mirroring_rest_client_config.php | 491 ++ .../network_security_client_config.json | 282 + .../network_security_descriptor_config.php | 926 +++ .../network_security_rest_client_config.php | 799 +++ ...n_address_group_service_client_config.json | 92 + ...ddress_group_service_descriptor_config.php | 275 + ...dress_group_service_rest_client_config.php | 358 ++ ...y_profile_group_service_client_config.json | 97 + ...rofile_group_service_descriptor_config.php | 293 + ...ofile_group_service_rest_client_config.php | 378 ++ .../Client/AddressGroupServiceClientTest.php | 1528 +++++ .../DnsThreatDetectorServiceClientTest.php | 782 +++ .../Client/FirewallActivationClientTest.php | 1615 +++++ .../Unit/V1/Client/InterceptClientTest.php | 2704 ++++++++ .../Unit/V1/Client/MirroringClientTest.php | 2674 ++++++++ .../V1/Client/NetworkSecurityClientTest.php | 5477 +++++++++++++++++ ...anizationAddressGroupServiceClientTest.php | 1528 +++++ ...nSecurityProfileGroupServiceClientTest.php | 1593 +++++ 484 files changed, 91043 insertions(+) create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthzPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/BackendAuthenticationConfig.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/DnsThreatDetector.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/FirewallActivation.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicyRule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Intercept.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Mirroring.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupIntercept.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupMirroring.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupService.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupThreatprevention.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupUrlfiltering.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/TlsInspectionPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/UrlList.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AntivirusOverride.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzAction.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From/RequestSource.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/HeaderMatch.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/IpBlock.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/StringMatch.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/AuthzExtension.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/CloudIap.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/LoadBalancingScheme.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/PolicyProfile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/Target.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig/WellKnownRoots.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthzPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateBackendAuthenticationConfigRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateDnsThreatDetectorRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRuleRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateTlsInspectionPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateUrlListRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomInterceptProfile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomMirroringProfile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthzPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteBackendAuthenticationConfigRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteDnsThreatDetectorRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRuleRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteTlsInspectionPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteUrlListRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector/Provider.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/AssociationReference.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/EndpointSettings.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule/BasicProfile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthzPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetBackendAuthenticationConfigRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetDnsThreatDetectorRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRuleRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetTlsInspectionPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetUrlListRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/Deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/AssociationDetails.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/Deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/AssociationDetails.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/Type.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation/State.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Protocol.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile/ProfileType.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfileGroup.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Severity.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SeverityOverride.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatAction.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatOverride.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatPreventionProfile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatType.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/Profile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/TlsVersion.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthzPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateBackendAuthenticationConfigRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateDnsThreatDetectorRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRuleRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupAssociationRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileGroupRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateTlsInspectionPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateUrlListRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter/UrlFilteringAction.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilteringProfile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlList.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoints.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployment_groups.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployments.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_groups.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployment_groups.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployments.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authz_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_url_list.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authz_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_url_list.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authz_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_url_list.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authz_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_url_lists.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authz_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_url_list.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/DnsThreatDetectorServiceClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/FirewallActivationClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/InterceptClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/MirroringClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/FirewallActivationClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/InterceptClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/MirroringClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php new file mode 100644 index 000000000000..8c79b85819fd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + "\x0A\x9DB\x0A3google/cloud/networksecurity/v1/address_group.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x06\x0A\x0CAddressGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x05 \x03(\x0B29.google.cloud.networksecurity.v1.AddressGroup.LabelsEntryB\x03\xE0A\x01\x12E\x0A\x04type\x18\x06 \x01(\x0E22.google.cloud.networksecurity.v1.AddressGroup.TypeB\x03\xE0A\x02\x12\x12\x0A\x05items\x18\x07 \x03(\x09B\x03\xE0A\x01\x12\x15\x0A\x08capacity\x18\x08 \x01(\x05B\x03\xE0A\x02\x12\x16\x0A\x09self_link\x18\x09 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x07purpose\x18\x0A \x03(\x0E25.google.cloud.networksecurity.v1.AddressGroup.PurposeB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"0\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04IPV4\x10\x01\x12\x08\x0A\x04IPV6\x10\x02\"@\x0A\x07Purpose\x12\x17\x0A\x13PURPOSE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07DEFAULT\x10\x01\x12\x0F\x0A\x0BCLOUD_ARMOR\x10\x02:\xC9\x01\xEAA\xC5\x01\x0A+networksecurity.googleapis.com/AddressGroup\x12Eprojects/{project}/locations/{location}/addressGroups/{address_group}\x12Oorganizations/{organization}/locations/{location}/addressGroups/{address_group}\"\xA1\x01\x0A\x18ListAddressGroupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12#\x0A\x16return_partial_success\x18\x04 \x01(\x08B\x03\xE0A\x01\"\x90\x01\x0A\x19ListAddressGroupsResponse\x12E\x0A\x0Eaddress_groups\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.AddressGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"[\x0A\x16GetAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\"\xE3\x01\x0A\x19CreateAddressGroupRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+networksecurity.googleapis.com/AddressGroup\x12\x1D\x0A\x10address_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12I\x0A\x0Daddress_group\x18\x03 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xB5\x01\x0A\x19UpdateAddressGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12I\x0A\x0Daddress_group\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"w\x0A\x19DeleteAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A\x1BAddAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x99\x01\x0A\x1ERemoveAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xD7\x01\x0A\x1DCloneAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12Q\x0A\x14source_address_group\x18\x02 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A!ListAddressGroupReferencesRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x9C\x02\x0A\"ListAddressGroupReferencesResponse\x12{\x0A\x18address_group_references\x18\x01 \x03(\x0B2Y.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x1A`\x0A\x15AddressGroupReference\x12\x17\x0A\x0Ffirewall_policy\x18\x01 \x01(\x09\x12\x17\x0A\x0Fsecurity_policy\x18\x04 \x01(\x09\x12\x15\x0A\x0Drule_priority\x18\x02 \x01(\x052\xDA\x13\x0A\x13AddressGroupService\x12\xCE\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"B\xDAA\x06parent\x82\xD3\xE4\x93\x023\x121/v1/{parent=projects/*/locations/*}/addressGroups\x12\xBB\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"@\xDAA\x04name\x82\xD3\xE4\x93\x023\x121/v1/{name=projects/*/locations/*/addressGroups/*}\x12\xA6\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB4\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02B\"1/v1/{parent=projects/*/locations/*}/addressGroups:\x0Daddress_group\x12\xA8\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB6\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02P2?/v1/{address_group.name=projects/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\x9E\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xA8\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02H\"C/v1/{address_group=projects/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xA7\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02K\"F/v1/{address_group=projects/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB3\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02J\"E/v1/{address_group=projects/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\xFF\x01\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x023*1/v1/{name=projects/*/locations/*/addressGroups/*}\x12\x88\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"a\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02K\x12I/v1/{address_group=projects/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platform2\x93\x14\x0A\x1FOrganizationAddressGroupService\x12\xD3\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v1/{parent=organizations/*/locations/*}/addressGroups\x12\xC0\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\xAB\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02G\"6/v1/{parent=organizations/*/locations/*}/addressGroups:\x0Daddress_group\x12\xAD\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xBB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02U2D/v1/{address_group.name=organizations/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\xA3\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAD\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02M\"H/v1/{address_group=organizations/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xAC\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB0\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02P\"K/v1/{address_group=organizations/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB8\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xBE\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02O\"J/v1/{address_group=organizations/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\x84\x02\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\x8D\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"f\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02P\x12N/v1/{address_group=organizations/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xF2\x01\x0A#com.google.cloud.networksecurity.v1B\x11AddressGroupProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php new file mode 100644 index 000000000000..ccb984801e07 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x8C\x14\x0A:google/cloud/networksecurity/v1/authorization_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB1\x09\x0A\x13AuthorizationPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12U\x0A\x06labels\x18\x05 \x03(\x0B2@.google.cloud.networksecurity.v1.AuthorizationPolicy.LabelsEntryB\x03\xE0A\x01\x12P\x0A\x06action\x18\x06 \x01(\x0E2;.google.cloud.networksecurity.v1.AuthorizationPolicy.ActionB\x03\xE0A\x02\x12M\x0A\x05rules\x18\x07 \x03(\x0B29.google.cloud.networksecurity.v1.AuthorizationPolicy.RuleB\x03\xE0A\x01\x1A\x91\x04\x0A\x04Rule\x12V\x0A\x07sources\x18\x01 \x03(\x0B2@.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.SourceB\x03\xE0A\x01\x12`\x0A\x0Cdestinations\x18\x02 \x03(\x0B2E.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.DestinationB\x03\xE0A\x01\x1A9\x0A\x06Source\x12\x17\x0A\x0Aprincipals\x18\x01 \x03(\x09B\x03\xE0A\x01\x12\x16\x0A\x09ip_blocks\x18\x02 \x03(\x09B\x03\xE0A\x01\x1A\x93\x02\x0A\x0BDestination\x12\x12\x0A\x05hosts\x18\x01 \x03(\x09B\x03\xE0A\x02\x12\x12\x0A\x05ports\x18\x02 \x03(\x0DB\x03\xE0A\x02\x12\x14\x0A\x07methods\x18\x04 \x03(\x09B\x03\xE0A\x01\x12u\x0A\x11http_header_match\x18\x05 \x01(\x0B2U.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatchB\x03\xE0A\x01\x1AO\x0A\x0FHttpHeaderMatch\x12\x1A\x0A\x0Bregex_match\x18\x02 \x01(\x09B\x03\xE0A\x02H\x00\x12\x18\x0A\x0Bheader_name\x18\x01 \x01(\x09B\x03\xE0A\x02B\x06\x0A\x04type\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"5\x0A\x06Action\x12\x16\x0A\x12ACTION_UNSPECIFIED\x10\x00\x12\x09\x0A\x05ALLOW\x10\x01\x12\x08\x0A\x04DENY\x10\x02:\x8E\x01\xEAA\x8A\x01\x0A2networksecurity.googleapis.com/AuthorizationPolicy\x12Tprojects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}\"\x84\x01\x0A ListAuthorizationPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x92\x01\x0A!ListAuthorizationPoliciesResponse\x12T\x0A\x16authorization_policies\x18\x01 \x03(\x0B24.google.cloud.networksecurity.v1.AuthorizationPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"i\x0A\x1DGetAuthorizationPolicyRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/AuthorizationPolicy\"\xED\x01\x0A CreateAuthorizationPolicyRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x122networksecurity.googleapis.com/AuthorizationPolicy\x12\$\x0A\x17authorization_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x14authorization_policy\x18\x03 \x01(\x0B24.google.cloud.networksecurity.v1.AuthorizationPolicyB\x03\xE0A\x02\"\xB1\x01\x0A UpdateAuthorizationPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12W\x0A\x14authorization_policy\x18\x02 \x01(\x0B24.google.cloud.networksecurity.v1.AuthorizationPolicyB\x03\xE0A\x02\"l\x0A DeleteAuthorizationPolicyRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/AuthorizationPolicyB\xF9\x01\x0A#com.google.cloud.networksecurity.v1B\x18AuthorizationPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthzPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthzPolicy.php new file mode 100644 index 000000000000..5f7e3c669be9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthzPolicy.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\x92.\x0A2google/cloud/networksecurity/v1/authz_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF3\"\x0A\x0BAuthzPolicy\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x02\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x01\x12M\x0A\x06labels\x18\x05 \x03(\x0B28.google.cloud.networksecurity.v1.AuthzPolicy.LabelsEntryB\x03\xE0A\x01\x12H\x0A\x06target\x18\x06 \x01(\x0B23.google.cloud.networksecurity.v1.AuthzPolicy.TargetB\x03\xE0A\x02\x12O\x0A\x0Ahttp_rules\x18\x07 \x03(\x0B26.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRuleB\x03\xE0A\x01\x12M\x0A\x06action\x18\x08 \x01(\x0E28.google.cloud.networksecurity.v1.AuthzPolicy.AuthzActionB\x03\xE0A\x02\x12Y\x0A\x0Fcustom_provider\x18\x0A \x01(\x0B2;.google.cloud.networksecurity.v1.AuthzPolicy.CustomProviderB\x03\xE0A\x01\x12Z\x0A\x0Epolicy_profile\x18\x0B \x01(\x0E2:.google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfileB\x06\xE0A\x01\xE0A\x05\x1A\x86\x01\x0A\x06Target\x12d\x0A\x15load_balancing_scheme\x18\x08 \x01(\x0E2@.google.cloud.networksecurity.v1.AuthzPolicy.LoadBalancingSchemeB\x03\xE0A\x01\x12\x16\x0A\x09resources\x18\x01 \x03(\x09B\x03\xE0A\x02\x1A\xCE\x16\x0A\x09AuthzRule\x12N\x0A\x04from\x18\x01 \x01(\x0B2;.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.FromB\x03\xE0A\x01\x12J\x0A\x02to\x18\x02 \x01(\x0B29.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.ToB\x03\xE0A\x01\x12\x11\x0A\x04when\x18\x03 \x01(\x09B\x03\xE0A\x01\x1A|\x0A\x0BStringMatch\x12\x0F\x0A\x05exact\x18\x01 \x01(\x09H\x00\x12\x10\x0A\x06prefix\x18\x02 \x01(\x09H\x00\x12\x10\x0A\x06suffix\x18\x03 \x01(\x09H\x00\x12\x12\x0A\x08contains\x18\x04 \x01(\x09H\x00\x12\x13\x0A\x0Bignore_case\x18\x05 \x01(\x08B\x0F\x0A\x0Dmatch_pattern\x1A3\x0A\x07IpBlock\x12\x13\x0A\x06prefix\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x06length\x18\x02 \x01(\x05B\x03\xE0A\x02\x1A\x8F\x02\x0A\x0FRequestResource\x12s\x0A\x10tag_value_id_set\x18\x01 \x01(\x0B2T.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource.TagValueIdSetB\x03\xE0A\x01\x12d\x0A\x13iam_service_account\x18\x02 \x01(\x0B2B.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatchB\x03\xE0A\x01\x1A!\x0A\x0DTagValueIdSet\x12\x10\x0A\x03ids\x18\x01 \x03(\x03B\x03\xE0A\x02\x1Ax\x0A\x0BHeaderMatch\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x01\x12V\x0A\x05value\x18\x02 \x01(\x0B2B.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatchB\x03\xE0A\x01\x1A\xEA\x02\x0A\x09Principal\x12s\x0A\x12principal_selector\x18\x01 \x01(\x0E2R.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal.PrincipalSelectorB\x03\xE0A\x01\x12Z\x0A\x09principal\x18\x02 \x01(\x0B2B.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatchB\x03\xE0A\x02\"\x8B\x01\x0A\x11PrincipalSelector\x12\"\x0A\x1EPRINCIPAL_SELECTOR_UNSPECIFIED\x10\x00\x12\x17\x0A\x13CLIENT_CERT_URI_SAN\x10\x01\x12\x1C\x0A\x18CLIENT_CERT_DNS_NAME_SAN\x10\x02\x12\x1B\x0A\x17CLIENT_CERT_COMMON_NAME\x10\x03\x1A\xF1\x03\x0A\x04From\x12_\x0A\x07sources\x18\x01 \x03(\x0B2I.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSourceB\x03\xE0A\x01\x12c\x0A\x0Bnot_sources\x18\x02 \x03(\x0B2I.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSourceB\x03\xE0A\x01\x1A\xA2\x02\x0A\x0DRequestSource\x12Y\x0A\x0Aprincipals\x18\x01 \x03(\x0B2@.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.PrincipalB\x03\xE0A\x01\x12V\x0A\x09ip_blocks\x18\x02 \x03(\x0B2>.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.IpBlockB\x03\xE0A\x01\x12^\x0A\x09resources\x18\x03 \x03(\x0B2F.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResourceB\x03\xE0A\x01\x1A\xF1\x09\x0A\x02To\x12c\x0A\x0Aoperations\x18\x01 \x03(\x0B2J.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperationB\x03\xE0A\x01\x12g\x0A\x0Enot_operations\x18\x02 \x03(\x0B2J.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperationB\x03\xE0A\x01\x1A\x9C\x08\x0A\x10RequestOperation\x12m\x0A\x0Aheader_set\x18\x01 \x01(\x0B2T.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSetB\x03\xE0A\x01\x12V\x0A\x05hosts\x18\x02 \x03(\x0B2B.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatchB\x03\xE0A\x01\x12V\x0A\x05paths\x18\x03 \x03(\x0B2B.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatchB\x03\xE0A\x01\x12\x14\x0A\x07methods\x18\x04 \x03(\x09B\x03\xE0A\x01\x12`\x0A\x03mcp\x18\x05 \x01(\x0B2N.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCPB\x03\xE0A\x01\x1Ae\x0A\x09HeaderSet\x12X\x0A\x07headers\x18\x01 \x03(\x0B2B.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.HeaderMatchB\x03\xE0A\x02\x1Aw\x0A\x09MCPMethod\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x06params\x18\x02 \x03(\x0B2B.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatchB\x03\xE0A\x01\x1A\x83\x02\x0A\x03MCP\x12\x8F\x01\x0A\x1Cbase_protocol_methods_option\x18\x01 \x01(\x0E2d.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.BaseProtocolMethodsOptionB\x03\xE0A\x01\x12j\x0A\x07methods\x18\x02 \x03(\x0B2T.google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCPMethodB\x03\xE0A\x01\"\x8A\x01\x0A\x19BaseProtocolMethodsOption\x12,\x0A(BASE_PROTOCOL_METHODS_OPTION_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ASKIP_BASE_PROTOCOL_METHODS\x10\x01\x12\x1F\x0A\x1BMATCH_BASE_PROTOCOL_METHODS\x10\x02\x1A\x8E\x02\x0A\x0ECustomProvider\x12\\\x0A\x09cloud_iap\x18\x01 \x01(\x0B2D.google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.CloudIapB\x03\xE0A\x01\x12h\x0A\x0Fauthz_extension\x18\x02 \x01(\x0B2J.google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.AuthzExtensionB\x03\xE0A\x01\x1A\x0A\x0A\x08CloudIap\x1A(\x0A\x0EAuthzExtension\x12\x16\x0A\x09resources\x18\x01 \x03(\x09B\x03\xE0A\x02\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x83\x01\x0A\x13LoadBalancingScheme\x12%\x0A!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\x0A\x10INTERNAL_MANAGED\x10\x01\x12\x14\x0A\x10EXTERNAL_MANAGED\x10\x02\x12\x19\x0A\x15INTERNAL_SELF_MANAGED\x10\x03\"L\x0A\x0BAuthzAction\x12\x1C\x0A\x18AUTHZ_ACTION_UNSPECIFIED\x10\x00\x12\x09\x0A\x05ALLOW\x10\x01\x12\x08\x0A\x04DENY\x10\x02\x12\x0A\x0A\x06CUSTOM\x10\x03\"U\x0A\x0DPolicyProfile\x12\x1E\x0A\x1APOLICY_PROFILE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DREQUEST_AUTHZ\x10\x01\x12\x11\x0A\x0DCONTENT_AUTHZ\x10\x02:\x92\x01\xEAA\x8E\x01\x0A*networksecurity.googleapis.com/AuthzPolicy\x12Dprojects/{project}/locations/{location}/authzPolicies/{authz_policy}*\x0DauthzPolicies2\x0BauthzPolicy\"\xE6\x01\x0A\x18CreateAuthzPolicyRequest\x12B\x0A\x06parent\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x12*networksecurity.googleapis.com/AuthzPolicy\x12\x1C\x0A\x0Fauthz_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12G\x0A\x0Cauthz_policy\x18\x03 \x01(\x0B2,.google.cloud.networksecurity.v1.AuthzPolicyB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xBB\x01\x0A\x18ListAuthzPoliciesRequest\x12B\x0A\x06parent\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x12*networksecurity.googleapis.com/AuthzPolicy\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x8F\x01\x0A\x19ListAuthzPoliciesResponse\x12D\x0A\x0Eauthz_policies\x18\x01 \x03(\x0B2,.google.cloud.networksecurity.v1.AuthzPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Y\x0A\x15GetAuthzPolicyRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*networksecurity.googleapis.com/AuthzPolicy\"\xBA\x01\x0A\x18UpdateAuthzPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12G\x0A\x0Cauthz_policy\x18\x02 \x01(\x0B2,.google.cloud.networksecurity.v1.AuthzPolicyB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"}\x0A\x18DeleteAuthzPolicyRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*networksecurity.googleapis.com/AuthzPolicy\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01B\xF1\x01\x0A#com.google.cloud.networksecurity.v1B\x10AuthzPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/BackendAuthenticationConfig.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/BackendAuthenticationConfig.php new file mode 100644 index 000000000000..80be8a926816 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/BackendAuthenticationConfig.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xD5\x14\x0ACgoogle/cloud/networksecurity/v1/backend_authentication_config.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xD2\x06\x0A\x1BBackendAuthenticationConfig\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12X\x0A\x06labels\x18\x05 \x03(\x0B2H.google.cloud.networksecurity.v1.BackendAuthenticationConfig.LabelsEntry\x12Q\x0A\x12client_certificate\x18\x06 \x01(\x09B5\xE0A\x01\xFAA/\x0A-certificatemanager.googleapis.com/Certificate\x12K\x0A\x0Ctrust_config\x18\x07 \x01(\x09B5\xE0A\x01\xFAA/\x0A-certificatemanager.googleapis.com/TrustConfig\x12e\x0A\x10well_known_roots\x18\x08 \x01(\x0E2K.google.cloud.networksecurity.v1.BackendAuthenticationConfig.WellKnownRoots\x12\x11\x0A\x04etag\x18\x09 \x01(\x09B\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"N\x0A\x0EWellKnownRoots\x12 \x0A\x1CWELL_KNOWN_ROOTS_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x10\x0A\x0CPUBLIC_ROOTS\x10\x02:\xA6\x01\xEAA\xA2\x01\x0A:networksecurity.googleapis.com/BackendAuthenticationConfig\x12dprojects/{project}/locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}\"\x8B\x01\x0A'ListBackendAuthenticationConfigsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\xBE\x01\x0A(ListBackendAuthenticationConfigsResponse\x12d\x0A\x1Ebackend_authentication_configs\x18\x01 \x03(\x0B2<.google.cloud.networksecurity.v1.BackendAuthenticationConfig\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"y\x0A%GetBackendAuthenticationConfigRequest\x12P\x0A\x04name\x18\x01 \x01(\x09BB\xE0A\x02\xFAA<\x0A:networksecurity.googleapis.com/BackendAuthenticationConfig\"\x97\x02\x0A(CreateBackendAuthenticationConfigRequest\x12R\x0A\x06parent\x18\x01 \x01(\x09BB\xE0A\x02\xFAA<\x12:networksecurity.googleapis.com/BackendAuthenticationConfig\x12-\x0A backend_authentication_config_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12h\x0A\x1Dbackend_authentication_config\x18\x03 \x01(\x0B2<.google.cloud.networksecurity.v1.BackendAuthenticationConfigB\x03\xE0A\x02\"\xCA\x01\x0A(UpdateBackendAuthenticationConfigRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12h\x0A\x1Dbackend_authentication_config\x18\x02 \x01(\x0B2<.google.cloud.networksecurity.v1.BackendAuthenticationConfigB\x03\xE0A\x02\"\x8F\x01\x0A(DeleteBackendAuthenticationConfigRequest\x12P\x0A\x04name\x18\x01 \x01(\x09BB\xE0A\x02\xFAA<\x0A:networksecurity.googleapis.com/BackendAuthenticationConfig\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01B\xEE\x03\x0A#com.google.cloud.networksecurity.v1B BackendAuthenticationConfigProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1\xEAAs\x0A-certificatemanager.googleapis.com/Certificate\x12Bprojects/{project}/locations/{location}/certificates/{certificate}\xEAAt\x0A-certificatemanager.googleapis.com/TrustConfig\x12Cprojects/{project}/locations/{location}/trustConfigs/{trust_config}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php new file mode 100644 index 000000000000..4fb3543cf3ff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xAF\x0F\x0A7google/cloud/networksecurity/v1/client_tls_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A)google/cloud/networksecurity/v1/tls.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xEC\x04\x0A\x0FClientTlsPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12Q\x0A\x06labels\x18\x05 \x03(\x0B2<.google.cloud.networksecurity.v1.ClientTlsPolicy.LabelsEntryB\x03\xE0A\x01\x12\x10\x0A\x03sni\x18\x06 \x01(\x09B\x03\xE0A\x01\x12U\x0A\x12client_certificate\x18\x07 \x01(\x0B24.google.cloud.networksecurity.v1.CertificateProviderB\x03\xE0A\x01\x12P\x0A\x14server_validation_ca\x18\x08 \x03(\x0B2-.google.cloud.networksecurity.v1.ValidationCAB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x82\x01\xEAA\x7F\x0A.networksecurity.googleapis.com/ClientTlsPolicy\x12Mprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}\"\x80\x01\x0A\x1CListClientTlsPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x87\x01\x0A\x1DListClientTlsPoliciesResponse\x12M\x0A\x13client_tls_policies\x18\x01 \x03(\x0B20.google.cloud.networksecurity.v1.ClientTlsPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x19GetClientTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ClientTlsPolicy\"\xDB\x01\x0A\x1CCreateClientTlsPolicyRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.networksecurity.googleapis.com/ClientTlsPolicy\x12!\x0A\x14client_tls_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12P\x0A\x11client_tls_policy\x18\x03 \x01(\x0B20.google.cloud.networksecurity.v1.ClientTlsPolicyB\x03\xE0A\x02\"\xA6\x01\x0A\x1CUpdateClientTlsPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12P\x0A\x11client_tls_policy\x18\x02 \x01(\x0B20.google.cloud.networksecurity.v1.ClientTlsPolicyB\x03\xE0A\x02\"d\x0A\x1CDeleteClientTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ClientTlsPolicyB\xF5\x01\x0A#com.google.cloud.networksecurity.v1B\x14ClientTlsPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php new file mode 100644 index 000000000000..5bd74b85b9ef --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xEA\x04\x0A,google/cloud/networksecurity/v1/common.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03B\xEC\x01\x0A#com.google.cloud.networksecurity.v1B\x0BCommonProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/DnsThreatDetector.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/DnsThreatDetector.php new file mode 100644 index 000000000000..ce7453010c3b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/DnsThreatDetector.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xC6\x1B\x0A9google/cloud/networksecurity/v1/dns_threat_detector.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x96\x05\x0A\x11DnsThreatDetector\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12S\x0A\x06labels\x18\x04 \x03(\x0B2>.google.cloud.networksecurity.v1.DnsThreatDetector.LabelsEntryB\x03\xE0A\x01\x12A\x0A\x11excluded_networks\x18\x05 \x03(\x09B&\xE0A\x01\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12R\x0A\x08provider\x18\x06 \x01(\x0E2;.google.cloud.networksecurity.v1.DnsThreatDetector.ProviderB\x03\xE0A\x02\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"2\x0A\x08Provider\x12\x18\x0A\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08INFOBLOX\x10\x01:\xAF\x01\xEAA\xAB\x01\x0A0networksecurity.googleapis.com/DnsThreatDetector\x12Pprojects/{project}/locations/{location}/dnsThreatDetectors/{dns_threat_detector}*\x12dnsThreatDetectors2\x11dnsThreatDetector\"\x9A\x01\x0A\x1DListDnsThreatDetectorsRequest\x12H\x0A\x06parent\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x120networksecurity.googleapis.com/DnsThreatDetector\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xA5\x01\x0A\x1EListDnsThreatDetectorsResponse\x12P\x0A\x14dns_threat_detectors\x18\x01 \x03(\x0B22.google.cloud.networksecurity.v1.DnsThreatDetector\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x18\x0A\x0Bunreachable\x18\x03 \x03(\x09B\x03\xE0A\x06\"e\x0A\x1BGetDnsThreatDetectorRequest\x12F\x0A\x04name\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x0A0networksecurity.googleapis.com/DnsThreatDetector\"\xE5\x01\x0A\x1ECreateDnsThreatDetectorRequest\x12H\x0A\x06parent\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x120networksecurity.googleapis.com/DnsThreatDetector\x12#\x0A\x16dns_threat_detector_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12T\x0A\x13dns_threat_detector\x18\x03 \x01(\x0B22.google.cloud.networksecurity.v1.DnsThreatDetectorB\x03\xE0A\x02\"\xAC\x01\x0A\x1EUpdateDnsThreatDetectorRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12T\x0A\x13dns_threat_detector\x18\x02 \x01(\x0B22.google.cloud.networksecurity.v1.DnsThreatDetectorB\x03\xE0A\x02\"h\x0A\x1EDeleteDnsThreatDetectorRequest\x12F\x0A\x04name\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x0A0networksecurity.googleapis.com/DnsThreatDetector2\x99\x0A\x0A\x18DnsThreatDetectorService\x12\xE2\x01\x0A\x16ListDnsThreatDetectors\x12>.google.cloud.networksecurity.v1.ListDnsThreatDetectorsRequest\x1A?.google.cloud.networksecurity.v1.ListDnsThreatDetectorsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v1/{parent=projects/*/locations/*}/dnsThreatDetectors\x12\xCF\x01\x0A\x14GetDnsThreatDetector\x12<.google.cloud.networksecurity.v1.GetDnsThreatDetectorRequest\x1A2.google.cloud.networksecurity.v1.DnsThreatDetector\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v1/{name=projects/*/locations/*/dnsThreatDetectors/*}\x12\x98\x02\x0A\x17CreateDnsThreatDetector\x12?.google.cloud.networksecurity.v1.CreateDnsThreatDetectorRequest\x1A2.google.cloud.networksecurity.v1.DnsThreatDetector\"\x87\x01\xDAA1parent,dns_threat_detector,dns_threat_detector_id\x82\xD3\xE4\x93\x02M\"6/v1/{parent=projects/*/locations/*}/dnsThreatDetectors:\x13dns_threat_detector\x12\x9A\x02\x0A\x17UpdateDnsThreatDetector\x12?.google.cloud.networksecurity.v1.UpdateDnsThreatDetectorRequest\x1A2.google.cloud.networksecurity.v1.DnsThreatDetector\"\x89\x01\xDAA\x1Fdns_threat_detector,update_mask\x82\xD3\xE4\x93\x02a2J/v1/{dns_threat_detector.name=projects/*/locations/*/dnsThreatDetectors/*}:\x13dns_threat_detector\x12\xB9\x01\x0A\x17DeleteDnsThreatDetector\x12?.google.cloud.networksecurity.v1.DeleteDnsThreatDetectorRequest\x1A\x16.google.protobuf.Empty\"E\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v1/{name=projects/*/locations/*/dnsThreatDetectors/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC8\x02\x0A#com.google.cloud.networksecurity.v1B\x16DnsThreatDetectorProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1\xEAAN\x0A\x1Ecompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/FirewallActivation.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/FirewallActivation.php new file mode 100644 index 000000000000..3e84bce9930e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/FirewallActivation.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + "\x0A\xDC@\x0A9google/cloud/networksecurity/v1/firewall_activation.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC3\x0A\x0A\x10FirewallEndpoint\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x05\xE0A\x08\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12R\x0A\x06labels\x18\x04 \x03(\x0B2=.google.cloud.networksecurity.v1.FirewallEndpoint.LabelsEntryB\x03\xE0A\x01\x12K\x0A\x05state\x18\x05 \x01(\x0E27.google.cloud.networksecurity.v1.FirewallEndpoint.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\"\x0A\x13associated_networks\x18\x07 \x03(\x09B\x05\x18\x01\xE0A\x03\x12a\x0A\x0Cassociations\x18\x0D \x03(\x0B2F.google.cloud.networksecurity.v1.FirewallEndpoint.AssociationReferenceB\x03\xE0A\x03\x12\x1F\x0A\x0Dsatisfies_pzs\x18\x0E \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x1F\x0A\x0Dsatisfies_pzi\x18\x0F \x01(\x08B\x03\xE0A\x03H\x01\x88\x01\x01\x12\x1F\x0A\x12billing_project_id\x18\x08 \x01(\x09B\x03\xE0A\x01\x12b\x0A\x11endpoint_settings\x18\x13 \x01(\x0B2B.google.cloud.networksecurity.v1.FirewallEndpoint.EndpointSettingsB\x03\xE0A\x01\x1A\xA1\x01\x0A\x14AssociationReference\x12P\x0A\x04name\x18\x01 \x01(\x09BB\xE0A\x03\xFAA<\x0A:networksecurity.googleapis.com/FirewallEndpointAssociation\x127\x0A\x07network\x18\x02 \x01(\x09B&\xE0A\x03\xFAA \x0A\x1Ecompute.googleapis.com/Network\x1A8\x0A\x10EndpointSettings\x12\$\x0A\x14jumbo_frames_enabled\x18\x01 \x01(\x08B\x06\xE0A\x01\xE0A\x05\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"T\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0C\x0A\x08INACTIVE\x10\x04:\x82\x02\xEAA\xFE\x01\x0A/networksecurity.googleapis.com/FirewallEndpoint\x12Worganizations/{organization}/locations/{location}/firewallEndpoints/{firewall_endpoint}\x12Mprojects/{project}/locations/{location}/firewallEndpoints/{firewall_endpoint}*\x11firewallEndpoints2\x10firewallEndpointB\x10\x0A\x0E_satisfies_pzsB\x10\x0A\x0E_satisfies_pzi\"\xBA\x01\x0A\x1CListFirewallEndpointsRequest\x12G\x0A\x06parent\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x12/networksecurity.googleapis.com/FirewallEndpoint\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"\x9C\x01\x0A\x1DListFirewallEndpointsResponse\x12M\x0A\x12firewall_endpoints\x18\x01 \x03(\x0B21.google.cloud.networksecurity.v1.FirewallEndpoint\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"c\x0A\x1AGetFirewallEndpointRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/networksecurity.googleapis.com/FirewallEndpoint\"\xF7\x01\x0A\x1DCreateFirewallEndpointRequest\x12G\x0A\x06parent\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x12/networksecurity.googleapis.com/FirewallEndpoint\x12!\x0A\x14firewall_endpoint_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12Q\x0A\x11firewall_endpoint\x18\x03 \x01(\x0B21.google.cloud.networksecurity.v1.FirewallEndpointB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xC1\x01\x0A\x1DUpdateFirewallEndpointRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12Q\x0A\x11firewall_endpoint\x18\x02 \x01(\x0B21.google.cloud.networksecurity.v1.FirewallEndpointB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x1DDeleteFirewallEndpointRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/networksecurity.googleapis.com/FirewallEndpoint\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xD2\x06\x0A\x1BFirewallEndpointAssociation\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x05\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12]\x0A\x06labels\x18\x04 \x03(\x0B2H.google.cloud.networksecurity.v1.FirewallEndpointAssociation.LabelsEntryB\x03\xE0A\x01\x12V\x0A\x05state\x18\x05 \x01(\x0E2B.google.cloud.networksecurity.v1.FirewallEndpointAssociation.StateB\x03\xE0A\x03\x12\x14\x0A\x07network\x18\x06 \x01(\x09B\x03\xE0A\x02\x12\x1E\x0A\x11firewall_endpoint\x18\x07 \x01(\x09B\x03\xE0A\x02\x12Y\x0A\x15tls_inspection_policy\x18\x08 \x01(\x09B:\xE0A\x01\xFAA4\x0A2networksecurity.googleapis.com/TlsInspectionPolicy\x12\x18\x0A\x0Breconciling\x18\x09 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08disabled\x18\x0A \x01(\x08B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"`\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0C\x0A\x08INACTIVE\x10\x04\x12\x0A\x0A\x06ORPHAN\x10\x05:\xA6\x01\xEAA\xA2\x01\x0A:networksecurity.googleapis.com/FirewallEndpointAssociation\x12dprojects/{project}/locations/{location}/firewallEndpointAssociations/{firewall_endpoint_association}\"\xD0\x01\x0A'ListFirewallEndpointAssociationsRequest\x12R\x0A\x06parent\x18\x01 \x01(\x09BB\xE0A\x02\xFAA<\x12:networksecurity.googleapis.com/FirewallEndpointAssociation\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"\xBE\x01\x0A(ListFirewallEndpointAssociationsResponse\x12d\x0A\x1Efirewall_endpoint_associations\x18\x01 \x03(\x0B2<.google.cloud.networksecurity.v1.FirewallEndpointAssociation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"y\x0A%GetFirewallEndpointAssociationRequest\x12P\x0A\x04name\x18\x01 \x01(\x09BB\xE0A\x02\xFAA<\x0A:networksecurity.googleapis.com/FirewallEndpointAssociation\"\xB0\x02\x0A(CreateFirewallEndpointAssociationRequest\x12R\x0A\x06parent\x18\x01 \x01(\x09BB\xE0A\x02\xFAA<\x12:networksecurity.googleapis.com/FirewallEndpointAssociation\x12-\x0A firewall_endpoint_association_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12h\x0A\x1Dfirewall_endpoint_association\x18\x03 \x01(\x0B2<.google.cloud.networksecurity.v1.FirewallEndpointAssociationB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x95\x01\x0A(DeleteFirewallEndpointAssociationRequest\x12P\x0A\x04name\x18\x01 \x01(\x09BB\xE0A\x02\xFAA<\x0A:networksecurity.googleapis.com/FirewallEndpointAssociation\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xE3\x01\x0A(UpdateFirewallEndpointAssociationRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12h\x0A\x1Dfirewall_endpoint_association\x18\x02 \x01(\x0B2<.google.cloud.networksecurity.v1.FirewallEndpointAssociationB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x012\xAC\x18\x0A\x12FirewallActivation\x12\xE3\x01\x0A\x15ListFirewallEndpoints\x12=.google.cloud.networksecurity.v1.ListFirewallEndpointsRequest\x1A>.google.cloud.networksecurity.v1.ListFirewallEndpointsResponse\"K\xDAA\x06parent\x82\xD3\xE4\x93\x02<\x12:/v1/{parent=organizations/*/locations/*}/firewallEndpoints\x12\xD0\x01\x0A\x13GetFirewallEndpoint\x12;.google.cloud.networksecurity.v1.GetFirewallEndpointRequest\x1A1.google.cloud.networksecurity.v1.FirewallEndpoint\"I\xDAA\x04name\x82\xD3\xE4\x93\x02<\x12:/v1/{name=organizations/*/locations/*/firewallEndpoints/*}\x12\xC7\x02\x0A\x16CreateFirewallEndpoint\x12>.google.cloud.networksecurity.v1.CreateFirewallEndpointRequest\x1A\x1D.google.longrunning.Operation\"\xCD\x01\xCAAE\x0A\x10FirewallEndpoint\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,firewall_endpoint,firewall_endpoint_id\x82\xD3\xE4\x93\x02O\":/v1/{parent=organizations/*/locations/*}/firewallEndpoints:\x11firewall_endpoint\x12\x90\x02\x0A\x16DeleteFirewallEndpoint\x12>.google.cloud.networksecurity.v1.DeleteFirewallEndpointRequest\x1A\x1D.google.longrunning.Operation\"\x96\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02<*:/v1/{name=organizations/*/locations/*/firewallEndpoints/*}\x12\xC9\x02\x0A\x16UpdateFirewallEndpoint\x12>.google.cloud.networksecurity.v1.UpdateFirewallEndpointRequest\x1A\x1D.google.longrunning.Operation\"\xCF\x01\xCAAE\x0A\x10FirewallEndpoint\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dfirewall_endpoint,update_mask\x82\xD3\xE4\x93\x02a2L/v1/{firewall_endpoint.name=organizations/*/locations/*/firewallEndpoints/*}:\x11firewall_endpoint\x12\x8A\x02\x0A ListFirewallEndpointAssociations\x12H.google.cloud.networksecurity.v1.ListFirewallEndpointAssociationsRequest\x1AI.google.cloud.networksecurity.v1.ListFirewallEndpointAssociationsResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*}/firewallEndpointAssociations\x12\xF7\x01\x0A\x1EGetFirewallEndpointAssociation\x12F.google.cloud.networksecurity.v1.GetFirewallEndpointAssociationRequest\x1A<.google.cloud.networksecurity.v1.FirewallEndpointAssociation\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/firewallEndpointAssociations/*}\x12\x92\x03\x0A!CreateFirewallEndpointAssociation\x12I.google.cloud.networksecurity.v1.CreateFirewallEndpointAssociationRequest\x1A\x1D.google.longrunning.Operation\"\x82\x02\xCAAP\x0A\x1BFirewallEndpointAssociation\x121google.cloud.networksecurity.v1.OperationMetadata\xDAAEparent,firewall_endpoint_association,firewall_endpoint_association_id\x82\xD3\xE4\x93\x02a\"@/v1/{parent=projects/*/locations/*}/firewallEndpointAssociations:\x1Dfirewall_endpoint_association\x12\xAC\x02\x0A!DeleteFirewallEndpointAssociation\x12I.google.cloud.networksecurity.v1.DeleteFirewallEndpointAssociationRequest\x1A\x1D.google.longrunning.Operation\"\x9C\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/firewallEndpointAssociations/*}\x12\x94\x03\x0A!UpdateFirewallEndpointAssociation\x12I.google.cloud.networksecurity.v1.UpdateFirewallEndpointAssociationRequest\x1A\x1D.google.longrunning.Operation\"\x84\x02\xCAAP\x0A\x1BFirewallEndpointAssociation\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA)firewall_endpoint_association,update_mask\x82\xD3\xE4\x93\x02\x7F2^/v1/{firewall_endpoint_association.name=projects/*/locations/*/firewallEndpointAssociations/*}:\x1Dfirewall_endpoint_association\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE3\x02\x0A#com.google.cloud.networksecurity.v1B\x17FirewallActivationProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1\xEAAh\x0A3networksecurity.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicy.php new file mode 100644 index 000000000000..eac666d5e8ee --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicy.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xBC\x0E\x0A=google/cloud/networksecurity/v1/gateway_security_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xA3\x03\x0A\x15GatewaySecurityPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x01\x12Y\x0A\x15tls_inspection_policy\x18\x05 \x01(\x09B:\xE0A\x01\xFAA4\x0A2networksecurity.googleapis.com/TlsInspectionPolicy:\x95\x01\xEAA\x91\x01\x0A4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\"\xF9\x01\x0A\"CreateGatewaySecurityPolicyRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124networksecurity.googleapis.com/GatewaySecurityPolicy\x12'\x0A\x1Agateway_security_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\\\x0A\x17gateway_security_policy\x18\x03 \x01(\x0B26.google.cloud.networksecurity.v1.GatewaySecurityPolicyB\x03\xE0A\x02\"\x86\x01\x0A\"ListGatewaySecurityPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\xAE\x01\x0A#ListGatewaySecurityPoliciesResponse\x12Y\x0A\x19gateway_security_policies\x18\x01 \x03(\x0B26.google.cloud.networksecurity.v1.GatewaySecurityPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"m\x0A\x1FGetGatewaySecurityPolicyRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4networksecurity.googleapis.com/GatewaySecurityPolicy\"p\x0A\"DeleteGatewaySecurityPolicyRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4networksecurity.googleapis.com/GatewaySecurityPolicy\"\xB8\x01\x0A\"UpdateGatewaySecurityPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12\\\x0A\x17gateway_security_policy\x18\x02 \x01(\x0B26.google.cloud.networksecurity.v1.GatewaySecurityPolicyB\x03\xE0A\x02B\xFB\x01\x0A#com.google.cloud.networksecurity.v1B\x1AGatewaySecurityPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicyRule.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicyRule.php new file mode 100644 index 000000000000..32d7c0a42bc8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicyRule.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x99\x11\x0ABgoogle/cloud/networksecurity/v1/gateway_security_policy_rule.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xA8\x05\x0A\x19GatewaySecurityPolicyRule\x12e\x0A\x0Dbasic_profile\x18\x09 \x01(\x0E2G.google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfileB\x03\xE0A\x02H\x00\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x02\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x14\x0A\x07enabled\x18\x04 \x01(\x08B\x03\xE0A\x02\x12\x15\x0A\x08priority\x18\x05 \x01(\x05B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x06 \x01(\x09B\x03\xE0A\x01\x12\x1C\x0A\x0Fsession_matcher\x18\x07 \x01(\x09B\x03\xE0A\x02\x12 \x0A\x13application_matcher\x18\x08 \x01(\x09B\x03\xE0A\x01\x12#\x0A\x16tls_inspection_enabled\x18\x0A \x01(\x08B\x03\xE0A\x01\"B\x0A\x0CBasicProfile\x12\x1D\x0A\x19BASIC_PROFILE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05ALLOW\x10\x01\x12\x08\x0A\x04DENY\x10\x02:\xA6\x01\xEAA\xA2\x01\x0A8networksecurity.googleapis.com/GatewaySecurityPolicyRule\x12fprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}B\x09\x0A\x07profile\"\x8A\x02\x0A&CreateGatewaySecurityPolicyRuleRequest\x12P\x0A\x06parent\x18\x01 \x01(\x09B@\xE0A\x02\xFAA:\x128networksecurity.googleapis.com/GatewaySecurityPolicyRule\x12e\x0A\x1Cgateway_security_policy_rule\x18\x02 \x01(\x0B2:.google.cloud.networksecurity.v1.GatewaySecurityPolicyRuleB\x03\xE0A\x02\x12'\x0A\x1Fgateway_security_policy_rule_id\x18\x03 \x01(\x09\"u\x0A#GetGatewaySecurityPolicyRuleRequest\x12N\x0A\x04name\x18\x01 \x01(\x09B@\xE0A\x02\xFAA:\x0A8networksecurity.googleapis.com/GatewaySecurityPolicyRule\"\xC5\x01\x0A&UpdateGatewaySecurityPolicyRuleRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12e\x0A\x1Cgateway_security_policy_rule\x18\x02 \x01(\x0B2:.google.cloud.networksecurity.v1.GatewaySecurityPolicyRuleB\x03\xE0A\x02\"\x9C\x01\x0A%ListGatewaySecurityPolicyRulesRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4networksecurity.googleapis.com/GatewaySecurityPolicy\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\xB9\x01\x0A&ListGatewaySecurityPolicyRulesResponse\x12a\x0A\x1Dgateway_security_policy_rules\x18\x01 \x03(\x0B2:.google.cloud.networksecurity.v1.GatewaySecurityPolicyRule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"x\x0A&DeleteGatewaySecurityPolicyRuleRequest\x12N\x0A\x04name\x18\x01 \x01(\x09B@\xE0A\x02\xFAA:\x0A8networksecurity.googleapis.com/GatewaySecurityPolicyRuleB\xFF\x01\x0A#com.google.cloud.networksecurity.v1B\x1EGatewaySecurityPolicyRuleProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Intercept.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Intercept.php new file mode 100644 index 000000000000..87071fd305a5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Intercept.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + "\x0A\xFF\x85\x01\x0A/google/cloud/networksecurity/v1/intercept.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF5\x0B\x0A\x16InterceptEndpointGroup\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12X\x0A\x06labels\x18\x04 \x03(\x0B2C.google.cloud.networksecurity.v1.InterceptEndpointGroup.LabelsEntryB\x03\xE0A\x01\x12f\x0A\x1Aintercept_deployment_group\x18\x05 \x01(\x09BB\xE0A\x02\xE0A\x05\xFAA9\x0A7networksecurity.googleapis.com/InterceptDeploymentGroup\x12y\x0A\x1Aconnected_deployment_group\x18\x0B \x01(\x0B2P.google.cloud.networksecurity.v1.InterceptEndpointGroup.ConnectedDeploymentGroupB\x03\xE0A\x03\x12Q\x0A\x05state\x18\x07 \x01(\x0E2=.google.cloud.networksecurity.v1.InterceptEndpointGroup.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x08 \x01(\x08B\x03\xE0A\x03\x12e\x0A\x0Cassociations\x18\x09 \x03(\x0B2J.google.cloud.networksecurity.v1.InterceptEndpointGroup.AssociationDetailsB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x0A \x01(\x09B\x03\xE0A\x01\x1A\xB5\x01\x0A\x18ConnectedDeploymentGroup\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x03\xFAA9\x0A7networksecurity.googleapis.com/InterceptDeploymentGroup\x12J\x0A\x09locations\x18\x02 \x03(\x0B22.google.cloud.networksecurity.v1.InterceptLocationB\x03\xE0A\x03\x1A\x83\x02\x0A\x12AssociationDetails\x12V\x0A\x04name\x18\x01 \x01(\x09BH\xE0A\x03\xFAAB\x0A@networksecurity.googleapis.com/InterceptEndpointGroupAssociation\x127\x0A\x07network\x18\x02 \x01(\x09B&\xE0A\x03\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12\\\x0A\x05state\x18\x03 \x01(\x0E2H.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.StateB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"v\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0A\x0A\x06CLOSED\x10\x02\x12\x0C\x0A\x08CREATING\x10\x03\x12\x0C\x0A\x08DELETING\x10\x04\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x05\x12\x11\x0A\x0DDELETE_FAILED\x10\x06:\xC8\x01\xEAA\xC4\x01\x0A5networksecurity.googleapis.com/InterceptEndpointGroup\x12Zprojects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}*\x17interceptEndpointGroups2\x16interceptEndpointGroup\"\xD0\x01\x0A\"ListInterceptEndpointGroupsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125networksecurity.googleapis.com/InterceptEndpointGroup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x9A\x01\x0A#ListInterceptEndpointGroupsResponse\x12Z\x0A\x19intercept_endpoint_groups\x18\x01 \x03(\x0B27.google.cloud.networksecurity.v1.InterceptEndpointGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"o\x0A GetInterceptEndpointGroupRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5networksecurity.googleapis.com/InterceptEndpointGroup\"\x9F\x02\x0A#CreateInterceptEndpointGroupRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125networksecurity.googleapis.com/InterceptEndpointGroup\x12(\x0A\x1Bintercept_endpoint_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12^\x0A\x18intercept_endpoint_group\x18\x03 \x01(\x0B27.google.cloud.networksecurity.v1.InterceptEndpointGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xDC\x01\x0A#UpdateInterceptEndpointGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12^\x0A\x18intercept_endpoint_group\x18\x02 \x01(\x0B27.google.cloud.networksecurity.v1.InterceptEndpointGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x93\x01\x0A#DeleteInterceptEndpointGroupRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5networksecurity.googleapis.com/InterceptEndpointGroup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x81\x0B\x0A!InterceptEndpointGroupAssociation\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12c\x0A\x06labels\x18\x04 \x03(\x0B2N.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LabelsEntryB\x03\xE0A\x01\x12b\x0A\x18intercept_endpoint_group\x18\x05 \x01(\x09B@\xE0A\x02\xE0A\x05\xFAA7\x0A5networksecurity.googleapis.com/InterceptEndpointGroup\x12:\x0A\x07network\x18\x06 \x01(\x09B)\xE0A\x02\xE0A\x05\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12t\x0A\x11locations_details\x18\x07 \x03(\x0B2R.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetailsB\x05\x18\x01\xE0A\x03\x12\\\x0A\x05state\x18\x08 \x01(\x0E2H.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x09 \x01(\x08B\x03\xE0A\x03\x12J\x0A\x09locations\x18\x0A \x03(\x0B22.google.cloud.networksecurity.v1.InterceptLocationB\x03\xE0A\x03\x12\x1B\x0A\x0Enetwork_cookie\x18\x0C \x01(\x0DB\x03\xE0A\x03\x1A\xD3\x01\x0A\x0FLocationDetails\x12\x15\x0A\x08location\x18\x01 \x01(\x09B\x03\xE0A\x03\x12l\x0A\x05state\x18\x02 \x01(\x0E2X.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails.StateB\x03\xE0A\x03\";\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x02\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"v\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08CREATING\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06CLOSED\x10\x04\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x05\x12\x11\x0A\x0DDELETE_FAILED\x10\x06:\x80\x02\xEAA\xFC\x01\x0A@networksecurity.googleapis.com/InterceptEndpointGroupAssociation\x12qprojects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}*\"interceptEndpointGroupAssociations2!interceptEndpointGroupAssociation\"\xE6\x01\x0A-ListInterceptEndpointGroupAssociationsRequest\x12X\x0A\x06parent\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x12@networksecurity.googleapis.com/InterceptEndpointGroupAssociation\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\xBC\x01\x0A.ListInterceptEndpointGroupAssociationsResponse\x12q\x0A%intercept_endpoint_group_associations\x18\x01 \x03(\x0B2B.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x85\x01\x0A+GetInterceptEndpointGroupAssociationRequest\x12V\x0A\x04name\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x0A@networksecurity.googleapis.com/InterceptEndpointGroupAssociation\"\xD8\x02\x0A.CreateInterceptEndpointGroupAssociationRequest\x12X\x0A\x06parent\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x12@networksecurity.googleapis.com/InterceptEndpointGroupAssociation\x124\x0A'intercept_endpoint_group_association_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12u\x0A\$intercept_endpoint_group_association\x18\x03 \x01(\x0B2B.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociationB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xFE\x01\x0A.UpdateInterceptEndpointGroupAssociationRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12u\x0A\$intercept_endpoint_group_association\x18\x02 \x01(\x0B2B.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociationB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA9\x01\x0A.DeleteInterceptEndpointGroupAssociationRequest\x12V\x0A\x04name\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x0A@networksecurity.googleapis.com/InterceptEndpointGroupAssociation\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xC8\x0A\x0A\x18InterceptDeploymentGroup\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12Z\x0A\x06labels\x18\x04 \x03(\x0B2E.google.cloud.networksecurity.v1.InterceptDeploymentGroup.LabelsEntryB\x03\xE0A\x01\x12:\x0A\x07network\x18\x05 \x01(\x09B)\xE0A\x02\xE0A\x05\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12x\x0A\x19connected_endpoint_groups\x18\x06 \x03(\x0B2P.google.cloud.networksecurity.v1.InterceptDeploymentGroup.ConnectedEndpointGroupB\x03\xE0A\x03\x12g\x0A\x12nested_deployments\x18\x0A \x03(\x0B2D.google.cloud.networksecurity.v1.InterceptDeploymentGroup.DeploymentB\x05\x18\x01\xE0A\x03\x12S\x0A\x05state\x18\x07 \x01(\x0E2?.google.cloud.networksecurity.v1.InterceptDeploymentGroup.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x08 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12J\x0A\x09locations\x18\x0B \x03(\x0B22.google.cloud.networksecurity.v1.InterceptLocationB\x03\xE0A\x03\x1Ae\x0A\x16ConnectedEndpointGroup\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x03\xFAA7\x0A5networksecurity.googleapis.com/InterceptEndpointGroup\x1A\xA6\x01\x0A\x0ADeployment\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x03\xFAA4\x0A2networksecurity.googleapis.com/InterceptDeployment\x12N\x0A\x05state\x18\x02 \x01(\x0E2:.google.cloud.networksecurity.v1.InterceptDeployment.StateB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08CREATING\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03:\xD2\x01\xEAA\xCE\x01\x0A7networksecurity.googleapis.com/InterceptDeploymentGroup\x12^projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}*\x19interceptDeploymentGroups2\x18interceptDeploymentGroup\"\xD4\x01\x0A\$ListInterceptDeploymentGroupsRequest\x12O\x0A\x06parent\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x127networksecurity.googleapis.com/InterceptDeploymentGroup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\xA0\x01\x0A%ListInterceptDeploymentGroupsResponse\x12^\x0A\x1Bintercept_deployment_groups\x18\x01 \x03(\x0B29.google.cloud.networksecurity.v1.InterceptDeploymentGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"s\x0A\"GetInterceptDeploymentGroupRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7networksecurity.googleapis.com/InterceptDeploymentGroup\"\xA9\x02\x0A%CreateInterceptDeploymentGroupRequest\x12O\x0A\x06parent\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x127networksecurity.googleapis.com/InterceptDeploymentGroup\x12*\x0A\x1Dintercept_deployment_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12b\x0A\x1Aintercept_deployment_group\x18\x03 \x01(\x0B29.google.cloud.networksecurity.v1.InterceptDeploymentGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xE2\x01\x0A%UpdateInterceptDeploymentGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12b\x0A\x1Aintercept_deployment_group\x18\x02 \x01(\x0B29.google.cloud.networksecurity.v1.InterceptDeploymentGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x97\x01\x0A%DeleteInterceptDeploymentGroupRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7networksecurity.googleapis.com/InterceptDeploymentGroup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xFB\x06\x0A\x13InterceptDeployment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12U\x0A\x06labels\x18\x04 \x03(\x0B2@.google.cloud.networksecurity.v1.InterceptDeployment.LabelsEntryB\x03\xE0A\x01\x12I\x0A\x0Fforwarding_rule\x18\x05 \x01(\x09B0\xE0A\x02\xE0A\x05\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12f\x0A\x1Aintercept_deployment_group\x18\x06 \x01(\x09BB\xE0A\x02\xE0A\x05\xFAA9\x0A7networksecurity.googleapis.com/InterceptDeploymentGroup\x12N\x0A\x05state\x18\x07 \x01(\x0E2:.google.cloud.networksecurity.v1.InterceptDeployment.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x08 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"j\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08CREATING\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x04\x12\x11\x0A\x0DDELETE_FAILED\x10\x05:\xB8\x01\xEAA\xB4\x01\x0A2networksecurity.googleapis.com/InterceptDeployment\x12Sprojects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}*\x14interceptDeployments2\x13interceptDeployment\"\xCA\x01\x0A\x1FListInterceptDeploymentsRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x122networksecurity.googleapis.com/InterceptDeployment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\xA5\x01\x0A ListInterceptDeploymentsResponse\x12S\x0A\x15intercept_deployments\x18\x01 \x03(\x0B24.google.cloud.networksecurity.v1.InterceptDeployment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"i\x0A\x1DGetInterceptDeploymentRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/InterceptDeployment\"\x8E\x02\x0A CreateInterceptDeploymentRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x122networksecurity.googleapis.com/InterceptDeployment\x12\$\x0A\x17intercept_deployment_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x14intercept_deployment\x18\x03 \x01(\x0B24.google.cloud.networksecurity.v1.InterceptDeploymentB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xD2\x01\x0A UpdateInterceptDeploymentRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12W\x0A\x14intercept_deployment\x18\x02 \x01(\x0B24.google.cloud.networksecurity.v1.InterceptDeploymentB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x8D\x01\x0A DeleteInterceptDeploymentRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/InterceptDeployment\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xB5\x01\x0A\x11InterceptLocation\x12\x15\x0A\x08location\x18\x01 \x01(\x09B\x03\xE0A\x03\x12L\x0A\x05state\x18\x02 \x01(\x0E28.google.cloud.networksecurity.v1.InterceptLocation.StateB\x03\xE0A\x03\";\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x022\xEE1\x0A\x09Intercept\x12\xF6\x01\x0A\x1BListInterceptEndpointGroups\x12C.google.cloud.networksecurity.v1.ListInterceptEndpointGroupsRequest\x1AD.google.cloud.networksecurity.v1.ListInterceptEndpointGroupsResponse\"L\xDAA\x06parent\x82\xD3\xE4\x93\x02=\x12;/v1/{parent=projects/*/locations/*}/interceptEndpointGroups\x12\xE3\x01\x0A\x19GetInterceptEndpointGroup\x12A.google.cloud.networksecurity.v1.GetInterceptEndpointGroupRequest\x1A7.google.cloud.networksecurity.v1.InterceptEndpointGroup\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=\x12;/v1/{name=projects/*/locations/*/interceptEndpointGroups/*}\x12\xEF\x02\x0A\x1CCreateInterceptEndpointGroup\x12D.google.cloud.networksecurity.v1.CreateInterceptEndpointGroupRequest\x1A\x1D.google.longrunning.Operation\"\xE9\x01\xCAAK\x0A\x16InterceptEndpointGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA;parent,intercept_endpoint_group,intercept_endpoint_group_id\x82\xD3\xE4\x93\x02W\";/v1/{parent=projects/*/locations/*}/interceptEndpointGroups:\x18intercept_endpoint_group\x12\xF1\x02\x0A\x1CUpdateInterceptEndpointGroup\x12D.google.cloud.networksecurity.v1.UpdateInterceptEndpointGroupRequest\x1A\x1D.google.longrunning.Operation\"\xEB\x01\xCAAK\x0A\x16InterceptEndpointGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\$intercept_endpoint_group,update_mask\x82\xD3\xE4\x93\x02p2T/v1/{intercept_endpoint_group.name=projects/*/locations/*/interceptEndpointGroups/*}:\x18intercept_endpoint_group\x12\x9D\x02\x0A\x1CDeleteInterceptEndpointGroup\x12D.google.cloud.networksecurity.v1.DeleteInterceptEndpointGroupRequest\x1A\x1D.google.longrunning.Operation\"\x97\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02=*;/v1/{name=projects/*/locations/*/interceptEndpointGroups/*}\x12\xA2\x02\x0A&ListInterceptEndpointGroupAssociations\x12N.google.cloud.networksecurity.v1.ListInterceptEndpointGroupAssociationsRequest\x1AO.google.cloud.networksecurity.v1.ListInterceptEndpointGroupAssociationsResponse\"W\xDAA\x06parent\x82\xD3\xE4\x93\x02H\x12F/v1/{parent=projects/*/locations/*}/interceptEndpointGroupAssociations\x12\x8F\x02\x0A\$GetInterceptEndpointGroupAssociation\x12L.google.cloud.networksecurity.v1.GetInterceptEndpointGroupAssociationRequest\x1AB.google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation\"U\xDAA\x04name\x82\xD3\xE4\x93\x02H\x12F/v1/{name=projects/*/locations/*/interceptEndpointGroupAssociations/*}\x12\xBF\x03\x0A'CreateInterceptEndpointGroupAssociation\x12O.google.cloud.networksecurity.v1.CreateInterceptEndpointGroupAssociationRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x02\xCAAV\x0A!InterceptEndpointGroupAssociation\x121google.cloud.networksecurity.v1.OperationMetadata\xDAASparent,intercept_endpoint_group_association,intercept_endpoint_group_association_id\x82\xD3\xE4\x93\x02n\"F/v1/{parent=projects/*/locations/*}/interceptEndpointGroupAssociations:\$intercept_endpoint_group_association\x12\xC2\x03\x0A'UpdateInterceptEndpointGroupAssociation\x12O.google.cloud.networksecurity.v1.UpdateInterceptEndpointGroupAssociationRequest\x1A\x1D.google.longrunning.Operation\"\xA6\x02\xCAAV\x0A!InterceptEndpointGroupAssociation\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA0intercept_endpoint_group_association,update_mask\x82\xD3\xE4\x93\x02\x93\x012k/v1/{intercept_endpoint_group_association.name=projects/*/locations/*/interceptEndpointGroupAssociations/*}:\$intercept_endpoint_group_association\x12\xBE\x02\x0A'DeleteInterceptEndpointGroupAssociation\x12O.google.cloud.networksecurity.v1.DeleteInterceptEndpointGroupAssociationRequest\x1A\x1D.google.longrunning.Operation\"\xA2\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02H*F/v1/{name=projects/*/locations/*/interceptEndpointGroupAssociations/*}\x12\xFE\x01\x0A\x1DListInterceptDeploymentGroups\x12E.google.cloud.networksecurity.v1.ListInterceptDeploymentGroupsRequest\x1AF.google.cloud.networksecurity.v1.ListInterceptDeploymentGroupsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/interceptDeploymentGroups\x12\xEB\x01\x0A\x1BGetInterceptDeploymentGroup\x12C.google.cloud.networksecurity.v1.GetInterceptDeploymentGroupRequest\x1A9.google.cloud.networksecurity.v1.InterceptDeploymentGroup\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/locations/*/interceptDeploymentGroups/*}\x12\xFD\x02\x0A\x1ECreateInterceptDeploymentGroup\x12F.google.cloud.networksecurity.v1.CreateInterceptDeploymentGroupRequest\x1A\x1D.google.longrunning.Operation\"\xF3\x01\xCAAM\x0A\x18InterceptDeploymentGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA?parent,intercept_deployment_group,intercept_deployment_group_id\x82\xD3\xE4\x93\x02[\"=/v1/{parent=projects/*/locations/*}/interceptDeploymentGroups:\x1Aintercept_deployment_group\x12\xFF\x02\x0A\x1EUpdateInterceptDeploymentGroup\x12F.google.cloud.networksecurity.v1.UpdateInterceptDeploymentGroupRequest\x1A\x1D.google.longrunning.Operation\"\xF5\x01\xCAAM\x0A\x18InterceptDeploymentGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA&intercept_deployment_group,update_mask\x82\xD3\xE4\x93\x02v2X/v1/{intercept_deployment_group.name=projects/*/locations/*/interceptDeploymentGroups/*}:\x1Aintercept_deployment_group\x12\xA3\x02\x0A\x1EDeleteInterceptDeploymentGroup\x12F.google.cloud.networksecurity.v1.DeleteInterceptDeploymentGroupRequest\x1A\x1D.google.longrunning.Operation\"\x99\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02?*=/v1/{name=projects/*/locations/*/interceptDeploymentGroups/*}\x12\xEA\x01\x0A\x18ListInterceptDeployments\x12@.google.cloud.networksecurity.v1.ListInterceptDeploymentsRequest\x1AA.google.cloud.networksecurity.v1.ListInterceptDeploymentsResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*}/interceptDeployments\x12\xD7\x01\x0A\x16GetInterceptDeployment\x12>.google.cloud.networksecurity.v1.GetInterceptDeploymentRequest\x1A4.google.cloud.networksecurity.v1.InterceptDeployment\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/interceptDeployments/*}\x12\xD7\x02\x0A\x19CreateInterceptDeployment\x12A.google.cloud.networksecurity.v1.CreateInterceptDeploymentRequest\x1A\x1D.google.longrunning.Operation\"\xD7\x01\xCAAH\x0A\x13InterceptDeployment\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA3parent,intercept_deployment,intercept_deployment_id\x82\xD3\xE4\x93\x02P\"8/v1/{parent=projects/*/locations/*}/interceptDeployments:\x14intercept_deployment\x12\xD9\x02\x0A\x19UpdateInterceptDeployment\x12A.google.cloud.networksecurity.v1.UpdateInterceptDeploymentRequest\x1A\x1D.google.longrunning.Operation\"\xD9\x01\xCAAH\x0A\x13InterceptDeployment\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA intercept_deployment,update_mask\x82\xD3\xE4\x93\x02e2M/v1/{intercept_deployment.name=projects/*/locations/*/interceptDeployments/*}:\x14intercept_deployment\x12\x94\x02\x0A\x19DeleteInterceptDeployment\x12A.google.cloud.networksecurity.v1.DeleteInterceptDeploymentRequest\x1A\x1D.google.longrunning.Operation\"\x94\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/interceptDeployments/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xEF\x01\x0A#com.google.cloud.networksecurity.v1B\x0EInterceptProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Mirroring.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Mirroring.php new file mode 100644 index 000000000000..906eba9bb472 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Mirroring.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + "\x0A\xC8\x87\x01\x0A/google/cloud/networksecurity/v1/mirroring.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xEE\x0C\x0A\x16MirroringEndpointGroup\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12X\x0A\x06labels\x18\x04 \x03(\x0B2C.google.cloud.networksecurity.v1.MirroringEndpointGroup.LabelsEntryB\x03\xE0A\x01\x12c\x0A\x1Amirroring_deployment_group\x18\x05 \x01(\x09B?\xE0A\x05\xFAA9\x0A7networksecurity.googleapis.com/MirroringDeploymentGroup\x12z\x0A\x1Bconnected_deployment_groups\x18\x0D \x03(\x0B2P.google.cloud.networksecurity.v1.MirroringEndpointGroup.ConnectedDeploymentGroupB\x03\xE0A\x03\x12Q\x0A\x05state\x18\x07 \x01(\x0E2=.google.cloud.networksecurity.v1.MirroringEndpointGroup.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x08 \x01(\x08B\x03\xE0A\x03\x12O\x0A\x04type\x18\x0B \x01(\x0E2<.google.cloud.networksecurity.v1.MirroringEndpointGroup.TypeB\x03\xE0A\x05\x12e\x0A\x0Cassociations\x18\x09 \x03(\x0B2J.google.cloud.networksecurity.v1.MirroringEndpointGroup.AssociationDetailsB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x0A \x01(\x09B\x03\xE0A\x01\x1A\xB5\x01\x0A\x18ConnectedDeploymentGroup\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x03\xFAA9\x0A7networksecurity.googleapis.com/MirroringDeploymentGroup\x12J\x0A\x09locations\x18\x02 \x03(\x0B22.google.cloud.networksecurity.v1.MirroringLocationB\x03\xE0A\x03\x1A\x83\x02\x0A\x12AssociationDetails\x12V\x0A\x04name\x18\x01 \x01(\x09BH\xE0A\x03\xFAAB\x0A@networksecurity.googleapis.com/MirroringEndpointGroupAssociation\x127\x0A\x07network\x18\x02 \x01(\x09B&\xE0A\x03\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12\\\x0A\x05state\x18\x03 \x01(\x0E2H.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.StateB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"v\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0A\x0A\x06CLOSED\x10\x02\x12\x0C\x0A\x08CREATING\x10\x03\x12\x0C\x0A\x08DELETING\x10\x04\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x05\x12\x11\x0A\x0DDELETE_FAILED\x10\x06\"(\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06DIRECT\x10\x01:\xC8\x01\xEAA\xC4\x01\x0A5networksecurity.googleapis.com/MirroringEndpointGroup\x12Zprojects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}*\x17mirroringEndpointGroups2\x16mirroringEndpointGroup\"\xD0\x01\x0A\"ListMirroringEndpointGroupsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125networksecurity.googleapis.com/MirroringEndpointGroup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x9A\x01\x0A#ListMirroringEndpointGroupsResponse\x12Z\x0A\x19mirroring_endpoint_groups\x18\x01 \x03(\x0B27.google.cloud.networksecurity.v1.MirroringEndpointGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"o\x0A GetMirroringEndpointGroupRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5networksecurity.googleapis.com/MirroringEndpointGroup\"\x9F\x02\x0A#CreateMirroringEndpointGroupRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125networksecurity.googleapis.com/MirroringEndpointGroup\x12(\x0A\x1Bmirroring_endpoint_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12^\x0A\x18mirroring_endpoint_group\x18\x03 \x01(\x0B27.google.cloud.networksecurity.v1.MirroringEndpointGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xDC\x01\x0A#UpdateMirroringEndpointGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12^\x0A\x18mirroring_endpoint_group\x18\x02 \x01(\x0B27.google.cloud.networksecurity.v1.MirroringEndpointGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x93\x01\x0A#DeleteMirroringEndpointGroupRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5networksecurity.googleapis.com/MirroringEndpointGroup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xDE\x0A\x0A!MirroringEndpointGroupAssociation\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12c\x0A\x06labels\x18\x04 \x03(\x0B2N.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LabelsEntryB\x03\xE0A\x01\x12_\x0A\x18mirroring_endpoint_group\x18\x05 \x01(\x09B=\xE0A\x05\xFAA7\x0A5networksecurity.googleapis.com/MirroringEndpointGroup\x127\x0A\x07network\x18\x06 \x01(\x09B&\xE0A\x05\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12t\x0A\x11locations_details\x18\x07 \x03(\x0B2R.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetailsB\x05\x18\x01\xE0A\x03\x12\\\x0A\x05state\x18\x08 \x01(\x0E2H.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x09 \x01(\x08B\x03\xE0A\x03\x12J\x0A\x09locations\x18\x0A \x03(\x0B22.google.cloud.networksecurity.v1.MirroringLocationB\x03\xE0A\x03\x1A\xD3\x01\x0A\x0FLocationDetails\x12\x15\x0A\x08location\x18\x01 \x01(\x09B\x03\xE0A\x03\x12l\x0A\x05state\x18\x02 \x01(\x0E2X.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails.StateB\x03\xE0A\x03\";\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x02\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"v\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08CREATING\x10\x03\x12\x0C\x0A\x08DELETING\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x06\x12\x11\x0A\x0DDELETE_FAILED\x10\x07:\x80\x02\xEAA\xFC\x01\x0A@networksecurity.googleapis.com/MirroringEndpointGroupAssociation\x12qprojects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association}*\"mirroringEndpointGroupAssociations2!mirroringEndpointGroupAssociation\"\xE6\x01\x0A-ListMirroringEndpointGroupAssociationsRequest\x12X\x0A\x06parent\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x12@networksecurity.googleapis.com/MirroringEndpointGroupAssociation\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\xBC\x01\x0A.ListMirroringEndpointGroupAssociationsResponse\x12q\x0A%mirroring_endpoint_group_associations\x18\x01 \x03(\x0B2B.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x85\x01\x0A+GetMirroringEndpointGroupAssociationRequest\x12V\x0A\x04name\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x0A@networksecurity.googleapis.com/MirroringEndpointGroupAssociation\"\xD8\x02\x0A.CreateMirroringEndpointGroupAssociationRequest\x12X\x0A\x06parent\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x12@networksecurity.googleapis.com/MirroringEndpointGroupAssociation\x124\x0A'mirroring_endpoint_group_association_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12u\x0A\$mirroring_endpoint_group_association\x18\x03 \x01(\x0B2B.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociationB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xFE\x01\x0A.UpdateMirroringEndpointGroupAssociationRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12u\x0A\$mirroring_endpoint_group_association\x18\x02 \x01(\x0B2B.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociationB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA9\x01\x0A.DeleteMirroringEndpointGroupAssociationRequest\x12V\x0A\x04name\x18\x01 \x01(\x09BH\xE0A\x02\xFAAB\x0A@networksecurity.googleapis.com/MirroringEndpointGroupAssociation\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xD4\x0A\x0A\x18MirroringDeploymentGroup\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12Z\x0A\x06labels\x18\x04 \x03(\x0B2E.google.cloud.networksecurity.v1.MirroringDeploymentGroup.LabelsEntryB\x03\xE0A\x01\x12:\x0A\x07network\x18\x05 \x01(\x09B)\xE0A\x02\xE0A\x05\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12x\x0A\x19connected_endpoint_groups\x18\x06 \x03(\x0B2P.google.cloud.networksecurity.v1.MirroringDeploymentGroup.ConnectedEndpointGroupB\x03\xE0A\x03\x12g\x0A\x12nested_deployments\x18\x0A \x03(\x0B2D.google.cloud.networksecurity.v1.MirroringDeploymentGroup.DeploymentB\x05\x18\x01\xE0A\x03\x12S\x0A\x05state\x18\x07 \x01(\x0E2?.google.cloud.networksecurity.v1.MirroringDeploymentGroup.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x08 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12J\x0A\x09locations\x18\x0B \x03(\x0B22.google.cloud.networksecurity.v1.MirroringLocationB\x03\xE0A\x03\x1Ae\x0A\x16ConnectedEndpointGroup\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x03\xFAA7\x0A5networksecurity.googleapis.com/MirroringEndpointGroup\x1A\xA6\x01\x0A\x0ADeployment\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x03\xFAA4\x0A2networksecurity.googleapis.com/MirroringDeployment\x12N\x0A\x05state\x18\x02 \x01(\x0E2:.google.cloud.networksecurity.v1.MirroringDeployment.StateB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"R\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08CREATING\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06CLOSED\x10\x04:\xD2\x01\xEAA\xCE\x01\x0A7networksecurity.googleapis.com/MirroringDeploymentGroup\x12^projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group}*\x19mirroringDeploymentGroups2\x18mirroringDeploymentGroup\"\xD4\x01\x0A\$ListMirroringDeploymentGroupsRequest\x12O\x0A\x06parent\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x127networksecurity.googleapis.com/MirroringDeploymentGroup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\xA0\x01\x0A%ListMirroringDeploymentGroupsResponse\x12^\x0A\x1Bmirroring_deployment_groups\x18\x01 \x03(\x0B29.google.cloud.networksecurity.v1.MirroringDeploymentGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"s\x0A\"GetMirroringDeploymentGroupRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7networksecurity.googleapis.com/MirroringDeploymentGroup\"\xA9\x02\x0A%CreateMirroringDeploymentGroupRequest\x12O\x0A\x06parent\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x127networksecurity.googleapis.com/MirroringDeploymentGroup\x12*\x0A\x1Dmirroring_deployment_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12b\x0A\x1Amirroring_deployment_group\x18\x03 \x01(\x0B29.google.cloud.networksecurity.v1.MirroringDeploymentGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xE2\x01\x0A%UpdateMirroringDeploymentGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12b\x0A\x1Amirroring_deployment_group\x18\x02 \x01(\x0B29.google.cloud.networksecurity.v1.MirroringDeploymentGroupB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x97\x01\x0A%DeleteMirroringDeploymentGroupRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7networksecurity.googleapis.com/MirroringDeploymentGroup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xFB\x06\x0A\x13MirroringDeployment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12U\x0A\x06labels\x18\x04 \x03(\x0B2@.google.cloud.networksecurity.v1.MirroringDeployment.LabelsEntryB\x03\xE0A\x01\x12I\x0A\x0Fforwarding_rule\x18\x05 \x01(\x09B0\xE0A\x02\xE0A\x05\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12f\x0A\x1Amirroring_deployment_group\x18\x06 \x01(\x09BB\xE0A\x02\xE0A\x05\xFAA9\x0A7networksecurity.googleapis.com/MirroringDeploymentGroup\x12N\x0A\x05state\x18\x07 \x01(\x0E2:.google.cloud.networksecurity.v1.MirroringDeployment.StateB\x03\xE0A\x03\x12\x18\x0A\x0Breconciling\x18\x08 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"j\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08CREATING\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x04\x12\x11\x0A\x0DDELETE_FAILED\x10\x05:\xB8\x01\xEAA\xB4\x01\x0A2networksecurity.googleapis.com/MirroringDeployment\x12Sprojects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}*\x14mirroringDeployments2\x13mirroringDeployment\"\xCA\x01\x0A\x1FListMirroringDeploymentsRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x122networksecurity.googleapis.com/MirroringDeployment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\xA5\x01\x0A ListMirroringDeploymentsResponse\x12S\x0A\x15mirroring_deployments\x18\x01 \x03(\x0B24.google.cloud.networksecurity.v1.MirroringDeployment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"i\x0A\x1DGetMirroringDeploymentRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/MirroringDeployment\"\x8E\x02\x0A CreateMirroringDeploymentRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x122networksecurity.googleapis.com/MirroringDeployment\x12\$\x0A\x17mirroring_deployment_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x14mirroring_deployment\x18\x03 \x01(\x0B24.google.cloud.networksecurity.v1.MirroringDeploymentB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xD2\x01\x0A UpdateMirroringDeploymentRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12W\x0A\x14mirroring_deployment\x18\x02 \x01(\x0B24.google.cloud.networksecurity.v1.MirroringDeploymentB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x8D\x01\x0A DeleteMirroringDeploymentRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/MirroringDeployment\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xB5\x01\x0A\x11MirroringLocation\x12\x15\x0A\x08location\x18\x01 \x01(\x09B\x03\xE0A\x03\x12L\x0A\x05state\x18\x02 \x01(\x0E28.google.cloud.networksecurity.v1.MirroringLocation.StateB\x03\xE0A\x03\";\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0F\x0A\x0BOUT_OF_SYNC\x10\x022\xEE1\x0A\x09Mirroring\x12\xF6\x01\x0A\x1BListMirroringEndpointGroups\x12C.google.cloud.networksecurity.v1.ListMirroringEndpointGroupsRequest\x1AD.google.cloud.networksecurity.v1.ListMirroringEndpointGroupsResponse\"L\xDAA\x06parent\x82\xD3\xE4\x93\x02=\x12;/v1/{parent=projects/*/locations/*}/mirroringEndpointGroups\x12\xE3\x01\x0A\x19GetMirroringEndpointGroup\x12A.google.cloud.networksecurity.v1.GetMirroringEndpointGroupRequest\x1A7.google.cloud.networksecurity.v1.MirroringEndpointGroup\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=\x12;/v1/{name=projects/*/locations/*/mirroringEndpointGroups/*}\x12\xEF\x02\x0A\x1CCreateMirroringEndpointGroup\x12D.google.cloud.networksecurity.v1.CreateMirroringEndpointGroupRequest\x1A\x1D.google.longrunning.Operation\"\xE9\x01\xCAAK\x0A\x16MirroringEndpointGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA;parent,mirroring_endpoint_group,mirroring_endpoint_group_id\x82\xD3\xE4\x93\x02W\";/v1/{parent=projects/*/locations/*}/mirroringEndpointGroups:\x18mirroring_endpoint_group\x12\xF1\x02\x0A\x1CUpdateMirroringEndpointGroup\x12D.google.cloud.networksecurity.v1.UpdateMirroringEndpointGroupRequest\x1A\x1D.google.longrunning.Operation\"\xEB\x01\xCAAK\x0A\x16MirroringEndpointGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\$mirroring_endpoint_group,update_mask\x82\xD3\xE4\x93\x02p2T/v1/{mirroring_endpoint_group.name=projects/*/locations/*/mirroringEndpointGroups/*}:\x18mirroring_endpoint_group\x12\x9D\x02\x0A\x1CDeleteMirroringEndpointGroup\x12D.google.cloud.networksecurity.v1.DeleteMirroringEndpointGroupRequest\x1A\x1D.google.longrunning.Operation\"\x97\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02=*;/v1/{name=projects/*/locations/*/mirroringEndpointGroups/*}\x12\xA2\x02\x0A&ListMirroringEndpointGroupAssociations\x12N.google.cloud.networksecurity.v1.ListMirroringEndpointGroupAssociationsRequest\x1AO.google.cloud.networksecurity.v1.ListMirroringEndpointGroupAssociationsResponse\"W\xDAA\x06parent\x82\xD3\xE4\x93\x02H\x12F/v1/{parent=projects/*/locations/*}/mirroringEndpointGroupAssociations\x12\x8F\x02\x0A\$GetMirroringEndpointGroupAssociation\x12L.google.cloud.networksecurity.v1.GetMirroringEndpointGroupAssociationRequest\x1AB.google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation\"U\xDAA\x04name\x82\xD3\xE4\x93\x02H\x12F/v1/{name=projects/*/locations/*/mirroringEndpointGroupAssociations/*}\x12\xBF\x03\x0A'CreateMirroringEndpointGroupAssociation\x12O.google.cloud.networksecurity.v1.CreateMirroringEndpointGroupAssociationRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x02\xCAAV\x0A!MirroringEndpointGroupAssociation\x121google.cloud.networksecurity.v1.OperationMetadata\xDAASparent,mirroring_endpoint_group_association,mirroring_endpoint_group_association_id\x82\xD3\xE4\x93\x02n\"F/v1/{parent=projects/*/locations/*}/mirroringEndpointGroupAssociations:\$mirroring_endpoint_group_association\x12\xC2\x03\x0A'UpdateMirroringEndpointGroupAssociation\x12O.google.cloud.networksecurity.v1.UpdateMirroringEndpointGroupAssociationRequest\x1A\x1D.google.longrunning.Operation\"\xA6\x02\xCAAV\x0A!MirroringEndpointGroupAssociation\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA0mirroring_endpoint_group_association,update_mask\x82\xD3\xE4\x93\x02\x93\x012k/v1/{mirroring_endpoint_group_association.name=projects/*/locations/*/mirroringEndpointGroupAssociations/*}:\$mirroring_endpoint_group_association\x12\xBE\x02\x0A'DeleteMirroringEndpointGroupAssociation\x12O.google.cloud.networksecurity.v1.DeleteMirroringEndpointGroupAssociationRequest\x1A\x1D.google.longrunning.Operation\"\xA2\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02H*F/v1/{name=projects/*/locations/*/mirroringEndpointGroupAssociations/*}\x12\xFE\x01\x0A\x1DListMirroringDeploymentGroups\x12E.google.cloud.networksecurity.v1.ListMirroringDeploymentGroupsRequest\x1AF.google.cloud.networksecurity.v1.ListMirroringDeploymentGroupsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/mirroringDeploymentGroups\x12\xEB\x01\x0A\x1BGetMirroringDeploymentGroup\x12C.google.cloud.networksecurity.v1.GetMirroringDeploymentGroupRequest\x1A9.google.cloud.networksecurity.v1.MirroringDeploymentGroup\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/locations/*/mirroringDeploymentGroups/*}\x12\xFD\x02\x0A\x1ECreateMirroringDeploymentGroup\x12F.google.cloud.networksecurity.v1.CreateMirroringDeploymentGroupRequest\x1A\x1D.google.longrunning.Operation\"\xF3\x01\xCAAM\x0A\x18MirroringDeploymentGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA?parent,mirroring_deployment_group,mirroring_deployment_group_id\x82\xD3\xE4\x93\x02[\"=/v1/{parent=projects/*/locations/*}/mirroringDeploymentGroups:\x1Amirroring_deployment_group\x12\xFF\x02\x0A\x1EUpdateMirroringDeploymentGroup\x12F.google.cloud.networksecurity.v1.UpdateMirroringDeploymentGroupRequest\x1A\x1D.google.longrunning.Operation\"\xF5\x01\xCAAM\x0A\x18MirroringDeploymentGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA&mirroring_deployment_group,update_mask\x82\xD3\xE4\x93\x02v2X/v1/{mirroring_deployment_group.name=projects/*/locations/*/mirroringDeploymentGroups/*}:\x1Amirroring_deployment_group\x12\xA3\x02\x0A\x1EDeleteMirroringDeploymentGroup\x12F.google.cloud.networksecurity.v1.DeleteMirroringDeploymentGroupRequest\x1A\x1D.google.longrunning.Operation\"\x99\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02?*=/v1/{name=projects/*/locations/*/mirroringDeploymentGroups/*}\x12\xEA\x01\x0A\x18ListMirroringDeployments\x12@.google.cloud.networksecurity.v1.ListMirroringDeploymentsRequest\x1AA.google.cloud.networksecurity.v1.ListMirroringDeploymentsResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*}/mirroringDeployments\x12\xD7\x01\x0A\x16GetMirroringDeployment\x12>.google.cloud.networksecurity.v1.GetMirroringDeploymentRequest\x1A4.google.cloud.networksecurity.v1.MirroringDeployment\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/mirroringDeployments/*}\x12\xD7\x02\x0A\x19CreateMirroringDeployment\x12A.google.cloud.networksecurity.v1.CreateMirroringDeploymentRequest\x1A\x1D.google.longrunning.Operation\"\xD7\x01\xCAAH\x0A\x13MirroringDeployment\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA3parent,mirroring_deployment,mirroring_deployment_id\x82\xD3\xE4\x93\x02P\"8/v1/{parent=projects/*/locations/*}/mirroringDeployments:\x14mirroring_deployment\x12\xD9\x02\x0A\x19UpdateMirroringDeployment\x12A.google.cloud.networksecurity.v1.UpdateMirroringDeploymentRequest\x1A\x1D.google.longrunning.Operation\"\xD9\x01\xCAAH\x0A\x13MirroringDeployment\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA mirroring_deployment,update_mask\x82\xD3\xE4\x93\x02e2M/v1/{mirroring_deployment.name=projects/*/locations/*/mirroringDeployments/*}:\x14mirroring_deployment\x12\x94\x02\x0A\x19DeleteMirroringDeployment\x12A.google.cloud.networksecurity.v1.DeleteMirroringDeploymentRequest\x1A\x1D.google.longrunning.Operation\"\x94\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/mirroringDeployments/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD6\x02\x0A#com.google.cloud.networksecurity.v1B\x0EMirroringProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1\xEAAd\x0A%compute.googleapis.com/ForwardingRule\x12;projects/{project}/global/forwardingRules/{forwarding_rule}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php new file mode 100644 index 000000000000..df30623dc988 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + "\x0A\xC7k\x0A6google/cloud/networksecurity/v1/network_security.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A:google/cloud/networksecurity/v1/authorization_policy.proto\x1A2google/cloud/networksecurity/v1/authz_policy.proto\x1ACgoogle/cloud/networksecurity/v1/backend_authentication_config.proto\x1A7google/cloud/networksecurity/v1/client_tls_policy.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A=google/cloud/networksecurity/v1/gateway_security_policy.proto\x1ABgoogle/cloud/networksecurity/v1/gateway_security_policy_rule.proto\x1A7google/cloud/networksecurity/v1/server_tls_policy.proto\x1A;google/cloud/networksecurity/v1/tls_inspection_policy.proto\x1A.google/cloud/networksecurity/v1/url_list.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto2\xE1c\x0A\x0FNetworkSecurity\x12\xEE\x01\x0A\x19ListAuthorizationPolicies\x12A.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest\x1AB.google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*}/authorizationPolicies\x12\xD8\x01\x0A\x16GetAuthorizationPolicy\x12>.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest\x1A4.google.cloud.networksecurity.v1.AuthorizationPolicy\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\xD8\x02\x0A\x19CreateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xD8\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA3parent,authorization_policy,authorization_policy_id\x82\xD3\xE4\x93\x02Q\"9/v1/{parent=projects/*/locations/*}/authorizationPolicies:\x14authorization_policy\x12\xDA\x02\x0A\x19UpdateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDA\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA authorization_policy,update_mask\x82\xD3\xE4\x93\x02f2N/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}:\x14authorization_policy\x12\x95\x02\x0A\x19DeleteAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\x8A\x02\x0A ListBackendAuthenticationConfigs\x12H.google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsRequest\x1AI.google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs\x12\xF7\x01\x0A\x1EGetBackendAuthenticationConfig\x12F.google.cloud.networksecurity.v1.GetBackendAuthenticationConfigRequest\x1A<.google.cloud.networksecurity.v1.BackendAuthenticationConfig\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}\x12\x92\x03\x0A!CreateBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.CreateBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x82\x02\xCAAP\x0A\x1BBackendAuthenticationConfig\x121google.cloud.networksecurity.v1.OperationMetadata\xDAAEparent,backend_authentication_config,backend_authentication_config_id\x82\xD3\xE4\x93\x02a\"@/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs:\x1Dbackend_authentication_config\x12\x94\x03\x0A!UpdateBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.UpdateBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x84\x02\xCAAP\x0A\x1BBackendAuthenticationConfig\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA)backend_authentication_config,update_mask\x82\xD3\xE4\x93\x02\x7F2^/v1/{backend_authentication_config.name=projects/*/locations/*/backendAuthenticationConfigs/*}:\x1Dbackend_authentication_config\x12\xAC\x02\x0A!DeleteBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.DeleteBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x9C\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}\x12\xDE\x01\x0A\x15ListServerTlsPolicies\x12=.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/serverTlsPolicies\x12\xC8\x01\x0A\x12GetServerTlsPolicy\x12:.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ServerTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,server_tls_policy,server_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serverTlsPolicies:\x11server_tls_policy\x12\xC1\x02\x0A\x15UpdateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dserver_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}:\x11server_tls_policy\x12\x89\x02\x0A\x15DeleteServerTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xDE\x01\x0A\x15ListClientTlsPolicies\x12=.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/clientTlsPolicies\x12\xC8\x01\x0A\x12GetClientTlsPolicy\x12:.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ClientTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,client_tls_policy,client_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/clientTlsPolicies:\x11client_tls_policy\x12\xC1\x02\x0A\x15UpdateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dclient_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}:\x11client_tls_policy\x12\x89\x02\x0A\x15DeleteClientTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x12\xF6\x01\x0A\x1BListGatewaySecurityPolicies\x12C.google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesRequest\x1AD.google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesResponse\"L\xDAA\x06parent\x82\xD3\xE4\x93\x02=\x12;/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies\x12\xE0\x01\x0A\x18GetGatewaySecurityPolicy\x12@.google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRequest\x1A6.google.cloud.networksecurity.v1.GatewaySecurityPolicy\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=\x12;/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}\x12\xE9\x02\x0A\x1BCreateGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xE5\x01\xCAAJ\x0A\x15GatewaySecurityPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA9parent,gateway_security_policy,gateway_security_policy_id\x82\xD3\xE4\x93\x02V\";/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies:\x17gateway_security_policy\x12\xEB\x02\x0A\x1BUpdateGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xE7\x01\xCAAJ\x0A\x15GatewaySecurityPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA#gateway_security_policy,update_mask\x82\xD3\xE4\x93\x02n2S/v1/{gateway_security_policy.name=projects/*/locations/*/gatewaySecurityPolicies/*}:\x17gateway_security_policy\x12\x9B\x02\x0A\x1BDeleteGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x97\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02=*;/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}\x12\x87\x02\x0A\x1EListGatewaySecurityPolicyRules\x12F.google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesRequest\x1AG.google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12C/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules\x12\xF4\x01\x0A\x1CGetGatewaySecurityPolicyRule\x12D.google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRuleRequest\x1A:.google.cloud.networksecurity.v1.GatewaySecurityPolicyRule\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12C/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}\x12\x8C\x03\x0A\x1FCreateGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x80\x02\xCAAN\x0A\x19GatewaySecurityPolicyRule\x121google.cloud.networksecurity.v1.OperationMetadata\xDAACparent,gateway_security_policy_rule,gateway_security_policy_rule_id\x82\xD3\xE4\x93\x02c\"C/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules:\x1Cgateway_security_policy_rule\x12\x8F\x03\x0A\x1FUpdateGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x83\x02\xCAAN\x0A\x19GatewaySecurityPolicyRule\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA(gateway_security_policy_rule,update_mask\x82\xD3\xE4\x93\x02\x80\x012`/v1/{gateway_security_policy_rule.name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}:\x1Cgateway_security_policy_rule\x12\xAB\x02\x0A\x1FDeleteGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x9F\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02E*C/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}\x12\xBA\x01\x0A\x0CListUrlLists\x124.google.cloud.networksecurity.v1.ListUrlListsRequest\x1A5.google.cloud.networksecurity.v1.ListUrlListsResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/urlLists\x12\xA7\x01\x0A\x0AGetUrlList\x122.google.cloud.networksecurity.v1.GetUrlListRequest\x1A(.google.cloud.networksecurity.v1.UrlList\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/urlLists/*}\x12\x83\x02\x0A\x0DCreateUrlList\x125.google.cloud.networksecurity.v1.CreateUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA<\x0A\x07UrlList\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Bparent,url_list,url_list_id\x82\xD3\xE4\x93\x028\",/v1/{parent=projects/*/locations/*}/urlLists:\x08url_list\x12\x85\x02\x0A\x0DUpdateUrlList\x125.google.cloud.networksecurity.v1.UpdateUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x9D\x01\xCAA<\x0A\x07UrlList\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x14url_list,update_mask\x82\xD3\xE4\x93\x02A25/v1/{url_list.name=projects/*/locations/*/urlLists/*}:\x08url_list\x12\xF0\x01\x0A\x0DDeleteUrlList\x125.google.cloud.networksecurity.v1.DeleteUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x88\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/urlLists/*}\x12\xEE\x01\x0A\x19ListTlsInspectionPolicies\x12A.google.cloud.networksecurity.v1.ListTlsInspectionPoliciesRequest\x1AB.google.cloud.networksecurity.v1.ListTlsInspectionPoliciesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies\x12\xD8\x01\x0A\x16GetTlsInspectionPolicy\x12>.google.cloud.networksecurity.v1.GetTlsInspectionPolicyRequest\x1A4.google.cloud.networksecurity.v1.TlsInspectionPolicy\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}\x12\xDB\x02\x0A\x19CreateTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.CreateTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDB\x01\xCAAH\x0A\x13TlsInspectionPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA5parent,tls_inspection_policy,tls_inspection_policy_id\x82\xD3\xE4\x93\x02R\"9/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies:\x15tls_inspection_policy\x12\xDD\x02\x0A\x19UpdateTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.UpdateTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDD\x01\xCAAH\x0A\x13TlsInspectionPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA!tls_inspection_policy,update_mask\x82\xD3\xE4\x93\x02h2O/v1/{tls_inspection_policy.name=projects/*/locations/*/tlsInspectionPolicies/*}:\x15tls_inspection_policy\x12\x95\x02\x0A\x19DeleteTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.DeleteTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}\x12\xCE\x01\x0A\x11ListAuthzPolicies\x129.google.cloud.networksecurity.v1.ListAuthzPoliciesRequest\x1A:.google.cloud.networksecurity.v1.ListAuthzPoliciesResponse\"B\xDAA\x06parent\x82\xD3\xE4\x93\x023\x121/v1/{parent=projects/*/locations/*}/authzPolicies\x12\xB8\x01\x0A\x0EGetAuthzPolicy\x126.google.cloud.networksecurity.v1.GetAuthzPolicyRequest\x1A,.google.cloud.networksecurity.v1.AuthzPolicy\"@\xDAA\x04name\x82\xD3\xE4\x93\x023\x121/v1/{name=projects/*/locations/*/authzPolicies/*}\x12\xA0\x02\x0A\x11CreateAuthzPolicy\x129.google.cloud.networksecurity.v1.CreateAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xB0\x01\xCAA@\x0A\x0BAuthzPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA#parent,authz_policy,authz_policy_id\x82\xD3\xE4\x93\x02A\"1/v1/{parent=projects/*/locations/*}/authzPolicies:\x0Cauthz_policy\x12\xA2\x02\x0A\x11UpdateAuthzPolicy\x129.google.cloud.networksecurity.v1.UpdateAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xB2\x01\xCAA@\x0A\x0BAuthzPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x18authz_policy,update_mask\x82\xD3\xE4\x93\x02N2>/v1/{authz_policy.name=projects/*/locations/*/authzPolicies/*}:\x0Cauthz_policy\x12\xFD\x01\x0A\x11DeleteAuthzPolicy\x129.google.cloud.networksecurity.v1.DeleteAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x023*1/v1/{name=projects/*/locations/*/authzPolicies/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDF\x01\x0A#com.google.cloud.networksecurity.v1P\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroup.php new file mode 100644 index 000000000000..ff855c5d6db9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroup.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\x80\x16\x0AinternalAddGeneratedFile( + "\x0A\x8D\x04\x0AFgoogle/cloud/networksecurity/v1/security_profile_group_intercept.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\"y\x0A\x16CustomInterceptProfile\x12_\x0A\x18intercept_endpoint_group\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5networksecurity.googleapis.com/InterceptEndpointGroupB\x83\x02\x0A#com.google.cloud.networksecurity.v1B\"SecurityProfileGroupInterceptProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupMirroring.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupMirroring.php new file mode 100644 index 000000000000..0fea8edcc017 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupMirroring.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\x90\x04\x0AFgoogle/cloud/networksecurity/v1/security_profile_group_mirroring.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\"|\x0A\x16CustomMirroringProfile\x12b\x0A\x18mirroring_endpoint_group\x18\x01 \x01(\x09B@\xE0A\x02\xE0A\x05\xFAA7\x0A5networksecurity.googleapis.com/MirroringEndpointGroupB\x83\x02\x0A#com.google.cloud.networksecurity.v1B\"SecurityProfileGroupMirroringProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupService.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupService.php new file mode 100644 index 000000000000..bd0551e5545b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupService.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + "\x0A\x87+\x0ADgoogle/cloud/networksecurity/v1/security_profile_group_service.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A/v1/{parent=organizations/*/locations/*}/securityProfileGroups\x12\xE0\x01\x0A\x17GetSecurityProfileGroup\x12?.google.cloud.networksecurity.v1.GetSecurityProfileGroupRequest\x1A5.google.cloud.networksecurity.v1.SecurityProfileGroup\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=organizations/*/locations/*/securityProfileGroups/*}\x12\xE6\x02\x0A\x1ACreateSecurityProfileGroup\x12B.google.cloud.networksecurity.v1.CreateSecurityProfileGroupRequest\x1A\x1D.google.longrunning.Operation\"\xE4\x01\xCAAI\x0A\x14SecurityProfileGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA7parent,security_profile_group,security_profile_group_id\x82\xD3\xE4\x93\x02X\">/v1/{parent=organizations/*/locations/*}/securityProfileGroups:\x16security_profile_group\x12\xE8\x02\x0A\x1AUpdateSecurityProfileGroup\x12B.google.cloud.networksecurity.v1.UpdateSecurityProfileGroupRequest\x1A\x1D.google.longrunning.Operation\"\xE6\x01\xCAAI\x0A\x14SecurityProfileGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"security_profile_group,update_mask\x82\xD3\xE4\x93\x02o2U/v1/{security_profile_group.name=organizations/*/locations/*/securityProfileGroups/*}:\x16security_profile_group\x12\x9C\x02\x0A\x1ADeleteSecurityProfileGroup\x12B.google.cloud.networksecurity.v1.DeleteSecurityProfileGroupRequest\x1A\x1D.google.longrunning.Operation\"\x9A\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=organizations/*/locations/*/securityProfileGroups/*}\x12\xDF\x01\x0A\x14ListSecurityProfiles\x12<.google.cloud.networksecurity.v1.ListSecurityProfilesRequest\x1A=.google.cloud.networksecurity.v1.ListSecurityProfilesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=organizations/*/locations/*}/securityProfiles\x12\xCC\x01\x0A\x12GetSecurityProfile\x12:.google.cloud.networksecurity.v1.GetSecurityProfileRequest\x1A0.google.cloud.networksecurity.v1.SecurityProfile\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=organizations/*/locations/*/securityProfiles/*}\x12\xC0\x02\x0A\x15CreateSecurityProfile\x12=.google.cloud.networksecurity.v1.CreateSecurityProfileRequest\x1A\x1D.google.longrunning.Operation\"\xC8\x01\xCAAD\x0A\x0FSecurityProfile\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA+parent,security_profile,security_profile_id\x82\xD3\xE4\x93\x02M\"9/v1/{parent=organizations/*/locations/*}/securityProfiles:\x10security_profile\x12\xC2\x02\x0A\x15UpdateSecurityProfile\x12=.google.cloud.networksecurity.v1.UpdateSecurityProfileRequest\x1A\x1D.google.longrunning.Operation\"\xCA\x01\xCAAD\x0A\x0FSecurityProfile\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Csecurity_profile,update_mask\x82\xD3\xE4\x93\x02^2J/v1/{security_profile.name=organizations/*/locations/*/securityProfiles/*}:\x10security_profile\x12\x8D\x02\x0A\x15DeleteSecurityProfile\x12=.google.cloud.networksecurity.v1.DeleteSecurityProfileRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=organizations/*/locations/*/securityProfiles/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x81\x02\x0A#com.google.cloud.networksecurity.v1B SecurityProfileGroupServiceProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupThreatprevention.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupThreatprevention.php new file mode 100644 index 000000000000..2d6977cbbf7f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupThreatprevention.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xA5\x0C\x0AMgoogle/cloud/networksecurity/v1/security_profile_group_threatprevention.proto\x12\x1Fgoogle.cloud.networksecurity.v1\"\x93\x02\x0A\x17ThreatPreventionProfile\x12R\x0A\x12severity_overrides\x18\x01 \x03(\x0B21.google.cloud.networksecurity.v1.SeverityOverrideB\x03\xE0A\x01\x12N\x0A\x10threat_overrides\x18\x02 \x03(\x0B2/.google.cloud.networksecurity.v1.ThreatOverrideB\x03\xE0A\x01\x12T\x0A\x13antivirus_overrides\x18\x04 \x03(\x0B22.google.cloud.networksecurity.v1.AntivirusOverrideB\x03\xE0A\x01\"\x98\x01\x0A\x10SeverityOverride\x12@\x0A\x08severity\x18\x01 \x01(\x0E2).google.cloud.networksecurity.v1.SeverityB\x03\xE0A\x02\x12B\x0A\x06action\x18\x02 \x01(\x0E2-.google.cloud.networksecurity.v1.ThreatActionB\x03\xE0A\x02\"\xAC\x01\x0A\x0EThreatOverride\x12\x16\x0A\x09threat_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12>\x0A\x04type\x18\x02 \x01(\x0E2+.google.cloud.networksecurity.v1.ThreatTypeB\x03\xE0A\x03\x12B\x0A\x06action\x18\x03 \x01(\x0E2-.google.cloud.networksecurity.v1.ThreatActionB\x03\xE0A\x02\"\x99\x01\x0A\x11AntivirusOverride\x12@\x0A\x08protocol\x18\x01 \x01(\x0E2).google.cloud.networksecurity.v1.ProtocolB\x03\xE0A\x02\x12B\x0A\x06action\x18\x02 \x01(\x0E2-.google.cloud.networksecurity.v1.ThreatActionB\x03\xE0A\x02*d\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DINFORMATIONAL\x10\x01\x12\x07\x0A\x03LOW\x10\x02\x12\x0A\x0A\x06MEDIUM\x10\x03\x12\x08\x0A\x04HIGH\x10\x04\x12\x0C\x0A\x08CRITICAL\x10\x05*n\x0A\x0AThreatType\x12\x1B\x0A\x17THREAT_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07UNKNOWN\x10\x01\x12\x11\x0A\x0DVULNERABILITY\x10\x02\x12\x0D\x0A\x09ANTIVIRUS\x10\x03\x12\x0B\x0A\x07SPYWARE\x10\x04\x12\x07\x0A\x03DNS\x10\x05*a\x0A\x0CThreatAction\x12\x1D\x0A\x19THREAT_ACTION_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EDEFAULT_ACTION\x10\x04\x12\x09\x0A\x05ALLOW\x10\x01\x12\x09\x0A\x05ALERT\x10\x02\x12\x08\x0A\x04DENY\x10\x03*i\x0A\x08Protocol\x12\x18\x0A\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x08\x0A\x04SMTP\x10\x01\x12\x07\x0A\x03SMB\x10\x02\x12\x08\x0A\x04POP3\x10\x03\x12\x08\x0A\x04IMAP\x10\x04\x12\x09\x0A\x05HTTP2\x10\x05\x12\x08\x0A\x04HTTP\x10\x06\x12\x07\x0A\x03FTP\x10\x07B\x8A\x02\x0A#com.google.cloud.networksecurity.v1B)SecurityProfileGroupThreatPreventionProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupUrlfiltering.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupUrlfiltering.php new file mode 100644 index 000000000000..e8e7d28be213 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupUrlfiltering.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xD3\x05\x0AIgoogle/cloud/networksecurity/v1/security_profile_group_urlfiltering.proto\x12\x1Fgoogle.cloud.networksecurity.v1\"[\x0A\x13UrlFilteringProfile\x12D\x0A\x0Burl_filters\x18\x01 \x03(\x0B2*.google.cloud.networksecurity.v1.UrlFilterB\x03\xE0A\x01\"\xF6\x01\x0A\x09UrlFilter\x12\\\x0A\x10filtering_action\x18\x01 \x01(\x0E2=.google.cloud.networksecurity.v1.UrlFilter.UrlFilteringActionB\x03\xE0A\x02\x12\x11\x0A\x04urls\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x1A\x0A\x08priority\x18\x03 \x01(\x05B\x03\xE0A\x02H\x00\x88\x01\x01\"O\x0A\x12UrlFilteringAction\x12\$\x0A URL_FILTERING_ACTION_UNSPECIFIED\x10\x00\x12\x09\x0A\x05ALLOW\x10\x01\x12\x08\x0A\x04DENY\x10\x02B\x0B\x0A\x09_priorityB\x86\x02\x0A#com.google.cloud.networksecurity.v1B%SecurityProfileGroupUrlFilteringProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php new file mode 100644 index 000000000000..cac87937fa47 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\x84\x13\x0A7google/cloud/networksecurity/v1/server_tls_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A)google/cloud/networksecurity/v1/tls.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x87\x08\x0A\x0FServerTlsPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12L\x0A\x06labels\x18\x05 \x03(\x0B2<.google.cloud.networksecurity.v1.ServerTlsPolicy.LabelsEntry\x12\x12\x0A\x0Aallow_open\x18\x06 \x01(\x08\x12P\x0A\x12server_certificate\x18\x07 \x01(\x0B24.google.cloud.networksecurity.v1.CertificateProvider\x12P\x0A\x0Bmtls_policy\x18\x08 \x01(\x0B2;.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy\x1A\xA5\x03\x0A\x0AMTLSPolicy\x12p\x0A\x16client_validation_mode\x18\x02 \x01(\x0E2P.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode\x12K\x0A\x14client_validation_ca\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.ValidationCA\x12Z\x0A\x1Eclient_validation_trust_config\x18\x04 \x01(\x09B2\xFAA/\x0A-certificatemanager.googleapis.com/TrustConfig\"|\x0A\x14ClientValidationMode\x12&\x0A\"CLIENT_VALIDATION_MODE_UNSPECIFIED\x10\x00\x12(\x0A\$ALLOW_INVALID_OR_MISSING_CLIENT_CERT\x10\x01\x12\x12\x0A\x0EREJECT_INVALID\x10\x02\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x82\x01\xEAA\x7F\x0A.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\"\xA5\x01\x0A\x1CListServerTlsPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12#\x0A\x16return_partial_success\x18\x04 \x01(\x08B\x03\xE0A\x01\"\x9C\x01\x0A\x1DListServerTlsPoliciesResponse\x12M\x0A\x13server_tls_policies\x18\x01 \x03(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"a\x0A\x19GetServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicy\"\xDB\x01\x0A\x1CCreateServerTlsPolicyRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.networksecurity.googleapis.com/ServerTlsPolicy\x12!\x0A\x14server_tls_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12P\x0A\x11server_tls_policy\x18\x03 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"\xA6\x01\x0A\x1CUpdateServerTlsPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12P\x0A\x11server_tls_policy\x18\x02 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"d\x0A\x1CDeleteServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicyB\xF5\x01\x0A#com.google.cloud.networksecurity.v1B\x14ServerTlsPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php new file mode 100644 index 000000000000..d56a0cc953d0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xBD\x06\x0A)google/cloud/networksecurity/v1/tls.proto\x12\x1Fgoogle.cloud.networksecurity.v1\"'\x0A\x0CGrpcEndpoint\x12\x17\x0A\x0Atarget_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\"\xC5\x01\x0A\x0CValidationCA\x12F\x0A\x0Dgrpc_endpoint\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.GrpcEndpointH\x00\x12e\x0A\x1Dcertificate_provider_instance\x18\x03 \x01(\x0B2<.google.cloud.networksecurity.v1.CertificateProviderInstanceH\x00B\x06\x0A\x04type\";\x0A\x1BCertificateProviderInstance\x12\x1C\x0A\x0Fplugin_instance\x18\x01 \x01(\x09B\x03\xE0A\x02\"\xCC\x01\x0A\x13CertificateProvider\x12F\x0A\x0Dgrpc_endpoint\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.GrpcEndpointH\x00\x12e\x0A\x1Dcertificate_provider_instance\x18\x03 \x01(\x0B2<.google.cloud.networksecurity.v1.CertificateProviderInstanceH\x00B\x06\x0A\x04typeB\xE9\x01\x0A#com.google.cloud.networksecurity.v1B\x08TlsProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/TlsInspectionPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/TlsInspectionPolicy.php new file mode 100644 index 000000000000..f84e1de04e49 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/TlsInspectionPolicy.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xA9\x13\x0A;google/cloud/networksecurity/v1/tls_inspection_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC6\x07\x0A\x13TlsInspectionPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07ca_pool\x18\x05 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPool\x12K\x0A\x0Ctrust_config\x18\x06 \x01(\x09B5\xE0A\x01\xFAA/\x0A-certificatemanager.googleapis.com/TrustConfig\x12'\x0A\x15exclude_public_ca_set\x18\x07 \x01(\x08B\x03\xE0A\x01H\x00\x88\x01\x01\x12]\x0A\x0Fmin_tls_version\x18\x08 \x01(\x0E2?.google.cloud.networksecurity.v1.TlsInspectionPolicy.TlsVersionB\x03\xE0A\x01\x12^\x0A\x13tls_feature_profile\x18\x09 \x01(\x0E2<.google.cloud.networksecurity.v1.TlsInspectionPolicy.ProfileB\x03\xE0A\x01\x12 \x0A\x13custom_tls_features\x18\x0A \x03(\x09B\x03\xE0A\x01\"]\x0A\x0ATlsVersion\x12\x1B\x0A\x17TLS_VERSION_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07TLS_1_0\x10\x01\x12\x0B\x0A\x07TLS_1_1\x10\x02\x12\x0B\x0A\x07TLS_1_2\x10\x03\x12\x0B\x0A\x07TLS_1_3\x10\x04\"z\x0A\x07Profile\x12\x17\x0A\x13PROFILE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12PROFILE_COMPATIBLE\x10\x01\x12\x12\x0A\x0EPROFILE_MODERN\x10\x02\x12\x16\x0A\x12PROFILE_RESTRICTED\x10\x03\x12\x12\x0A\x0EPROFILE_CUSTOM\x10\x04:\x8F\x01\xEAA\x8B\x01\x0A2networksecurity.googleapis.com/TlsInspectionPolicy\x12Uprojects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}B\x18\x0A\x16_exclude_public_ca_set\"\xEF\x01\x0A CreateTlsInspectionPolicyRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x122networksecurity.googleapis.com/TlsInspectionPolicy\x12%\x0A\x18tls_inspection_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12X\x0A\x15tls_inspection_policy\x18\x03 \x01(\x0B24.google.cloud.networksecurity.v1.TlsInspectionPolicyB\x03\xE0A\x02\"\x84\x01\x0A ListTlsInspectionPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\xA8\x01\x0A!ListTlsInspectionPoliciesResponse\x12U\x0A\x17tls_inspection_policies\x18\x01 \x03(\x0B24.google.cloud.networksecurity.v1.TlsInspectionPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"i\x0A\x1DGetTlsInspectionPolicyRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/TlsInspectionPolicy\"{\x0A DeleteTlsInspectionPolicyRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/TlsInspectionPolicy\x12\x0D\x0A\x05force\x18\x02 \x01(\x08\"\xB2\x01\x0A UpdateTlsInspectionPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12X\x0A\x15tls_inspection_policy\x18\x02 \x01(\x0B24.google.cloud.networksecurity.v1.TlsInspectionPolicyB\x03\xE0A\x02B\xD8\x02\x0A#com.google.cloud.networksecurity.v1B\x18TlsInspectionPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/UrlList.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/UrlList.php new file mode 100644 index 000000000000..01598ceb8e29 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/UrlList.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xB5\x0B\x0A.google/cloud/networksecurity/v1/url_list.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xA1\x02\x0A\x07UrlList\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06values\x18\x05 \x03(\x09B\x03\xE0A\x02:h\xEAAe\x0A&networksecurity.googleapis.com/UrlList\x12;projects/{project}/locations/{location}/urlLists/{url_list}\"w\x0A\x13ListUrlListsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x81\x01\x0A\x14ListUrlListsResponse\x12;\x0A\x09url_lists\x18\x01 \x03(\x0B2(.google.cloud.networksecurity.v1.UrlList\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Q\x0A\x11GetUrlListRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&networksecurity.googleapis.com/UrlList\"\xB1\x01\x0A\x14CreateUrlListRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&networksecurity.googleapis.com/UrlList\x12\x18\x0A\x0Burl_list_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12?\x0A\x08url_list\x18\x03 \x01(\x0B2(.google.cloud.networksecurity.v1.UrlListB\x03\xE0A\x02\"\x8D\x01\x0A\x14UpdateUrlListRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12?\x0A\x08url_list\x18\x02 \x01(\x0B2(.google.cloud.networksecurity.v1.UrlListB\x03\xE0A\x02\"T\x0A\x14DeleteUrlListRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&networksecurity.googleapis.com/UrlListB\xED\x01\x0A#com.google.cloud.networksecurity.v1B\x0CUrlListProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php new file mode 100644 index 000000000000..9162ffb338c6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php @@ -0,0 +1,196 @@ +google.cloud.networksecurity.v1.AddAddressGroupItemsRequest + */ +class AddAddressGroupItemsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AddressGroup to add items to. Must be in the format + * `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $address_group = ''; + /** + * Required. List of items to add. + * + * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $items; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $addressGroup Required. A name of the AddressGroup to add items to. Must be in the format + * `projects|organization/*/locations/{location}/addressGroups/*`. Please see + * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. + * @param string[] $items Required. List of items to add. + * + * @return \Google\Cloud\NetworkSecurity\V1\AddAddressGroupItemsRequest + * + * @experimental + */ + public static function build(string $addressGroup, array $items): self + { + return (new self()) + ->setAddressGroup($addressGroup) + ->setItems($items); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address_group + * Required. A name of the AddressGroup to add items to. Must be in the format + * `projects|organization/{@*}locations/{location}/addressGroups/*`. + * @type string[] $items + * Required. List of items to add. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AddressGroup to add items to. Must be in the format + * `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAddressGroup() + { + return $this->address_group; + } + + /** + * Required. A name of the AddressGroup to add items to. Must be in the format + * `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAddressGroup($var) + { + GPBUtil::checkString($var, True); + $this->address_group = $var; + + return $this; + } + + /** + * Required. List of items to add. + * + * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Required. List of items to add. + * + * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->items = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php new file mode 100644 index 000000000000..a0e41db6b705 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php @@ -0,0 +1,402 @@ +google.cloud.networksecurity.v1.AddressGroup + */ +class AddressGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the AddressGroup resource. It matches pattern + * `projects/{@*}locations/{location}/addressGroups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the AddressGroup resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Optional. List of items. + * + * Generated from protobuf field repeated string items = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $items; + /** + * Required. Capacity of the Address Group + * + * Generated from protobuf field int32 capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity = 0; + /** + * Output only. Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Optional. List of supported purposes of the Address Group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup.Purpose purpose = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $purpose; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the AddressGroup resource. It matches pattern + * `projects/{@*}locations/{location}/addressGroups/`. + * @type string $description + * Optional. Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the AddressGroup resource. + * @type int $type + * Required. The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * @type string[] $items + * Optional. List of items. + * @type int $capacity + * Required. Capacity of the Address Group + * @type string $self_link + * Output only. Server-defined fully-qualified URL for this resource. + * @type int[] $purpose + * Optional. List of supported purposes of the Address Group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the AddressGroup resource. It matches pattern + * `projects/{@*}locations/{location}/addressGroups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the AddressGroup resource. It matches pattern + * `projects/{@*}locations/{location}/addressGroups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; + } + + /** + * Optional. Set of label tags associated with the AddressGroup resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the AddressGroup resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AddressGroup\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. List of items. + * + * Generated from protobuf field repeated string items = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Optional. List of items. + * + * Generated from protobuf field repeated string items = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->items = $arr; + + return $this; + } + + /** + * Required. Capacity of the Address Group + * + * Generated from protobuf field int32 capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCapacity() + { + return $this->capacity; + } + + /** + * Required. Capacity of the Address Group + * + * Generated from protobuf field int32 capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCapacity($var) + { + GPBUtil::checkInt32($var); + $this->capacity = $var; + + return $this; + } + + /** + * Output only. Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Optional. List of supported purposes of the Address Group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup.Purpose purpose = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getPurpose() + { + return $this->purpose; + } + + /** + * Optional. List of supported purposes of the Address Group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup.Purpose purpose = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int[] $var + * @return $this + */ + public function setPurpose($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetworkSecurity\V1\AddressGroup\Purpose::class); + $this->purpose = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php new file mode 100644 index 000000000000..b4339487a0a7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php @@ -0,0 +1,66 @@ +google.cloud.networksecurity.v1.AddressGroup.Purpose + */ +class Purpose +{ + /** + * Default value. Should never happen. + * + * Generated from protobuf enum PURPOSE_UNSPECIFIED = 0; + */ + const PURPOSE_UNSPECIFIED = 0; + /** + * Address Group is distributed to VMC, and is usable in Firewall Policies + * and other systems that rely on VMC. + * + * Generated from protobuf enum DEFAULT = 1; + */ + const PBDEFAULT = 1; + /** + * Address Group is usable in Cloud Armor. + * + * Generated from protobuf enum CLOUD_ARMOR = 2; + */ + const CLOUD_ARMOR = 2; + + private static $valueToName = [ + self::PURPOSE_UNSPECIFIED => 'PURPOSE_UNSPECIFIED', + self::PBDEFAULT => 'DEFAULT', + self::CLOUD_ARMOR => 'CLOUD_ARMOR', + ]; + + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php new file mode 100644 index 000000000000..4eb2c0feb80a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php @@ -0,0 +1,61 @@ +google.cloud.networksecurity.v1.AddressGroup.Type + */ +class Type +{ + /** + * Default value. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * IP v4 ranges. + * + * Generated from protobuf enum IPV4 = 1; + */ + const IPV4 = 1; + /** + * IP v6 ranges. + * + * Generated from protobuf enum IPV6 = 2; + */ + const IPV6 = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::IPV4 => 'IPV4', + self::IPV6 => 'IPV6', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AntivirusOverride.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AntivirusOverride.php new file mode 100644 index 000000000000..f408af747771 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AntivirusOverride.php @@ -0,0 +1,105 @@ +google.cloud.networksecurity.v1.AntivirusOverride + */ +class AntivirusOverride extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Protocol to match. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.Protocol protocol = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $protocol = 0; + /** + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $protocol + * Required. Protocol to match. + * @type int $action + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupThreatprevention::initOnce(); + parent::__construct($data); + } + + /** + * Required. Protocol to match. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.Protocol protocol = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Required. Protocol to match. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.Protocol protocol = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\Protocol::class); + $this->protocol = $var; + + return $this; + } + + /** + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\ThreatAction::class); + $this->action = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php new file mode 100644 index 000000000000..d0c6d5e204f1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php @@ -0,0 +1,322 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy + */ +class AuthorizationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = 0; + /** + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * @type string $description + * Optional. Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. + * @type int $action + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule[] $rules + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; + } + + /** + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule> + */ + public function getRules() + { + return $this->rules; + } + + /** + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule[] $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule::class); + $this->rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php new file mode 100644 index 000000000000..793ae8c9e428 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php @@ -0,0 +1,63 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Action + */ +class Action +{ + /** + * Default value. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Grant access. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * Deny access. + * Deny rules should be avoided unless they are used to provide a default + * "deny all" fallback. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php new file mode 100644 index 000000000000..d4ff5d81975c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php @@ -0,0 +1,129 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule + */ +class Rule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sources; + /** + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $destinations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source[] $sources + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination[] $destinations + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source> + */ + public function getSources() + { + return $this->sources; + } + + /** + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source[] $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source::class); + $this->sources = $arr; + + return $this; + } + + /** + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination> + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination[] $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination::class); + $this->destinations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php new file mode 100644 index 000000000000..f1cb65a10a06 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php @@ -0,0 +1,215 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination + */ +class Destination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * + * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $hosts; + /** + * Required. List of destination ports to match. At least one port should + * match. + * + * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $ports; + /** + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $methods; + /** + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $http_header_match = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $hosts + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * @type int[] $ports + * Required. List of destination ports to match. At least one port should + * match. + * @type string[] $methods + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $http_header_match + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * + * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getHosts() + { + return $this->hosts; + } + + /** + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * + * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setHosts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->hosts = $arr; + + return $this; + } + + /** + * Required. List of destination ports to match. At least one port should + * match. + * + * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getPorts() + { + return $this->ports; + } + + /** + * Required. List of destination ports to match. At least one port should + * match. + * + * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int[] $var + * @return $this + */ + public function setPorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->ports = $arr; + + return $this; + } + + /** + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getMethods() + { + return $this->methods; + } + + /** + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setMethods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->methods = $arr; + + return $this; + } + + /** + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch|null + */ + public function getHttpHeaderMatch() + { + return $this->http_header_match; + } + + public function hasHttpHeaderMatch() + { + return isset($this->http_header_match); + } + + public function clearHttpHeaderMatch() + { + unset($this->http_header_match); + } + + /** + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $var + * @return $this + */ + public function setHttpHeaderMatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch::class); + $this->http_header_match = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php new file mode 100644 index 000000000000..d2ec186a7ff1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php @@ -0,0 +1,139 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + */ +class HttpHeaderMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * + * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $header_name = ''; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $regex_match + * Required. The value of the header must match the regular expression + * specified in regexMatch. For regular expression grammar, + * please see: en.cppreference.com/w/cpp/regex/ecmascript + * For matching against a port specified in the HTTP + * request, use a headerMatch with headerName set to Host + * and a regular expression that satisfies the RFC2616 Host + * header's port specifier. + * @type string $header_name + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The value of the header must match the regular expression + * specified in regexMatch. For regular expression grammar, + * please see: en.cppreference.com/w/cpp/regex/ecmascript + * For matching against a port specified in the HTTP + * request, use a headerMatch with headerName set to Host + * and a regular expression that satisfies the RFC2616 Host + * header's port specifier. + * + * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegexMatch() + { + return $this->readOneof(2); + } + + public function hasRegexMatch() + { + return $this->hasOneof(2); + } + + /** + * Required. The value of the header must match the regular expression + * specified in regexMatch. For regular expression grammar, + * please see: en.cppreference.com/w/cpp/regex/ecmascript + * For matching against a port specified in the HTTP + * request, use a headerMatch with headerName set to Host + * and a regular expression that satisfies the RFC2616 Host + * header's port specifier. + * + * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegexMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * + * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHeaderName() + { + return $this->header_name; + } + + /** + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * + * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHeaderName($var) + { + GPBUtil::checkString($var, True); + $this->header_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php new file mode 100644 index 000000000000..5509049c7899 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php @@ -0,0 +1,137 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, + * "{@*}service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * + * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $principals; + /** + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. + * + * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ip_blocks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $principals + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, + * "{@*}service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * @type string[] $ip_blocks + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, + * "{@*}service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * + * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getPrincipals() + { + return $this->principals; + } + + /** + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, + * "{@*}service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * + * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setPrincipals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->principals = $arr; + + return $this; + } + + /** + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. + * + * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getIpBlocks() + { + return $this->ip_blocks; + } + + /** + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. + * + * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setIpBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ip_blocks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy.php new file mode 100644 index 000000000000..6b1cfb7f80c6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy.php @@ -0,0 +1,526 @@ +google.cloud.networksecurity.v1.AuthzPolicy + */ +class AuthzPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier. Name of the `AuthzPolicy` resource in the following + * format: + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Set of labels associated with the `AuthzPolicy` resource. + * The format must comply with [the following + * requirements](/compute/docs/labeling-resources#requirements). + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Specifies the set of resources to which this policy should be + * applied to. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target = null; + /** + * Optional. A list of authorization HTTP rules to match against the incoming + * request. A policy match occurs when at least one HTTP rule matches the + * request or when no HTTP rules are specified in the policy. + * At least one HTTP Rule is required for Allow or Deny Action. Limited + * to 5 rules. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $http_rules; + /** + * Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. + * When the action is `CUSTOM`, `customProvider` must be specified. + * When the action is `ALLOW`, only requests matching the policy will + * be allowed. + * When the action is `DENY`, only requests matching the policy will be + * denied. + * When a request arrives, the policies are evaluated in the following order: + * 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` + * policy is evaluated using the custom authorization providers and the + * request is denied if the provider rejects the request. + * 2. If there are any `DENY` policies that match the request, the request + * is denied. + * 3. If there are no `ALLOW` policies for the resource or if any of the + * `ALLOW` policies match the request, the request is allowed. + * 4. Else the request is denied by default if none of the configured + * AuthzPolicies with `ALLOW` action match the request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = 0; + /** + * Optional. Required if the action is `CUSTOM`. Allows delegating + * authorization decisions to Cloud IAP or to Service Extensions. One of + * `cloudIap` or `authzExtension` must be specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_provider = null; + /** + * Optional. Immutable. Defines the type of authorization being performed. + * If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed + * once AuthzPolicy is created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $policy_profile = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Identifier. Name of the `AuthzPolicy` resource in the following + * format: + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $description + * Optional. A human-readable description of the resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of labels associated with the `AuthzPolicy` resource. + * The format must comply with [the following + * requirements](/compute/docs/labeling-resources#requirements). + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\Target $target + * Required. Specifies the set of resources to which this policy should be + * applied to. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule[] $http_rules + * Optional. A list of authorization HTTP rules to match against the incoming + * request. A policy match occurs when at least one HTTP rule matches the + * request or when no HTTP rules are specified in the policy. + * At least one HTTP Rule is required for Allow or Deny Action. Limited + * to 5 rules. + * @type int $action + * Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. + * When the action is `CUSTOM`, `customProvider` must be specified. + * When the action is `ALLOW`, only requests matching the policy will + * be allowed. + * When the action is `DENY`, only requests matching the policy will be + * denied. + * When a request arrives, the policies are evaluated in the following order: + * 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` + * policy is evaluated using the custom authorization providers and the + * request is denied if the provider rejects the request. + * 2. If there are any `DENY` policies that match the request, the request + * is denied. + * 3. If there are no `ALLOW` policies for the resource or if any of the + * `ALLOW` policies match the request, the request is allowed. + * 4. Else the request is denied by default if none of the configured + * AuthzPolicies with `ALLOW` action match the request. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider $custom_provider + * Optional. Required if the action is `CUSTOM`. Allows delegating + * authorization decisions to Cloud IAP or to Service Extensions. One of + * `cloudIap` or `authzExtension` must be specified. + * @type int $policy_profile + * Optional. Immutable. Defines the type of authorization being performed. + * If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed + * once AuthzPolicy is created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier. Name of the `AuthzPolicy` resource in the following + * format: + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Identifier. Name of the `AuthzPolicy` resource in the following + * format: + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.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 timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. A human-readable description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Set of labels associated with the `AuthzPolicy` resource. + * The format must comply with [the following + * requirements](/compute/docs/labeling-resources#requirements). + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of labels associated with the `AuthzPolicy` resource. + * The format must comply with [the following + * requirements](/compute/docs/labeling-resources#requirements). + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Specifies the set of resources to which this policy should be + * applied to. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\Target|null + */ + public function getTarget() + { + return $this->target; + } + + public function hasTarget() + { + return isset($this->target); + } + + public function clearTarget() + { + unset($this->target); + } + + /** + * Required. Specifies the set of resources to which this policy should be + * applied to. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\Target $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\Target::class); + $this->target = $var; + + return $this; + } + + /** + * Optional. A list of authorization HTTP rules to match against the incoming + * request. A policy match occurs when at least one HTTP rule matches the + * request or when no HTTP rules are specified in the policy. + * At least one HTTP Rule is required for Allow or Deny Action. Limited + * to 5 rules. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule> + */ + public function getHttpRules() + { + return $this->http_rules; + } + + /** + * Optional. A list of authorization HTTP rules to match against the incoming + * request. A policy match occurs when at least one HTTP rule matches the + * request or when no HTTP rules are specified in the policy. + * At least one HTTP Rule is required for Allow or Deny Action. Limited + * to 5 rules. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule[] $var + * @return $this + */ + public function setHttpRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule::class); + $this->http_rules = $arr; + + return $this; + } + + /** + * Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. + * When the action is `CUSTOM`, `customProvider` must be specified. + * When the action is `ALLOW`, only requests matching the policy will + * be allowed. + * When the action is `DENY`, only requests matching the policy will be + * denied. + * When a request arrives, the policies are evaluated in the following order: + * 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` + * policy is evaluated using the custom authorization providers and the + * request is denied if the provider rejects the request. + * 2. If there are any `DENY` policies that match the request, the request + * is denied. + * 3. If there are no `ALLOW` policies for the resource or if any of the + * `ALLOW` policies match the request, the request is allowed. + * 4. Else the request is denied by default if none of the configured + * AuthzPolicies with `ALLOW` action match the request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. + * When the action is `CUSTOM`, `customProvider` must be specified. + * When the action is `ALLOW`, only requests matching the policy will + * be allowed. + * When the action is `DENY`, only requests matching the policy will be + * denied. + * When a request arrives, the policies are evaluated in the following order: + * 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` + * policy is evaluated using the custom authorization providers and the + * request is denied if the provider rejects the request. + * 2. If there are any `DENY` policies that match the request, the request + * is denied. + * 3. If there are no `ALLOW` policies for the resource or if any of the + * `ALLOW` policies match the request, the request is allowed. + * 4. Else the request is denied by default if none of the configured + * AuthzPolicies with `ALLOW` action match the request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzAction::class); + $this->action = $var; + + return $this; + } + + /** + * Optional. Required if the action is `CUSTOM`. Allows delegating + * authorization decisions to Cloud IAP or to Service Extensions. One of + * `cloudIap` or `authzExtension` must be specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider|null + */ + public function getCustomProvider() + { + return $this->custom_provider; + } + + public function hasCustomProvider() + { + return isset($this->custom_provider); + } + + public function clearCustomProvider() + { + unset($this->custom_provider); + } + + /** + * Optional. Required if the action is `CUSTOM`. Allows delegating + * authorization decisions to Cloud IAP or to Service Extensions. One of + * `cloudIap` or `authzExtension` must be specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider $var + * @return $this + */ + public function setCustomProvider($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider::class); + $this->custom_provider = $var; + + return $this; + } + + /** + * Optional. Immutable. Defines the type of authorization being performed. + * If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed + * once AuthzPolicy is created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getPolicyProfile() + { + return $this->policy_profile; + } + + /** + * Optional. Immutable. Defines the type of authorization being performed. + * If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed + * once AuthzPolicy is created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setPolicyProfile($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\PolicyProfile::class); + $this->policy_profile = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzAction.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzAction.php new file mode 100644 index 000000000000..44ce3b27290a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzAction.php @@ -0,0 +1,69 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction + */ +class AuthzAction +{ + /** + * Unspecified action. + * + * Generated from protobuf enum AUTHZ_ACTION_UNSPECIFIED = 0; + */ + const AUTHZ_ACTION_UNSPECIFIED = 0; + /** + * Allow request to pass through to the backend. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * Deny the request and return a HTTP 404 to the client. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + /** + * Delegate the authorization decision to an external authorization engine. + * + * Generated from protobuf enum CUSTOM = 3; + */ + const CUSTOM = 3; + + private static $valueToName = [ + self::AUTHZ_ACTION_UNSPECIFIED => 'AUTHZ_ACTION_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + self::CUSTOM => 'CUSTOM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule.php new file mode 100644 index 000000000000..11d830867085 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule.php @@ -0,0 +1,167 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule + */ +class AuthzRule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Describes properties of a source of a request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From from = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $from = null; + /** + * Optional. Describes properties of a target of a request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To to = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $to = null; + /** + * Optional. CEL expression that describes the conditions to be satisfied + * for the action. The result of the CEL expression is ANDed with the from + * and to. Refer to the CEL language reference for a list of available + * attributes. + * + * Generated from protobuf field string when = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $when = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From $from + * Optional. Describes properties of a source of a request. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To $to + * Optional. Describes properties of a target of a request. + * @type string $when + * Optional. CEL expression that describes the conditions to be satisfied + * for the action. The result of the CEL expression is ANDed with the from + * and to. Refer to the CEL language reference for a list of available + * attributes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Describes properties of a source of a request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From from = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From|null + */ + public function getFrom() + { + return $this->from; + } + + public function hasFrom() + { + return isset($this->from); + } + + public function clearFrom() + { + unset($this->from); + } + + /** + * Optional. Describes properties of a source of a request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From from = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From $var + * @return $this + */ + public function setFrom($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From::class); + $this->from = $var; + + return $this; + } + + /** + * Optional. Describes properties of a target of a request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To to = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To|null + */ + public function getTo() + { + return $this->to; + } + + public function hasTo() + { + return isset($this->to); + } + + public function clearTo() + { + unset($this->to); + } + + /** + * Optional. Describes properties of a target of a request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To to = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To $var + * @return $this + */ + public function setTo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To::class); + $this->to = $var; + + return $this; + } + + /** + * Optional. CEL expression that describes the conditions to be satisfied + * for the action. The result of the CEL expression is ANDed with the from + * and to. Refer to the CEL language reference for a list of available + * attributes. + * + * Generated from protobuf field string when = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWhen() + { + return $this->when; + } + + /** + * Optional. CEL expression that describes the conditions to be satisfied + * for the action. The result of the CEL expression is ANDed with the from + * and to. Refer to the CEL language reference for a list of available + * attributes. + * + * Generated from protobuf field string when = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWhen($var) + { + GPBUtil::checkString($var, True); + $this->when = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From.php new file mode 100644 index 000000000000..76b0c12b5d6a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From.php @@ -0,0 +1,129 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From + */ +class From extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Describes the properties of a request's sources. At least one + * of sources or notSources must be specified. Limited to 1 source. + * A match occurs when ANY source (in sources or notSources) matches the + * request. Within a single source, the match follows AND semantics + * across fields and OR semantics within a single field, i.e. a match + * occurs when ANY principal matches AND ANY ipBlocks match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSource sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sources; + /** + * Optional. Describes the negated properties of request sources. Matches + * requests from sources that do not match the criteria specified in this + * field. At least one of sources or notSources must be specified. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSource not_sources = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $not_sources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource[] $sources + * Optional. Describes the properties of a request's sources. At least one + * of sources or notSources must be specified. Limited to 1 source. + * A match occurs when ANY source (in sources or notSources) matches the + * request. Within a single source, the match follows AND semantics + * across fields and OR semantics within a single field, i.e. a match + * occurs when ANY principal matches AND ANY ipBlocks match. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource[] $not_sources + * Optional. Describes the negated properties of request sources. Matches + * requests from sources that do not match the criteria specified in this + * field. At least one of sources or notSources must be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Describes the properties of a request's sources. At least one + * of sources or notSources must be specified. Limited to 1 source. + * A match occurs when ANY source (in sources or notSources) matches the + * request. Within a single source, the match follows AND semantics + * across fields and OR semantics within a single field, i.e. a match + * occurs when ANY principal matches AND ANY ipBlocks match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSource sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource> + */ + public function getSources() + { + return $this->sources; + } + + /** + * Optional. Describes the properties of a request's sources. At least one + * of sources or notSources must be specified. Limited to 1 source. + * A match occurs when ANY source (in sources or notSources) matches the + * request. Within a single source, the match follows AND semantics + * across fields and OR semantics within a single field, i.e. a match + * occurs when ANY principal matches AND ANY ipBlocks match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSource sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource[] $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource::class); + $this->sources = $arr; + + return $this; + } + + /** + * Optional. Describes the negated properties of request sources. Matches + * requests from sources that do not match the criteria specified in this + * field. At least one of sources or notSources must be specified. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSource not_sources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource> + */ + public function getNotSources() + { + return $this->not_sources; + } + + /** + * Optional. Describes the negated properties of request sources. Matches + * requests from sources that do not match the criteria specified in this + * field. At least one of sources or notSources must be specified. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSource not_sources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource[] $var + * @return $this + */ + public function setNotSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\From\RequestSource::class); + $this->not_sources = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From/RequestSource.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From/RequestSource.php new file mode 100644 index 000000000000..d5419475cfcc --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From/RequestSource.php @@ -0,0 +1,195 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From.RequestSource + */ +class RequestSource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of identities derived from the client's certificate. + * This field will not match on a request unless frontend mutual TLS is + * enabled for the forwarding rule or Gateway and the client certificate + * has been successfully validated by mTLS. + * Each identity is a string whose value is matched against a list of + * URI SANs, DNS Name SANs, or the common name in the client's + * certificate. A match happens when any principal matches with the + * rule. Limited to 50 principals per Authorization Policy for regional + * internal Application Load Balancers, regional external Application + * Load Balancers, cross-region internal Application Load Balancers, and + * Cloud Service Mesh. This field is not supported for global external + * Application Load Balancers. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $principals; + /** + * Optional. A list of IP addresses or IP address ranges to match + * against the source IP address of the request. Limited to 10 ip_blocks + * per Authorization Policy + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.IpBlock ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ip_blocks; + /** + * Optional. A list of resources to match against the resource of the + * source VM of a request. Limited to 10 resources per Authorization + * Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $resources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\Principal[] $principals + * Optional. A list of identities derived from the client's certificate. + * This field will not match on a request unless frontend mutual TLS is + * enabled for the forwarding rule or Gateway and the client certificate + * has been successfully validated by mTLS. + * Each identity is a string whose value is matched against a list of + * URI SANs, DNS Name SANs, or the common name in the client's + * certificate. A match happens when any principal matches with the + * rule. Limited to 50 principals per Authorization Policy for regional + * internal Application Load Balancers, regional external Application + * Load Balancers, cross-region internal Application Load Balancers, and + * Cloud Service Mesh. This field is not supported for global external + * Application Load Balancers. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\IpBlock[] $ip_blocks + * Optional. A list of IP addresses or IP address ranges to match + * against the source IP address of the request. Limited to 10 ip_blocks + * per Authorization Policy + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource[] $resources + * Optional. A list of resources to match against the resource of the + * source VM of a request. Limited to 10 resources per Authorization + * Policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of identities derived from the client's certificate. + * This field will not match on a request unless frontend mutual TLS is + * enabled for the forwarding rule or Gateway and the client certificate + * has been successfully validated by mTLS. + * Each identity is a string whose value is matched against a list of + * URI SANs, DNS Name SANs, or the common name in the client's + * certificate. A match happens when any principal matches with the + * rule. Limited to 50 principals per Authorization Policy for regional + * internal Application Load Balancers, regional external Application + * Load Balancers, cross-region internal Application Load Balancers, and + * Cloud Service Mesh. This field is not supported for global external + * Application Load Balancers. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\Principal> + */ + public function getPrincipals() + { + return $this->principals; + } + + /** + * Optional. A list of identities derived from the client's certificate. + * This field will not match on a request unless frontend mutual TLS is + * enabled for the forwarding rule or Gateway and the client certificate + * has been successfully validated by mTLS. + * Each identity is a string whose value is matched against a list of + * URI SANs, DNS Name SANs, or the common name in the client's + * certificate. A match happens when any principal matches with the + * rule. Limited to 50 principals per Authorization Policy for regional + * internal Application Load Balancers, regional external Application + * Load Balancers, cross-region internal Application Load Balancers, and + * Cloud Service Mesh. This field is not supported for global external + * Application Load Balancers. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\Principal[] $var + * @return $this + */ + public function setPrincipals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\Principal::class); + $this->principals = $arr; + + return $this; + } + + /** + * Optional. A list of IP addresses or IP address ranges to match + * against the source IP address of the request. Limited to 10 ip_blocks + * per Authorization Policy + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.IpBlock ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\IpBlock> + */ + public function getIpBlocks() + { + return $this->ip_blocks; + } + + /** + * Optional. A list of IP addresses or IP address ranges to match + * against the source IP address of the request. Limited to 10 ip_blocks + * per Authorization Policy + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.IpBlock ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\IpBlock[] $var + * @return $this + */ + public function setIpBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\IpBlock::class); + $this->ip_blocks = $arr; + + return $this; + } + + /** + * Optional. A list of resources to match against the resource of the + * source VM of a request. Limited to 10 resources per Authorization + * Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource> + */ + public function getResources() + { + return $this->resources; + } + + /** + * Optional. A list of resources to match against the resource of the + * source VM of a request. Limited to 10 resources per Authorization + * Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource[] $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource::class); + $this->resources = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/HeaderMatch.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/HeaderMatch.php new file mode 100644 index 000000000000..e299fe2504a4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/HeaderMatch.php @@ -0,0 +1,111 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.HeaderMatch + */ +class HeaderMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies the name of the header in the request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. Specifies how the header match will be performed. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Specifies the name of the header in the request. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch $value + * Optional. Specifies how the header match will be performed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Specifies the name of the header in the request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Specifies the name of the header in the request. + * + * 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. Specifies how the header match will be performed. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Optional. Specifies how the header match will be performed. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/IpBlock.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/IpBlock.php new file mode 100644 index 000000000000..80f712a67edc --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/IpBlock.php @@ -0,0 +1,101 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.IpBlock + */ +class IpBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The address prefix. + * + * Generated from protobuf field string prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prefix = ''; + /** + * Required. The length of the address range. + * + * Generated from protobuf field int32 length = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $length = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prefix + * Required. The address prefix. + * @type int $length + * Required. The length of the address range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The address prefix. + * + * Generated from protobuf field string prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Required. The address prefix. + * + * Generated from protobuf field string prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Required. The length of the address range. + * + * Generated from protobuf field int32 length = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Required. The length of the address range. + * + * Generated from protobuf field int32 length = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt32($var); + $this->length = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal.php new file mode 100644 index 000000000000..38ed62b62c5c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal.php @@ -0,0 +1,131 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal + */ +class Principal extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. An enum to decide what principal value the principal rule + * will match against. If not specified, the PrincipalSelector is + * CLIENT_CERT_URI_SAN. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal.PrincipalSelector principal_selector = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $principal_selector = 0; + /** + * Required. A non-empty string whose value is matched against the + * principal value based on the principal_selector. Only exact match can + * be applied for CLIENT_CERT_URI_SAN, CLIENT_CERT_DNS_NAME_SAN, + * CLIENT_CERT_COMMON_NAME selectors. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch principal = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $principal = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $principal_selector + * Optional. An enum to decide what principal value the principal rule + * will match against. If not specified, the PrincipalSelector is + * CLIENT_CERT_URI_SAN. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch $principal + * Required. A non-empty string whose value is matched against the + * principal value based on the principal_selector. Only exact match can + * be applied for CLIENT_CERT_URI_SAN, CLIENT_CERT_DNS_NAME_SAN, + * CLIENT_CERT_COMMON_NAME selectors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. An enum to decide what principal value the principal rule + * will match against. If not specified, the PrincipalSelector is + * CLIENT_CERT_URI_SAN. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal.PrincipalSelector principal_selector = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPrincipalSelector() + { + return $this->principal_selector; + } + + /** + * Optional. An enum to decide what principal value the principal rule + * will match against. If not specified, the PrincipalSelector is + * CLIENT_CERT_URI_SAN. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal.PrincipalSelector principal_selector = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPrincipalSelector($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\Principal\PrincipalSelector::class); + $this->principal_selector = $var; + + return $this; + } + + /** + * Required. A non-empty string whose value is matched against the + * principal value based on the principal_selector. Only exact match can + * be applied for CLIENT_CERT_URI_SAN, CLIENT_CERT_DNS_NAME_SAN, + * CLIENT_CERT_COMMON_NAME selectors. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch principal = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch|null + */ + public function getPrincipal() + { + return $this->principal; + } + + public function hasPrincipal() + { + return isset($this->principal); + } + + public function clearPrincipal() + { + unset($this->principal); + } + + /** + * Required. A non-empty string whose value is matched against the + * principal value based on the principal_selector. Only exact match can + * be applied for CLIENT_CERT_URI_SAN, CLIENT_CERT_DNS_NAME_SAN, + * CLIENT_CERT_COMMON_NAME selectors. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch principal = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch::class); + $this->principal = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php new file mode 100644 index 000000000000..cb6b8de6d457 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php @@ -0,0 +1,87 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.Principal.PrincipalSelector + */ +class PrincipalSelector +{ + /** + * Unspecified principal selector. It will be treated as + * CLIENT_CERT_URI_SAN by default. + * + * Generated from protobuf enum PRINCIPAL_SELECTOR_UNSPECIFIED = 0; + */ + const PRINCIPAL_SELECTOR_UNSPECIFIED = 0; + /** + * The principal rule is matched against a list of URI SANs in the + * validated client's certificate. A match happens when there is any + * exact URI SAN value match. This is the default principal selector. + * + * Generated from protobuf enum CLIENT_CERT_URI_SAN = 1; + */ + const CLIENT_CERT_URI_SAN = 1; + /** + * The principal rule is matched against a list of DNS Name SANs in the + * validated client's certificate. A match happens when there is any + * exact DNS Name SAN value match. + * This is only applicable for Application Load Balancers + * except for classic Global External Application load balancer. + * CLIENT_CERT_DNS_NAME_SAN is not supported for INTERNAL_SELF_MANAGED + * load balancing scheme. + * + * Generated from protobuf enum CLIENT_CERT_DNS_NAME_SAN = 2; + */ + const CLIENT_CERT_DNS_NAME_SAN = 2; + /** + * The principal rule is matched against the common name in the client's + * certificate. Authorization against multiple common names in the + * client certificate is not supported. Requests with multiple common + * names in the client certificate will be rejected if + * CLIENT_CERT_COMMON_NAME is set as the principal selector. A match + * happens when there is an exact common name value match. + * This is only applicable for Application Load Balancers + * except for global external Application Load Balancer and + * classic Application Load Balancer. + * CLIENT_CERT_COMMON_NAME is not supported for INTERNAL_SELF_MANAGED + * load balancing scheme. + * + * Generated from protobuf enum CLIENT_CERT_COMMON_NAME = 3; + */ + const CLIENT_CERT_COMMON_NAME = 3; + + private static $valueToName = [ + self::PRINCIPAL_SELECTOR_UNSPECIFIED => 'PRINCIPAL_SELECTOR_UNSPECIFIED', + self::CLIENT_CERT_URI_SAN => 'CLIENT_CERT_URI_SAN', + self::CLIENT_CERT_DNS_NAME_SAN => 'CLIENT_CERT_DNS_NAME_SAN', + self::CLIENT_CERT_COMMON_NAME => 'CLIENT_CERT_COMMON_NAME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource.php new file mode 100644 index 000000000000..3c1b6d81dcf3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource.php @@ -0,0 +1,134 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource + */ +class RequestResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource.TagValueIdSet tag_value_id_set = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tag_value_id_set = null; + /** + * Optional. An IAM service account to match against the source + * service account of the VM sending the request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch iam_service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $iam_service_account = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource\TagValueIdSet $tag_value_id_set + * Optional. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch $iam_service_account + * Optional. An IAM service account to match against the source + * service account of the VM sending the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource.TagValueIdSet tag_value_id_set = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource\TagValueIdSet|null + */ + public function getTagValueIdSet() + { + return $this->tag_value_id_set; + } + + public function hasTagValueIdSet() + { + return isset($this->tag_value_id_set); + } + + public function clearTagValueIdSet() + { + unset($this->tag_value_id_set); + } + + /** + * Optional. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource.TagValueIdSet tag_value_id_set = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource\TagValueIdSet $var + * @return $this + */ + public function setTagValueIdSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\RequestResource\TagValueIdSet::class); + $this->tag_value_id_set = $var; + + return $this; + } + + /** + * Optional. An IAM service account to match against the source + * service account of the VM sending the request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch iam_service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch|null + */ + public function getIamServiceAccount() + { + return $this->iam_service_account; + } + + public function hasIamServiceAccount() + { + return isset($this->iam_service_account); + } + + public function clearIamServiceAccount() + { + unset($this->iam_service_account); + } + + /** + * Optional. An IAM service account to match against the source + * service account of the VM sending the request. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch iam_service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch $var + * @return $this + */ + public function setIamServiceAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch::class); + $this->iam_service_account = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php new file mode 100644 index 000000000000..0bcb5221f3f9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php @@ -0,0 +1,81 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.RequestResource.TagValueIdSet + */ +class TagValueIdSet extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. The match follows AND semantics which means all + * the ids must match. Limited to 5 ids in the Tag value id set. + * + * Generated from protobuf field repeated int64 ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int[]|string[] $ids + * Required. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. The match follows AND semantics which means all + * the ids must match. Limited to 5 ids in the Tag value id set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. The match follows AND semantics which means all + * the ids must match. Limited to 5 ids in the Tag value id set. + * + * Generated from protobuf field repeated int64 ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField|RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Required. A list of resource tag value permanent IDs to match against + * the resource manager tags value associated with the source VM of a + * request. The match follows AND semantics which means all + * the ids must match. Limited to 5 ids in the Tag value id set. + * + * Generated from protobuf field repeated int64 ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int[]|string[] $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/StringMatch.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/StringMatch.php new file mode 100644 index 000000000000..1e188d5bd024 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/StringMatch.php @@ -0,0 +1,249 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch + */ +class StringMatch extends \Google\Protobuf\Internal\Message +{ + /** + * If true, indicates the exact/prefix/suffix/contains matching should be + * case insensitive. For example, the matcher ``data`` will match both + * input string ``Data`` and ``data`` if set to true. + * + * Generated from protobuf field bool ignore_case = 5; + */ + protected $ignore_case = false; + protected $match_pattern; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $exact + * The input string must match exactly the string specified here. + * Examples: + * * ``abc`` only matches the value ``abc``. + * @type string $prefix + * The input string must have the prefix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``abc.xyz`` + * @type string $suffix + * The input string must have the suffix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``xyz.abc`` + * @type string $contains + * The input string must have the substring specified here. + * Note: empty contains match is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``xyz.abc.def`` + * @type bool $ignore_case + * If true, indicates the exact/prefix/suffix/contains matching should be + * case insensitive. For example, the matcher ``data`` will match both + * input string ``Data`` and ``data`` if set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * The input string must match exactly the string specified here. + * Examples: + * * ``abc`` only matches the value ``abc``. + * + * Generated from protobuf field string exact = 1; + * @return string + */ + public function getExact() + { + return $this->readOneof(1); + } + + public function hasExact() + { + return $this->hasOneof(1); + } + + /** + * The input string must match exactly the string specified here. + * Examples: + * * ``abc`` only matches the value ``abc``. + * + * Generated from protobuf field string exact = 1; + * @param string $var + * @return $this + */ + public function setExact($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The input string must have the prefix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``abc.xyz`` + * + * Generated from protobuf field string prefix = 2; + * @return string + */ + public function getPrefix() + { + return $this->readOneof(2); + } + + public function hasPrefix() + { + return $this->hasOneof(2); + } + + /** + * The input string must have the prefix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``abc.xyz`` + * + * Generated from protobuf field string prefix = 2; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The input string must have the suffix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``xyz.abc`` + * + * Generated from protobuf field string suffix = 3; + * @return string + */ + public function getSuffix() + { + return $this->readOneof(3); + } + + public function hasSuffix() + { + return $this->hasOneof(3); + } + + /** + * The input string must have the suffix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``xyz.abc`` + * + * Generated from protobuf field string suffix = 3; + * @param string $var + * @return $this + */ + public function setSuffix($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The input string must have the substring specified here. + * Note: empty contains match is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``xyz.abc.def`` + * + * Generated from protobuf field string contains = 4; + * @return string + */ + public function getContains() + { + return $this->readOneof(4); + } + + public function hasContains() + { + return $this->hasOneof(4); + } + + /** + * The input string must have the substring specified here. + * Note: empty contains match is not allowed, please use regex instead. + * Examples: + * * ``abc`` matches the value ``xyz.abc.def`` + * + * Generated from protobuf field string contains = 4; + * @param string $var + * @return $this + */ + public function setContains($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * If true, indicates the exact/prefix/suffix/contains matching should be + * case insensitive. For example, the matcher ``data`` will match both + * input string ``Data`` and ``data`` if set to true. + * + * Generated from protobuf field bool ignore_case = 5; + * @return bool + */ + public function getIgnoreCase() + { + return $this->ignore_case; + } + + /** + * If true, indicates the exact/prefix/suffix/contains matching should be + * case insensitive. For example, the matcher ``data`` will match both + * input string ``Data`` and ``data`` if set to true. + * + * Generated from protobuf field bool ignore_case = 5; + * @param bool $var + * @return $this + */ + public function setIgnoreCase($var) + { + GPBUtil::checkBool($var); + $this->ignore_case = $var; + + return $this; + } + + /** + * @return string + */ + public function getMatchPattern() + { + return $this->whichOneof("match_pattern"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To.php new file mode 100644 index 000000000000..a7a2a17c9a3d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To.php @@ -0,0 +1,137 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To + */ +class To extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Describes properties of one or more targets of a request. At + * least one of operations or notOperations must be specified. Limited to + * 1 operation. A match occurs when ANY operation (in operations or + * notOperations) matches. Within an operation, the match follows AND + * semantics across fields and OR semantics within a field, i.e. a match + * occurs when ANY path matches AND ANY header matches and ANY method + * matches. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation operations = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $operations; + /** + * Optional. Describes the negated properties of the targets of a request. + * Matches requests for operations that do not match the criteria + * specified in this field. At least one of operations or notOperations + * must be specified. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation not_operations = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $not_operations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation[] $operations + * Optional. Describes properties of one or more targets of a request. At + * least one of operations or notOperations must be specified. Limited to + * 1 operation. A match occurs when ANY operation (in operations or + * notOperations) matches. Within an operation, the match follows AND + * semantics across fields and OR semantics within a field, i.e. a match + * occurs when ANY path matches AND ANY header matches and ANY method + * matches. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation[] $not_operations + * Optional. Describes the negated properties of the targets of a request. + * Matches requests for operations that do not match the criteria + * specified in this field. At least one of operations or notOperations + * must be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Describes properties of one or more targets of a request. At + * least one of operations or notOperations must be specified. Limited to + * 1 operation. A match occurs when ANY operation (in operations or + * notOperations) matches. Within an operation, the match follows AND + * semantics across fields and OR semantics within a field, i.e. a match + * occurs when ANY path matches AND ANY header matches and ANY method + * matches. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation operations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation> + */ + public function getOperations() + { + return $this->operations; + } + + /** + * Optional. Describes properties of one or more targets of a request. At + * least one of operations or notOperations must be specified. Limited to + * 1 operation. A match occurs when ANY operation (in operations or + * notOperations) matches. Within an operation, the match follows AND + * semantics across fields and OR semantics within a field, i.e. a match + * occurs when ANY path matches AND ANY header matches and ANY method + * matches. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation operations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation[] $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation::class); + $this->operations = $arr; + + return $this; + } + + /** + * Optional. Describes the negated properties of the targets of a request. + * Matches requests for operations that do not match the criteria + * specified in this field. At least one of operations or notOperations + * must be specified. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation not_operations = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation> + */ + public function getNotOperations() + { + return $this->not_operations; + } + + /** + * Optional. Describes the negated properties of the targets of a request. + * Matches requests for operations that do not match the criteria + * specified in this field. At least one of operations or notOperations + * must be specified. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation not_operations = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation[] $var + * @return $this + */ + public function setNotOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation::class); + $this->not_operations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php new file mode 100644 index 000000000000..620d529b7ac4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php @@ -0,0 +1,283 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation + */ +class RequestOperation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of headers to match against in http header. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSet header_set = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header_set = null; + /** + * Optional. A list of HTTP Hosts to match against. The match can be one + * of exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * hosts per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch hosts = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $hosts; + /** + * Optional. A list of paths to match against. The match can be one of + * exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * paths per Authorization Policy. + * Note that this path match includes the query parameters. For gRPC + * services, this should be a fully-qualified name of the form + * /package.service/method. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch paths = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $paths; + /** + * Optional. A list of HTTP methods to match against. Each entry must be + * a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, + * OPTIONS). It only allows exact match and is always case sensitive. + * Limited to 10 methods per Authorization Policy. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $methods; + /** + * Optional. Defines the MCP protocol attributes to match on. If the MCP + * payload in the request body cannot be successfully parsed, the + * request will be denied. This field can be set only for AuthzPolicies + * targeting AgentGateway resources. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCP mcp = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mcp = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\HeaderSet $header_set + * Optional. A list of headers to match against in http header. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch[] $hosts + * Optional. A list of HTTP Hosts to match against. The match can be one + * of exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * hosts per Authorization Policy. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch[] $paths + * Optional. A list of paths to match against. The match can be one of + * exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * paths per Authorization Policy. + * Note that this path match includes the query parameters. For gRPC + * services, this should be a fully-qualified name of the form + * /package.service/method. + * @type string[] $methods + * Optional. A list of HTTP methods to match against. Each entry must be + * a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, + * OPTIONS). It only allows exact match and is always case sensitive. + * Limited to 10 methods per Authorization Policy. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCP $mcp + * Optional. Defines the MCP protocol attributes to match on. If the MCP + * payload in the request body cannot be successfully parsed, the + * request will be denied. This field can be set only for AuthzPolicies + * targeting AgentGateway resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of headers to match against in http header. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSet header_set = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\HeaderSet|null + */ + public function getHeaderSet() + { + return $this->header_set; + } + + public function hasHeaderSet() + { + return isset($this->header_set); + } + + public function clearHeaderSet() + { + unset($this->header_set); + } + + /** + * Optional. A list of headers to match against in http header. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSet header_set = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\HeaderSet $var + * @return $this + */ + public function setHeaderSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\HeaderSet::class); + $this->header_set = $var; + + return $this; + } + + /** + * Optional. A list of HTTP Hosts to match against. The match can be one + * of exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * hosts per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch hosts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch> + */ + public function getHosts() + { + return $this->hosts; + } + + /** + * Optional. A list of HTTP Hosts to match against. The match can be one + * of exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * hosts per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch hosts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch[] $var + * @return $this + */ + public function setHosts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch::class); + $this->hosts = $arr; + + return $this; + } + + /** + * Optional. A list of paths to match against. The match can be one of + * exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * paths per Authorization Policy. + * Note that this path match includes the query parameters. For gRPC + * services, this should be a fully-qualified name of the form + * /package.service/method. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch paths = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch> + */ + public function getPaths() + { + return $this->paths; + } + + /** + * Optional. A list of paths to match against. The match can be one of + * exact, prefix, suffix, or contains (substring match). Matches are + * always case sensitive unless the ignoreCase is set. Limited to 10 + * paths per Authorization Policy. + * Note that this path match includes the query parameters. For gRPC + * services, this should be a fully-qualified name of the form + * /package.service/method. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch paths = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch[] $var + * @return $this + */ + public function setPaths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch::class); + $this->paths = $arr; + + return $this; + } + + /** + * Optional. A list of HTTP methods to match against. Each entry must be + * a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, + * OPTIONS). It only allows exact match and is always case sensitive. + * Limited to 10 methods per Authorization Policy. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getMethods() + { + return $this->methods; + } + + /** + * Optional. A list of HTTP methods to match against. Each entry must be + * a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, + * OPTIONS). It only allows exact match and is always case sensitive. + * Limited to 10 methods per Authorization Policy. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setMethods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->methods = $arr; + + return $this; + } + + /** + * Optional. Defines the MCP protocol attributes to match on. If the MCP + * payload in the request body cannot be successfully parsed, the + * request will be denied. This field can be set only for AuthzPolicies + * targeting AgentGateway resources. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCP mcp = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCP|null + */ + public function getMcp() + { + return $this->mcp; + } + + public function hasMcp() + { + return isset($this->mcp); + } + + public function clearMcp() + { + unset($this->mcp); + } + + /** + * Optional. Defines the MCP protocol attributes to match on. If the MCP + * payload in the request body cannot be successfully parsed, the + * request will be denied. This field can be set only for AuthzPolicies + * targeting AgentGateway resources. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCP mcp = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCP $var + * @return $this + */ + public function setMcp($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCP::class); + $this->mcp = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php new file mode 100644 index 000000000000..c29dd412b146 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php @@ -0,0 +1,61 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.BaseProtocolMethodsOption + */ +class BaseProtocolMethodsOption +{ + /** + * Unspecified option. Defaults to SKIP_BASE_PROTOCOL_METHODS. + * + * Generated from protobuf enum BASE_PROTOCOL_METHODS_OPTION_UNSPECIFIED = 0; + */ + const BASE_PROTOCOL_METHODS_OPTION_UNSPECIFIED = 0; + /** + * Skip matching on the base MCP protocol methods. + * + * Generated from protobuf enum SKIP_BASE_PROTOCOL_METHODS = 1; + */ + const SKIP_BASE_PROTOCOL_METHODS = 1; + /** + * Match on the base MCP protocol methods. + * + * Generated from protobuf enum MATCH_BASE_PROTOCOL_METHODS = 2; + */ + const MATCH_BASE_PROTOCOL_METHODS = 2; + + private static $valueToName = [ + self::BASE_PROTOCOL_METHODS_OPTION_UNSPECIFIED => 'BASE_PROTOCOL_METHODS_OPTION_UNSPECIFIED', + self::SKIP_BASE_PROTOCOL_METHODS => 'SKIP_BASE_PROTOCOL_METHODS', + self::MATCH_BASE_PROTOCOL_METHODS => 'MATCH_BASE_PROTOCOL_METHODS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php new file mode 100644 index 000000000000..a34c83e6f57f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php @@ -0,0 +1,87 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSet + */ +class HeaderSet extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of headers to match against in http header. + * The match can be one of exact, prefix, suffix, or contains + * (substring match). The match follows AND semantics which means all + * the headers must match. Matches are always case sensitive unless + * the ignoreCase is set. Limited to 10 headers per Authorization + * Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.HeaderMatch headers = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\HeaderMatch[] $headers + * Required. A list of headers to match against in http header. + * The match can be one of exact, prefix, suffix, or contains + * (substring match). The match follows AND semantics which means all + * the headers must match. Matches are always case sensitive unless + * the ignoreCase is set. Limited to 10 headers per Authorization + * Policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of headers to match against in http header. + * The match can be one of exact, prefix, suffix, or contains + * (substring match). The match follows AND semantics which means all + * the headers must match. Matches are always case sensitive unless + * the ignoreCase is set. Limited to 10 headers per Authorization + * Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.HeaderMatch headers = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\HeaderMatch> + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Required. A list of headers to match against in http header. + * The match can be one of exact, prefix, suffix, or contains + * (substring match). The match follows AND semantics which means all + * the headers must match. Matches are always case sensitive unless + * the ignoreCase is set. Limited to 10 headers per Authorization + * Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.HeaderMatch headers = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\HeaderMatch[] $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\HeaderMatch::class); + $this->headers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php new file mode 100644 index 000000000000..00c5ac988a19 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php @@ -0,0 +1,150 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCP + */ +class MCP extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If specified, matches on the MCP protocol’s non-access + * specific methods namely: + * * initialize + * * completion/ + * * logging/ + * * notifications/ + * * ping + * Defaults to SKIP_BASE_PROTOCOL_METHODS if not specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.BaseProtocolMethodsOption base_protocol_methods_option = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $base_protocol_methods_option = 0; + /** + * Optional. A list of MCP methods and associated parameters to match + * on. It is recommended to use this field to match on tools, prompts + * and resource accesses while setting the baseProtocolMethodsOption + * to MATCH_BASE_PROTOCOL_METHODS to match on all the other MCP + * protocol methods. + * Limited to 10 MCP methods per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCPMethod methods = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $methods; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $base_protocol_methods_option + * Optional. If specified, matches on the MCP protocol’s non-access + * specific methods namely: + * * initialize + * * completion/ + * * logging/ + * * notifications/ + * * ping + * Defaults to SKIP_BASE_PROTOCOL_METHODS if not specified. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCPMethod[] $methods + * Optional. A list of MCP methods and associated parameters to match + * on. It is recommended to use this field to match on tools, prompts + * and resource accesses while setting the baseProtocolMethodsOption + * to MATCH_BASE_PROTOCOL_METHODS to match on all the other MCP + * protocol methods. + * Limited to 10 MCP methods per Authorization Policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If specified, matches on the MCP protocol’s non-access + * specific methods namely: + * * initialize + * * completion/ + * * logging/ + * * notifications/ + * * ping + * Defaults to SKIP_BASE_PROTOCOL_METHODS if not specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.BaseProtocolMethodsOption base_protocol_methods_option = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBaseProtocolMethodsOption() + { + return $this->base_protocol_methods_option; + } + + /** + * Optional. If specified, matches on the MCP protocol’s non-access + * specific methods namely: + * * initialize + * * completion/ + * * logging/ + * * notifications/ + * * ping + * Defaults to SKIP_BASE_PROTOCOL_METHODS if not specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.BaseProtocolMethodsOption base_protocol_methods_option = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBaseProtocolMethodsOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\BaseProtocolMethodsOption::class); + $this->base_protocol_methods_option = $var; + + return $this; + } + + /** + * Optional. A list of MCP methods and associated parameters to match + * on. It is recommended to use this field to match on tools, prompts + * and resource accesses while setting the baseProtocolMethodsOption + * to MATCH_BASE_PROTOCOL_METHODS to match on all the other MCP + * protocol methods. + * Limited to 10 MCP methods per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCPMethod methods = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCPMethod> + */ + public function getMethods() + { + return $this->methods; + } + + /** + * Optional. A list of MCP methods and associated parameters to match + * on. It is recommended to use this field to match on tools, prompts + * and resource accesses while setting the baseProtocolMethodsOption + * to MATCH_BASE_PROTOCOL_METHODS to match on all the other MCP + * protocol methods. + * Limited to 10 MCP methods per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCPMethod methods = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCPMethod[] $var + * @return $this + */ + public function setMethods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\To\RequestOperation\MCPMethod::class); + $this->methods = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php new file mode 100644 index 000000000000..1d4e63aa3443 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php @@ -0,0 +1,145 @@ +google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation.MCPMethod + */ +class MCPMethod extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MCP method to match against. Allowed values are as + * follows: + * 1. `tools`, `prompts`, `resources` - these will match against all + * sub methods under the respective methods. + * 2. `prompts/list`, `tools/list`, `resources/list`, + * `resources/templates/list` + * 3. `prompts/get`, `tools/call`, `resources/subscribe`, + * `resources/unsubscribe`, `resources/read` + * Params cannot be specified for categories 1 and 2. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. A list of MCP method parameters to match against. The + * match can be one of exact, prefix, suffix, or contains (substring + * match). Matches are always case sensitive unless the ignoreCase is + * set. Limited to 10 MCP method parameters per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch params = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $params; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The MCP method to match against. Allowed values are as + * follows: + * 1. `tools`, `prompts`, `resources` - these will match against all + * sub methods under the respective methods. + * 2. `prompts/list`, `tools/list`, `resources/list`, + * `resources/templates/list` + * 3. `prompts/get`, `tools/call`, `resources/subscribe`, + * `resources/unsubscribe`, `resources/read` + * Params cannot be specified for categories 1 and 2. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch[] $params + * Optional. A list of MCP method parameters to match against. The + * match can be one of exact, prefix, suffix, or contains (substring + * match). Matches are always case sensitive unless the ignoreCase is + * set. Limited to 10 MCP method parameters per Authorization Policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MCP method to match against. Allowed values are as + * follows: + * 1. `tools`, `prompts`, `resources` - these will match against all + * sub methods under the respective methods. + * 2. `prompts/list`, `tools/list`, `resources/list`, + * `resources/templates/list` + * 3. `prompts/get`, `tools/call`, `resources/subscribe`, + * `resources/unsubscribe`, `resources/read` + * Params cannot be specified for categories 1 and 2. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The MCP method to match against. Allowed values are as + * follows: + * 1. `tools`, `prompts`, `resources` - these will match against all + * sub methods under the respective methods. + * 2. `prompts/list`, `tools/list`, `resources/list`, + * `resources/templates/list` + * 3. `prompts/get`, `tools/call`, `resources/subscribe`, + * `resources/unsubscribe`, `resources/read` + * Params cannot be specified for categories 1 and 2. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A list of MCP method parameters to match against. The + * match can be one of exact, prefix, suffix, or contains (substring + * match). Matches are always case sensitive unless the ignoreCase is + * set. Limited to 10 MCP method parameters per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch> + */ + public function getParams() + { + return $this->params; + } + + /** + * Optional. A list of MCP method parameters to match against. The + * match can be one of exact, prefix, suffix, or contains (substring + * match). Matches are always case sensitive unless the ignoreCase is + * set. Limited to 10 MCP method parameters per Authorization Policy. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch[] $var + * @return $this + */ + public function setParams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch::class); + $this->params = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider.php new file mode 100644 index 000000000000..eca030d08623 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider.php @@ -0,0 +1,146 @@ +google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider + */ +class CustomProvider extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Delegates authorization decisions to Cloud IAP. Applicable + * only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy + * level is not compatible with Cloud IAP settings in the BackendService. + * Enabling IAP in both places will result in request failure. Ensure that + * IAP is enabled in either the AuthzPolicy or the BackendService but not in + * both places. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.CloudIap cloud_iap = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloud_iap = null; + /** + * Optional. Delegate authorization decision to user authored Service + * Extension. Only one of cloudIap or authzExtension can be specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $authz_extension = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\CloudIap $cloud_iap + * Optional. Delegates authorization decisions to Cloud IAP. Applicable + * only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy + * level is not compatible with Cloud IAP settings in the BackendService. + * Enabling IAP in both places will result in request failure. Ensure that + * IAP is enabled in either the AuthzPolicy or the BackendService but not in + * both places. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\AuthzExtension $authz_extension + * Optional. Delegate authorization decision to user authored Service + * Extension. Only one of cloudIap or authzExtension can be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Delegates authorization decisions to Cloud IAP. Applicable + * only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy + * level is not compatible with Cloud IAP settings in the BackendService. + * Enabling IAP in both places will result in request failure. Ensure that + * IAP is enabled in either the AuthzPolicy or the BackendService but not in + * both places. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.CloudIap cloud_iap = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\CloudIap|null + */ + public function getCloudIap() + { + return $this->cloud_iap; + } + + public function hasCloudIap() + { + return isset($this->cloud_iap); + } + + public function clearCloudIap() + { + unset($this->cloud_iap); + } + + /** + * Optional. Delegates authorization decisions to Cloud IAP. Applicable + * only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy + * level is not compatible with Cloud IAP settings in the BackendService. + * Enabling IAP in both places will result in request failure. Ensure that + * IAP is enabled in either the AuthzPolicy or the BackendService but not in + * both places. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.CloudIap cloud_iap = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\CloudIap $var + * @return $this + */ + public function setCloudIap($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\CloudIap::class); + $this->cloud_iap = $var; + + return $this; + } + + /** + * Optional. Delegate authorization decision to user authored Service + * Extension. Only one of cloudIap or authzExtension can be specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\AuthzExtension|null + */ + public function getAuthzExtension() + { + return $this->authz_extension; + } + + public function hasAuthzExtension() + { + return isset($this->authz_extension); + } + + public function clearAuthzExtension() + { + unset($this->authz_extension); + } + + /** + * Optional. Delegate authorization decision to user authored Service + * Extension. Only one of cloudIap or authzExtension can be specified. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\AuthzExtension $var + * @return $this + */ + public function setAuthzExtension($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\CustomProvider\AuthzExtension::class); + $this->authz_extension = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/AuthzExtension.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/AuthzExtension.php new file mode 100644 index 000000000000..d10d217807b6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/AuthzExtension.php @@ -0,0 +1,76 @@ +google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.AuthzExtension + */ +class AuthzExtension extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of references to authorization + * extensions that will be invoked for requests matching this policy. + * Limited to 1 custom provider. + * + * Generated from protobuf field repeated string resources = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $resources + * Required. A list of references to authorization + * extensions that will be invoked for requests matching this policy. + * Limited to 1 custom provider. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of references to authorization + * extensions that will be invoked for requests matching this policy. + * Limited to 1 custom provider. + * + * Generated from protobuf field repeated string resources = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * Required. A list of references to authorization + * extensions that will be invoked for requests matching this policy. + * Limited to 1 custom provider. + * + * Generated from protobuf field repeated string resources = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resources = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/CloudIap.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/CloudIap.php new file mode 100644 index 000000000000..55b14ea4aa06 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/CloudIap.php @@ -0,0 +1,38 @@ +google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider.CloudIap + */ +class CloudIap extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/LoadBalancingScheme.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/LoadBalancingScheme.php new file mode 100644 index 000000000000..0e88bcf36157 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/LoadBalancingScheme.php @@ -0,0 +1,74 @@ +google.cloud.networksecurity.v1.AuthzPolicy.LoadBalancingScheme + */ +class LoadBalancingScheme +{ + /** + * Default value. Do not use. + * + * Generated from protobuf enum LOAD_BALANCING_SCHEME_UNSPECIFIED = 0; + */ + const LOAD_BALANCING_SCHEME_UNSPECIFIED = 0; + /** + * Signifies that this is used for Regional internal or Cross-region + * internal Application Load Balancing. + * + * Generated from protobuf enum INTERNAL_MANAGED = 1; + */ + const INTERNAL_MANAGED = 1; + /** + * Signifies that this is used for Global external or Regional external + * Application Load Balancing. + * + * Generated from protobuf enum EXTERNAL_MANAGED = 2; + */ + const EXTERNAL_MANAGED = 2; + /** + * Signifies that this is used for Cloud Service Mesh. Meant for use by + * CSM GKE controller only. + * + * Generated from protobuf enum INTERNAL_SELF_MANAGED = 3; + */ + const INTERNAL_SELF_MANAGED = 3; + + private static $valueToName = [ + self::LOAD_BALANCING_SCHEME_UNSPECIFIED => 'LOAD_BALANCING_SCHEME_UNSPECIFIED', + self::INTERNAL_MANAGED => 'INTERNAL_MANAGED', + self::EXTERNAL_MANAGED => 'EXTERNAL_MANAGED', + self::INTERNAL_SELF_MANAGED => 'INTERNAL_SELF_MANAGED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/PolicyProfile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/PolicyProfile.php new file mode 100644 index 000000000000..bffb6c93aec6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/PolicyProfile.php @@ -0,0 +1,70 @@ +google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile + */ +class PolicyProfile +{ + /** + * Unspecified policy profile. + * + * Generated from protobuf enum POLICY_PROFILE_UNSPECIFIED = 0; + */ + const POLICY_PROFILE_UNSPECIFIED = 0; + /** + * Applies to request authorization. `CUSTOM` authorization + * policies with Authz extensions will be allowed with `EXT_AUTHZ_GRPC` or + * `EXT_PROC_GRPC` protocols. Extensions are invoked only for request header + * events. + * + * Generated from protobuf enum REQUEST_AUTHZ = 1; + */ + const REQUEST_AUTHZ = 1; + /** + * Applies to content security, sanitization, etc. Only + * `CUSTOM` action is allowed in this policy profile. AuthzExtensions in the + * custom provider must support `EXT_PROC_GRPC` protocol only and be capable + * of receiving all `EXT_PROC_GRPC` events (REQUEST_HEADERS, REQUEST_BODY, + * REQUEST_TRAILERS, RESPONSE_HEADERS, RESPONSE_BODY, RESPONSE_TRAILERS) + * with `FULL_DUPLEX_STREAMED` body send mode. + * + * Generated from protobuf enum CONTENT_AUTHZ = 2; + */ + const CONTENT_AUTHZ = 2; + + private static $valueToName = [ + self::POLICY_PROFILE_UNSPECIFIED => 'POLICY_PROFILE_UNSPECIFIED', + self::REQUEST_AUTHZ => 'REQUEST_AUTHZ', + self::CONTENT_AUTHZ => 'CONTENT_AUTHZ', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/Target.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/Target.php new file mode 100644 index 000000000000..e4cd58f11555 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/Target.php @@ -0,0 +1,121 @@ +google.cloud.networksecurity.v1.AuthzPolicy.Target + */ +class Target extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. All gateways and forwarding rules referenced by this policy and + * extensions must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer + * to [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $load_balancing_scheme = 0; + /** + * Required. A list of references to the Forwarding Rules on which this + * policy will be applied. + * + * Generated from protobuf field repeated string resources = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $load_balancing_scheme + * Optional. All gateways and forwarding rules referenced by this policy and + * extensions must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer + * to [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). + * @type string[] $resources + * Required. A list of references to the Forwarding Rules on which this + * policy will be applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. All gateways and forwarding rules referenced by this policy and + * extensions must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer + * to [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLoadBalancingScheme() + { + return $this->load_balancing_scheme; + } + + /** + * Optional. All gateways and forwarding rules referenced by this policy and + * extensions must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer + * to [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLoadBalancingScheme($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy\LoadBalancingScheme::class); + $this->load_balancing_scheme = $var; + + return $this; + } + + /** + * Required. A list of references to the Forwarding Rules on which this + * policy will be applied. + * + * Generated from protobuf field repeated string resources = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * Required. A list of references to the Forwarding Rules on which this + * policy will be applied. + * + * Generated from protobuf field repeated string resources = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resources = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig.php new file mode 100644 index 000000000000..81f3d8874041 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig.php @@ -0,0 +1,422 @@ +google.cloud.networksecurity.v1.BackendAuthenticationConfig + */ +class BackendAuthenticationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the BackendAuthenticationConfig resource. It matches the + * pattern + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * Optional. A reference to a certificatemanager.googleapis.com.Certificate + * resource. This is a relative resource path following the form + * "projects/{project}/locations/{location}/certificates/{certificate}". + * Used by a BackendService to negotiate mTLS when the backend connection uses + * TLS and the backend requests a client certificate. Must have a CLIENT_AUTH + * scope. + * + * Generated from protobuf field string client_certificate = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $client_certificate = ''; + /** + * Optional. A reference to a TrustConfig resource from the + * certificatemanager.googleapis.com namespace. This is a relative resource + * path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". + * A BackendService uses the chain of trust represented by this TrustConfig, + * if specified, to validate the server certificates presented by the backend. + * Required unless wellKnownRoots is set to PUBLIC_ROOTS. + * + * Generated from protobuf field string trust_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $trust_config = ''; + /** + * Well known roots to use for server certificate validation. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig.WellKnownRoots well_known_roots = 8; + */ + protected $well_known_roots = 0; + /** + * Output only. Etag of the resource. + * + * Generated from protobuf field string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the BackendAuthenticationConfig resource. It matches the + * pattern + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}` + * @type string $description + * Optional. Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of label tags associated with the resource. + * @type string $client_certificate + * Optional. A reference to a certificatemanager.googleapis.com.Certificate + * resource. This is a relative resource path following the form + * "projects/{project}/locations/{location}/certificates/{certificate}". + * Used by a BackendService to negotiate mTLS when the backend connection uses + * TLS and the backend requests a client certificate. Must have a CLIENT_AUTH + * scope. + * @type string $trust_config + * Optional. A reference to a TrustConfig resource from the + * certificatemanager.googleapis.com namespace. This is a relative resource + * path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". + * A BackendService uses the chain of trust represented by this TrustConfig, + * if specified, to validate the server certificates presented by the backend. + * Required unless wellKnownRoots is set to PUBLIC_ROOTS. + * @type int $well_known_roots + * Well known roots to use for server certificate validation. + * @type string $etag + * Output only. Etag of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the BackendAuthenticationConfig resource. It matches the + * pattern + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the BackendAuthenticationConfig resource. It matches the + * pattern + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; + } + + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. A reference to a certificatemanager.googleapis.com.Certificate + * resource. This is a relative resource path following the form + * "projects/{project}/locations/{location}/certificates/{certificate}". + * Used by a BackendService to negotiate mTLS when the backend connection uses + * TLS and the backend requests a client certificate. Must have a CLIENT_AUTH + * scope. + * + * Generated from protobuf field string client_certificate = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * Optional. A reference to a certificatemanager.googleapis.com.Certificate + * resource. This is a relative resource path following the form + * "projects/{project}/locations/{location}/certificates/{certificate}". + * Used by a BackendService to negotiate mTLS when the backend connection uses + * TLS and the backend requests a client certificate. Must have a CLIENT_AUTH + * scope. + * + * Generated from protobuf field string client_certificate = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * Optional. A reference to a TrustConfig resource from the + * certificatemanager.googleapis.com namespace. This is a relative resource + * path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". + * A BackendService uses the chain of trust represented by this TrustConfig, + * if specified, to validate the server certificates presented by the backend. + * Required unless wellKnownRoots is set to PUBLIC_ROOTS. + * + * Generated from protobuf field string trust_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTrustConfig() + { + return $this->trust_config; + } + + /** + * Optional. A reference to a TrustConfig resource from the + * certificatemanager.googleapis.com namespace. This is a relative resource + * path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". + * A BackendService uses the chain of trust represented by this TrustConfig, + * if specified, to validate the server certificates presented by the backend. + * Required unless wellKnownRoots is set to PUBLIC_ROOTS. + * + * Generated from protobuf field string trust_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTrustConfig($var) + { + GPBUtil::checkString($var, True); + $this->trust_config = $var; + + return $this; + } + + /** + * Well known roots to use for server certificate validation. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig.WellKnownRoots well_known_roots = 8; + * @return int + */ + public function getWellKnownRoots() + { + return $this->well_known_roots; + } + + /** + * Well known roots to use for server certificate validation. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig.WellKnownRoots well_known_roots = 8; + * @param int $var + * @return $this + */ + public function setWellKnownRoots($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig\WellKnownRoots::class); + $this->well_known_roots = $var; + + return $this; + } + + /** + * Output only. Etag of the resource. + * + * Generated from protobuf field string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. Etag of the resource. + * + * Generated from protobuf field string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig/WellKnownRoots.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig/WellKnownRoots.php new file mode 100644 index 000000000000..5e344aeb547d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig/WellKnownRoots.php @@ -0,0 +1,69 @@ +google.cloud.networksecurity.v1.BackendAuthenticationConfig.WellKnownRoots + */ +class WellKnownRoots +{ + /** + * Equivalent to NONE. + * + * Generated from protobuf enum WELL_KNOWN_ROOTS_UNSPECIFIED = 0; + */ + const WELL_KNOWN_ROOTS_UNSPECIFIED = 0; + /** + * The BackendService will only validate server certificates against roots + * specified in TrustConfig. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * The BackendService uses a set of well-known public roots, in addition to + * any roots specified in the trustConfig field, when validating the server + * certificates presented by the backend. Validation with these roots is + * only considered when the TlsSettings.sni field in the BackendService is + * set. + * The well-known roots are a set of root CAs managed by Google. CAs in this + * set can be added or removed without notice. + * + * Generated from protobuf enum PUBLIC_ROOTS = 2; + */ + const PUBLIC_ROOTS = 2; + + private static $valueToName = [ + self::WELL_KNOWN_ROOTS_UNSPECIFIED => 'WELL_KNOWN_ROOTS_UNSPECIFIED', + self::NONE => 'NONE', + self::PUBLIC_ROOTS => 'PUBLIC_ROOTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php new file mode 100644 index 000000000000..807a91f45d79 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php @@ -0,0 +1,118 @@ +google.cloud.networksecurity.v1.CertificateProvider + */ +class CertificateProvider extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint + * gRPC specific configuration to access the gRPC server to + * obtain the cert and private key. + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the cert and private key. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null + */ + public function getGrpcEndpoint() + { + return $this->readOneof(2); + } + + public function hasGrpcEndpoint() + { + return $this->hasOneof(2); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the cert and private key. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var + * @return $this + */ + public function setGrpcEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null + */ + public function getCertificateProviderInstance() + { + return $this->readOneof(3); + } + + public function hasCertificateProviderInstance() + { + return $this->hasOneof(3); + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var + * @return $this + */ + public function setCertificateProviderInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php new file mode 100644 index 000000000000..488fad2f1a92 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php @@ -0,0 +1,78 @@ +google.cloud.networksecurity.v1.CertificateProviderInstance + */ +class CertificateProviderInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. + * + * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $plugin_instance = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plugin_instance + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. + * + * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPluginInstance() + { + return $this->plugin_instance; + } + + /** + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. + * + * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPluginInstance($var) + { + GPBUtil::checkString($var, True); + $this->plugin_instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php new file mode 100644 index 000000000000..9560803735cf --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php @@ -0,0 +1,361 @@ +google.cloud.networksecurity.v1.ClientTlsPolicy + */ +class ClientTlsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * + * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sni = ''; + /** + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_certificate = null; + /** + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $server_validation_ca; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * @type string $description + * Optional. Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the resource. + * @type string $sni + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $client_certificate + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. + * @type \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $server_validation_ca + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; + } + + /** + * Optional. Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * + * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSni() + { + return $this->sni; + } + + /** + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * + * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSni($var) + { + GPBUtil::checkString($var, True); + $this->sni = $var; + + return $this; + } + + /** + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + public function hasClientCertificate() + { + return isset($this->client_certificate); + } + + public function clearClientCertificate() + { + unset($this->client_certificate); + } + + /** + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); + $this->client_certificate = $var; + + return $this; + } + + /** + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ValidationCA> + */ + public function getServerValidationCa() + { + return $this->server_validation_ca; + } + + /** + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $var + * @return $this + */ + public function setServerValidationCa($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); + $this->server_validation_ca = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php new file mode 100644 index 000000000000..1fadab6729af --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php @@ -0,0 +1,197 @@ +google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest + */ +class CloneAddressGroupItemsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $address_group = ''; + /** + * Required. Source address group to clone items from. + * + * Generated from protobuf field string source_address_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source_address_group = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $addressGroup Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/*/locations/{location}/addressGroups/*`. Please see + * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. + * @param string $sourceAddressGroup Required. Source address group to clone items from. Please see + * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\CloneAddressGroupItemsRequest + * + * @experimental + */ + public static function build(string $addressGroup, string $sourceAddressGroup): self + { + return (new self()) + ->setAddressGroup($addressGroup) + ->setSourceAddressGroup($sourceAddressGroup); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address_group + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * @type string $source_address_group + * Required. Source address group to clone items from. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAddressGroup() + { + return $this->address_group; + } + + /** + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAddressGroup($var) + { + GPBUtil::checkString($var, True); + $this->address_group = $var; + + return $this; + } + + /** + * Required. Source address group to clone items from. + * + * Generated from protobuf field string source_address_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSourceAddressGroup() + { + return $this->source_address_group; + } + + /** + * Required. Source address group to clone items from. + * + * Generated from protobuf field string source_address_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceAddressGroup($var) + { + GPBUtil::checkString($var, True); + $this->source_address_group = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php new file mode 100644 index 000000000000..4a0948a915fe --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php @@ -0,0 +1,257 @@ +google.cloud.networksecurity.v1.CreateAddressGroupRequest + */ +class CreateAddressGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the AddressGroup. Must be in the + * format `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the AddressGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string address_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $address_group_id = ''; + /** + * Required. AddressGroup resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $address_group = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource of the AddressGroup. Must be in the + * format `projects/*/locations/{location}`. Please see + * {@see AddressGroupServiceClient::organizationLocationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup Required. AddressGroup resource to be created. + * @param string $addressGroupId Required. Short name of the AddressGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateAddressGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup, string $addressGroupId): self + { + return (new self()) + ->setParent($parent) + ->setAddressGroup($addressGroup) + ->setAddressGroupId($addressGroupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the AddressGroup. Must be in the + * format `projects/{@*}locations/{location}`. + * @type string $address_group_id + * Required. Short name of the AddressGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * @type \Google\Cloud\NetworkSecurity\V1\AddressGroup $address_group + * Required. AddressGroup resource to be created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the AddressGroup. Must be in the + * format `projects/{@*}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 parent resource of the AddressGroup. Must be in the + * format `projects/{@*}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. Short name of the AddressGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string address_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAddressGroupId() + { + return $this->address_group_id; + } + + /** + * Required. Short name of the AddressGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string address_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAddressGroupId($var) + { + GPBUtil::checkString($var, True); + $this->address_group_id = $var; + + return $this; + } + + /** + * Required. AddressGroup resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AddressGroup|null + */ + public function getAddressGroup() + { + return $this->address_group; + } + + public function hasAddressGroup() + { + return isset($this->address_group); + } + + public function clearAddressGroup() + { + unset($this->address_group); + } + + /** + * Required. AddressGroup resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $var + * @return $this + */ + public function setAddressGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AddressGroup::class); + $this->address_group = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..f86009019760 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest + */ +class CreateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization_policy_id = ''; + /** + * Required. AuthorizationPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization_policy = null; + + /** + * @param string $parent Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. AuthorizationPolicy resource to be created. + * @param string $authorizationPolicyId Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateAuthorizationPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, string $authorizationPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setAuthorizationPolicy($authorizationPolicy) + ->setAuthorizationPolicyId($authorizationPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * @type string $authorization_policy_id + * Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy + * Required. AuthorizationPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `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 parent resource of the AuthorizationPolicy. Must be in the + * format `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. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAuthorizationPolicyId() + { + return $this->authorization_policy_id; + } + + /** + * Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAuthorizationPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->authorization_policy_id = $var; + + return $this; + } + + /** + * Required. AuthorizationPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null + */ + public function getAuthorizationPolicy() + { + return $this->authorization_policy; + } + + public function hasAuthorizationPolicy() + { + return isset($this->authorization_policy); + } + + public function clearAuthorizationPolicy() + { + unset($this->authorization_policy); + } + + /** + * Required. AuthorizationPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var + * @return $this + */ + public function setAuthorizationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); + $this->authorization_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthzPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthzPolicyRequest.php new file mode 100644 index 000000000000..04e7b7360d41 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthzPolicyRequest.php @@ -0,0 +1,242 @@ +google.cloud.networksecurity.v1.CreateAuthzPolicyRequest + */ +class CreateAuthzPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the `AuthzPolicy` resource. Must be in + * the format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User-provided ID of the `AuthzPolicy` resource to be created. + * + * Generated from protobuf field string authz_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authz_policy_id = ''; + /** + * Required. `AuthzPolicy` resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy authz_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authz_policy = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource of the `AuthzPolicy` resource. Must be in + * the format `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy $authzPolicy Required. `AuthzPolicy` resource to be created. + * @param string $authzPolicyId Required. User-provided ID of the `AuthzPolicy` resource to be created. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateAuthzPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy $authzPolicy, string $authzPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setAuthzPolicy($authzPolicy) + ->setAuthzPolicyId($authzPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the `AuthzPolicy` resource. Must be in + * the format `projects/{project}/locations/{location}`. + * @type string $authz_policy_id + * Required. User-provided ID of the `AuthzPolicy` resource to be created. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy $authz_policy + * Required. `AuthzPolicy` resource to be created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the `AuthzPolicy` resource. Must be in + * the format `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 parent resource of the `AuthzPolicy` resource. Must be in + * the format `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. User-provided ID of the `AuthzPolicy` resource to be created. + * + * Generated from protobuf field string authz_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAuthzPolicyId() + { + return $this->authz_policy_id; + } + + /** + * Required. User-provided ID of the `AuthzPolicy` resource to be created. + * + * Generated from protobuf field string authz_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAuthzPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->authz_policy_id = $var; + + return $this; + } + + /** + * Required. `AuthzPolicy` resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy authz_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy|null + */ + public function getAuthzPolicy() + { + return $this->authz_policy; + } + + public function hasAuthzPolicy() + { + return isset($this->authz_policy); + } + + public function clearAuthzPolicy() + { + unset($this->authz_policy); + } + + /** + * Required. `AuthzPolicy` resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy authz_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy $var + * @return $this + */ + public function setAuthzPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy::class); + $this->authz_policy = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateBackendAuthenticationConfigRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateBackendAuthenticationConfigRequest.php new file mode 100644 index 000000000000..6a0f372822fd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateBackendAuthenticationConfigRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateBackendAuthenticationConfigRequest + */ +class CreateBackendAuthenticationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the BackendAuthenticationConfig. Must be + * in the format `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the BackendAuthenticationConfig resource to be + * created. This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start with a + * number. E.g. "backend-auth-config". + * + * Generated from protobuf field string backend_authentication_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backend_authentication_config_id = ''; + /** + * Required. BackendAuthenticationConfig resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backend_authentication_config = null; + + /** + * @param string $parent Required. The parent resource of the BackendAuthenticationConfig. Must be + * in the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig $backendAuthenticationConfig Required. BackendAuthenticationConfig resource to be created. + * @param string $backendAuthenticationConfigId Required. Short name of the BackendAuthenticationConfig resource to be + * created. This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start with a + * number. E.g. "backend-auth-config". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateBackendAuthenticationConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig $backendAuthenticationConfig, string $backendAuthenticationConfigId): self + { + return (new self()) + ->setParent($parent) + ->setBackendAuthenticationConfig($backendAuthenticationConfig) + ->setBackendAuthenticationConfigId($backendAuthenticationConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the BackendAuthenticationConfig. Must be + * in the format `projects/{@*}locations/{location}`. + * @type string $backend_authentication_config_id + * Required. Short name of the BackendAuthenticationConfig resource to be + * created. This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start with a + * number. E.g. "backend-auth-config". + * @type \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig $backend_authentication_config + * Required. BackendAuthenticationConfig resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the BackendAuthenticationConfig. Must be + * in the format `projects/{@*}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 parent resource of the BackendAuthenticationConfig. Must be + * in the format `projects/{@*}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. Short name of the BackendAuthenticationConfig resource to be + * created. This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start with a + * number. E.g. "backend-auth-config". + * + * Generated from protobuf field string backend_authentication_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackendAuthenticationConfigId() + { + return $this->backend_authentication_config_id; + } + + /** + * Required. Short name of the BackendAuthenticationConfig resource to be + * created. This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start with a + * number. E.g. "backend-auth-config". + * + * Generated from protobuf field string backend_authentication_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackendAuthenticationConfigId($var) + { + GPBUtil::checkString($var, True); + $this->backend_authentication_config_id = $var; + + return $this; + } + + /** + * Required. BackendAuthenticationConfig resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig|null + */ + public function getBackendAuthenticationConfig() + { + return $this->backend_authentication_config; + } + + public function hasBackendAuthenticationConfig() + { + return isset($this->backend_authentication_config); + } + + public function clearBackendAuthenticationConfig() + { + unset($this->backend_authentication_config); + } + + /** + * Required. BackendAuthenticationConfig resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig $var + * @return $this + */ + public function setBackendAuthenticationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig::class); + $this->backend_authentication_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php new file mode 100644 index 000000000000..8a00e8de7116 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest + */ +class CreateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". + * + * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_tls_policy_id = ''; + /** + * Required. ClientTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_tls_policy = null; + + /** + * @param string $parent Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. ClientTlsPolicy resource to be created. + * @param string $clientTlsPolicyId Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateClientTlsPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, string $clientTlsPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setClientTlsPolicy($clientTlsPolicy) + ->setClientTlsPolicyId($clientTlsPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/{@*}locations/{location}`. + * @type string $client_tls_policy_id + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". + * @type \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy + * Required. ClientTlsPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/{@*}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 parent resource of the ClientTlsPolicy. Must be in + * the format `projects/{@*}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. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". + * + * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClientTlsPolicyId() + { + return $this->client_tls_policy_id; + } + + /** + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". + * + * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClientTlsPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->client_tls_policy_id = $var; + + return $this; + } + + /** + * Required. ClientTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null + */ + public function getClientTlsPolicy() + { + return $this->client_tls_policy; + } + + public function hasClientTlsPolicy() + { + return isset($this->client_tls_policy); + } + + public function clearClientTlsPolicy() + { + unset($this->client_tls_policy); + } + + /** + * Required. ClientTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var + * @return $this + */ + public function setClientTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); + $this->client_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateDnsThreatDetectorRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateDnsThreatDetectorRequest.php new file mode 100644 index 000000000000..162aae5afeb8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateDnsThreatDetectorRequest.php @@ -0,0 +1,168 @@ +google.cloud.networksecurity.v1.CreateDnsThreatDetectorRequest + */ +class CreateDnsThreatDetectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The value for the parent of the DnsThreatDetector resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The ID of the requesting DnsThreatDetector object. + * If this field is not supplied, the service generates an identifier. + * + * Generated from protobuf field string dns_threat_detector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dns_threat_detector_id = ''; + /** + * Required. The `DnsThreatDetector` resource to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detector = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns_threat_detector = null; + + /** + * @param string $parent Required. The value for the parent of the DnsThreatDetector resource. Please see + * {@see DnsThreatDetectorServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $dnsThreatDetector Required. The `DnsThreatDetector` resource to create. + * @param string $dnsThreatDetectorId Optional. The ID of the requesting DnsThreatDetector object. + * If this field is not supplied, the service generates an identifier. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateDnsThreatDetectorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $dnsThreatDetector, string $dnsThreatDetectorId): self + { + return (new self()) + ->setParent($parent) + ->setDnsThreatDetector($dnsThreatDetector) + ->setDnsThreatDetectorId($dnsThreatDetectorId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The value for the parent of the DnsThreatDetector resource. + * @type string $dns_threat_detector_id + * Optional. The ID of the requesting DnsThreatDetector object. + * If this field is not supplied, the service generates an identifier. + * @type \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $dns_threat_detector + * Required. The `DnsThreatDetector` resource to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\DnsThreatDetector::initOnce(); + parent::__construct($data); + } + + /** + * Required. The value for the parent of the DnsThreatDetector resource. + * + * 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 value for the parent of the DnsThreatDetector resource. + * + * 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 ID of the requesting DnsThreatDetector object. + * If this field is not supplied, the service generates an identifier. + * + * Generated from protobuf field string dns_threat_detector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDnsThreatDetectorId() + { + return $this->dns_threat_detector_id; + } + + /** + * Optional. The ID of the requesting DnsThreatDetector object. + * If this field is not supplied, the service generates an identifier. + * + * Generated from protobuf field string dns_threat_detector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDnsThreatDetectorId($var) + { + GPBUtil::checkString($var, True); + $this->dns_threat_detector_id = $var; + + return $this; + } + + /** + * Required. The `DnsThreatDetector` resource to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector|null + */ + public function getDnsThreatDetector() + { + return $this->dns_threat_detector; + } + + public function hasDnsThreatDetector() + { + return isset($this->dns_threat_detector); + } + + public function clearDnsThreatDetector() + { + unset($this->dns_threat_detector); + } + + /** + * Required. The `DnsThreatDetector` resource to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $var + * @return $this + */ + public function setDnsThreatDetector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector::class); + $this->dns_threat_detector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointAssociationRequest.php new file mode 100644 index 000000000000..3ae5acb59f10 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointAssociationRequest.php @@ -0,0 +1,247 @@ +google.cloud.networksecurity.v1.CreateFirewallEndpointAssociationRequest + */ +class CreateFirewallEndpointAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_association_id from the method_signature of Create RPC. + * + * Generated from protobuf field string firewall_endpoint_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $firewall_endpoint_association_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_association = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_endpoint_association = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see FirewallActivationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation $firewallEndpointAssociation Required. The resource being created + * @param string $firewallEndpointAssociationId Optional. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_association_id from the method_signature of Create RPC. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateFirewallEndpointAssociationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation $firewallEndpointAssociation, string $firewallEndpointAssociationId): self + { + return (new self()) + ->setParent($parent) + ->setFirewallEndpointAssociation($firewallEndpointAssociation) + ->setFirewallEndpointAssociationId($firewallEndpointAssociationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $firewall_endpoint_association_id + * Optional. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_association_id from the method_signature of Create RPC. + * @type \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation $firewall_endpoint_association + * Required. The resource being created + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_association_id from the method_signature of Create RPC. + * + * Generated from protobuf field string firewall_endpoint_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFirewallEndpointAssociationId() + { + return $this->firewall_endpoint_association_id; + } + + /** + * Optional. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_association_id from the method_signature of Create RPC. + * + * Generated from protobuf field string firewall_endpoint_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFirewallEndpointAssociationId($var) + { + GPBUtil::checkString($var, True); + $this->firewall_endpoint_association_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation|null + */ + public function getFirewallEndpointAssociation() + { + return $this->firewall_endpoint_association; + } + + public function hasFirewallEndpointAssociation() + { + return isset($this->firewall_endpoint_association); + } + + public function clearFirewallEndpointAssociation() + { + unset($this->firewall_endpoint_association); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation $var + * @return $this + */ + public function setFirewallEndpointAssociation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation::class); + $this->firewall_endpoint_association = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointRequest.php new file mode 100644 index 000000000000..f29a121ba394 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointRequest.php @@ -0,0 +1,247 @@ +google.cloud.networksecurity.v1.CreateFirewallEndpointRequest + */ +class CreateFirewallEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_id from the method_signature of Create RPC. + * + * Generated from protobuf field string firewall_endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_endpoint_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_endpoint = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see FirewallActivationClient::organizationLocationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint $firewallEndpoint Required. The resource being created + * @param string $firewallEndpointId Required. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_id from the method_signature of Create RPC. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateFirewallEndpointRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint $firewallEndpoint, string $firewallEndpointId): self + { + return (new self()) + ->setParent($parent) + ->setFirewallEndpoint($firewallEndpoint) + ->setFirewallEndpointId($firewallEndpointId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $firewall_endpoint_id + * Required. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_id from the method_signature of Create RPC. + * @type \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint $firewall_endpoint + * Required. The resource being created + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_id from the method_signature of Create RPC. + * + * Generated from protobuf field string firewall_endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFirewallEndpointId() + { + return $this->firewall_endpoint_id; + } + + /** + * Required. Id of the requesting object. + * If auto-generating Id server-side, remove this field and + * firewall_endpoint_id from the method_signature of Create RPC. + * + * Generated from protobuf field string firewall_endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFirewallEndpointId($var) + { + GPBUtil::checkString($var, True); + $this->firewall_endpoint_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint|null + */ + public function getFirewallEndpoint() + { + return $this->firewall_endpoint; + } + + public function hasFirewallEndpoint() + { + return isset($this->firewall_endpoint); + } + + public function clearFirewallEndpoint() + { + unset($this->firewall_endpoint); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint $var + * @return $this + */ + public function setFirewallEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint::class); + $this->firewall_endpoint = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRequest.php new file mode 100644 index 000000000000..e28c3dd22992 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRequest + */ +class CreateGatewaySecurityPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the GatewaySecurityPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the GatewaySecurityPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "gateway_security_policy1". + * + * Generated from protobuf field string gateway_security_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_security_policy_id = ''; + /** + * Required. GatewaySecurityPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_security_policy = null; + + /** + * @param string $parent Required. The parent resource of the GatewaySecurityPolicy. Must be in the + * format `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy $gatewaySecurityPolicy Required. GatewaySecurityPolicy resource to be created. + * @param string $gatewaySecurityPolicyId Required. Short name of the GatewaySecurityPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "gateway_security_policy1". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateGatewaySecurityPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy $gatewaySecurityPolicy, string $gatewaySecurityPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy) + ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the GatewaySecurityPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * @type string $gateway_security_policy_id + * Required. Short name of the GatewaySecurityPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "gateway_security_policy1". + * @type \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy $gateway_security_policy + * Required. GatewaySecurityPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the GatewaySecurityPolicy. Must be in the + * format `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 parent resource of the GatewaySecurityPolicy. Must be in the + * format `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. Short name of the GatewaySecurityPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "gateway_security_policy1". + * + * Generated from protobuf field string gateway_security_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGatewaySecurityPolicyId() + { + return $this->gateway_security_policy_id; + } + + /** + * Required. Short name of the GatewaySecurityPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "gateway_security_policy1". + * + * Generated from protobuf field string gateway_security_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGatewaySecurityPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->gateway_security_policy_id = $var; + + return $this; + } + + /** + * Required. GatewaySecurityPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy|null + */ + public function getGatewaySecurityPolicy() + { + return $this->gateway_security_policy; + } + + public function hasGatewaySecurityPolicy() + { + return isset($this->gateway_security_policy); + } + + public function clearGatewaySecurityPolicy() + { + unset($this->gateway_security_policy); + } + + /** + * Required. GatewaySecurityPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy $var + * @return $this + */ + public function setGatewaySecurityPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy::class); + $this->gateway_security_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRuleRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRuleRequest.php new file mode 100644 index 000000000000..38070e6362ee --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRuleRequest.php @@ -0,0 +1,189 @@ +google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRuleRequest + */ +class CreateGatewaySecurityPolicyRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent where this rule will be created. + * Format : + * projects/{project}/location/{location}/gatewaySecurityPolicies/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The rule to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_security_policy_rule = null; + /** + * The ID to use for the rule, which will become the final component of + * the rule's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string gateway_security_policy_rule_id = 3; + */ + protected $gateway_security_policy_rule_id = ''; + + /** + * @param string $parent Required. The parent where this rule will be created. + * Format : + * projects/{project}/location/{location}/gatewaySecurityPolicies/* + * Please see {@see NetworkSecurityClient::gatewaySecurityPolicyName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule $gatewaySecurityPolicyRule Required. The rule to be created. + * @param string $gatewaySecurityPolicyRuleId The ID to use for the rule, which will become the final component of + * the rule's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateGatewaySecurityPolicyRuleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule $gatewaySecurityPolicyRule, string $gatewaySecurityPolicyRuleId): self + { + return (new self()) + ->setParent($parent) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule) + ->setGatewaySecurityPolicyRuleId($gatewaySecurityPolicyRuleId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent where this rule will be created. + * Format : + * projects/{project}/location/{location}/gatewaySecurityPolicies/* + * @type \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule $gateway_security_policy_rule + * Required. The rule to be created. + * @type string $gateway_security_policy_rule_id + * The ID to use for the rule, which will become the final component of + * the rule's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent where this rule will be created. + * Format : + * projects/{project}/location/{location}/gatewaySecurityPolicies/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent where this rule will be created. + * Format : + * projects/{project}/location/{location}/gatewaySecurityPolicies/* + * + * 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 rule to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule|null + */ + public function getGatewaySecurityPolicyRule() + { + return $this->gateway_security_policy_rule; + } + + public function hasGatewaySecurityPolicyRule() + { + return isset($this->gateway_security_policy_rule); + } + + public function clearGatewaySecurityPolicyRule() + { + unset($this->gateway_security_policy_rule); + } + + /** + * Required. The rule to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule $var + * @return $this + */ + public function setGatewaySecurityPolicyRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule::class); + $this->gateway_security_policy_rule = $var; + + return $this; + } + + /** + * The ID to use for the rule, which will become the final component of + * the rule's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string gateway_security_policy_rule_id = 3; + * @return string + */ + public function getGatewaySecurityPolicyRuleId() + { + return $this->gateway_security_policy_rule_id; + } + + /** + * The ID to use for the rule, which will become the final component of + * the rule's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string gateway_security_policy_rule_id = 3; + * @param string $var + * @return $this + */ + public function setGatewaySecurityPolicyRuleId($var) + { + GPBUtil::checkString($var, True); + $this->gateway_security_policy_rule_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentGroupRequest.php new file mode 100644 index 000000000000..0e5c508ea380 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentGroupRequest.php @@ -0,0 +1,215 @@ +google.cloud.networksecurity.v1.CreateInterceptDeploymentGroupRequest + */ +class CreateInterceptDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this deployment group will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * Generated from protobuf field string intercept_deployment_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_deployment_group_id = ''; + /** + * Required. The deployment group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_deployment_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this deployment group will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see InterceptClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $interceptDeploymentGroup Required. The deployment group to create. + * @param string $interceptDeploymentGroupId Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $interceptDeploymentGroup, string $interceptDeploymentGroupId): self + { + return (new self()) + ->setParent($parent) + ->setInterceptDeploymentGroup($interceptDeploymentGroup) + ->setInterceptDeploymentGroupId($interceptDeploymentGroupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this deployment group will be created. + * Format: projects/{project}/locations/{location} + * @type string $intercept_deployment_group_id + * Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $intercept_deployment_group + * Required. The deployment group to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this deployment group will be created. + * Format: 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 parent resource where this deployment group will be created. + * Format: 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 ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * Generated from protobuf field string intercept_deployment_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInterceptDeploymentGroupId() + { + return $this->intercept_deployment_group_id; + } + + /** + * Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * Generated from protobuf field string intercept_deployment_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInterceptDeploymentGroupId($var) + { + GPBUtil::checkString($var, True); + $this->intercept_deployment_group_id = $var; + + return $this; + } + + /** + * Required. The deployment group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup|null + */ + public function getInterceptDeploymentGroup() + { + return $this->intercept_deployment_group; + } + + public function hasInterceptDeploymentGroup() + { + return isset($this->intercept_deployment_group); + } + + public function clearInterceptDeploymentGroup() + { + unset($this->intercept_deployment_group); + } + + /** + * Required. The deployment group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $var + * @return $this + */ + public function setInterceptDeploymentGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup::class); + $this->intercept_deployment_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentRequest.php new file mode 100644 index 000000000000..aa367a32b05f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentRequest.php @@ -0,0 +1,215 @@ +google.cloud.networksecurity.v1.CreateInterceptDeploymentRequest + */ +class CreateInterceptDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this deployment will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * Generated from protobuf field string intercept_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_deployment_id = ''; + /** + * Required. The deployment to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_deployment = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this deployment will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see InterceptClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeployment $interceptDeployment Required. The deployment to create. + * @param string $interceptDeploymentId Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\InterceptDeployment $interceptDeployment, string $interceptDeploymentId): self + { + return (new self()) + ->setParent($parent) + ->setInterceptDeployment($interceptDeployment) + ->setInterceptDeploymentId($interceptDeploymentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this deployment will be created. + * Format: projects/{project}/locations/{location} + * @type string $intercept_deployment_id + * Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptDeployment $intercept_deployment + * Required. The deployment to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this deployment will be created. + * Format: 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 parent resource where this deployment will be created. + * Format: 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 ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * Generated from protobuf field string intercept_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInterceptDeploymentId() + { + return $this->intercept_deployment_id; + } + + /** + * Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * Generated from protobuf field string intercept_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInterceptDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->intercept_deployment_id = $var; + + return $this; + } + + /** + * Required. The deployment to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptDeployment|null + */ + public function getInterceptDeployment() + { + return $this->intercept_deployment; + } + + public function hasInterceptDeployment() + { + return isset($this->intercept_deployment); + } + + public function clearInterceptDeployment() + { + unset($this->intercept_deployment); + } + + /** + * Required. The deployment to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeployment $var + * @return $this + */ + public function setInterceptDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptDeployment::class); + $this->intercept_deployment = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..40934f841c1e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupAssociationRequest.php @@ -0,0 +1,220 @@ +google.cloud.networksecurity.v1.CreateInterceptEndpointGroupAssociationRequest + */ +class CreateInterceptEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this association will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * Generated from protobuf field string intercept_endpoint_group_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $intercept_endpoint_group_association_id = ''; + /** + * Required. The association to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_association = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_endpoint_group_association = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this association will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see InterceptClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $interceptEndpointGroupAssociation Required. The association to create. + * @param string $interceptEndpointGroupAssociationId Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupAssociationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $interceptEndpointGroupAssociation, string $interceptEndpointGroupAssociationId): self + { + return (new self()) + ->setParent($parent) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation) + ->setInterceptEndpointGroupAssociationId($interceptEndpointGroupAssociationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this association will be created. + * Format: projects/{project}/locations/{location} + * @type string $intercept_endpoint_group_association_id + * Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $intercept_endpoint_group_association + * Required. The association to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this association will be created. + * Format: 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 parent resource where this association will be created. + * Format: 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 ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * Generated from protobuf field string intercept_endpoint_group_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInterceptEndpointGroupAssociationId() + { + return $this->intercept_endpoint_group_association_id; + } + + /** + * Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * Generated from protobuf field string intercept_endpoint_group_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInterceptEndpointGroupAssociationId($var) + { + GPBUtil::checkString($var, True); + $this->intercept_endpoint_group_association_id = $var; + + return $this; + } + + /** + * Required. The association to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation|null + */ + public function getInterceptEndpointGroupAssociation() + { + return $this->intercept_endpoint_group_association; + } + + public function hasInterceptEndpointGroupAssociation() + { + return isset($this->intercept_endpoint_group_association); + } + + public function clearInterceptEndpointGroupAssociation() + { + unset($this->intercept_endpoint_group_association); + } + + /** + * Required. The association to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $var + * @return $this + */ + public function setInterceptEndpointGroupAssociation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation::class); + $this->intercept_endpoint_group_association = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupRequest.php new file mode 100644 index 000000000000..19981424e6d5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupRequest.php @@ -0,0 +1,215 @@ +google.cloud.networksecurity.v1.CreateInterceptEndpointGroupRequest + */ +class CreateInterceptEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this endpoint group will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * Generated from protobuf field string intercept_endpoint_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_endpoint_group_id = ''; + /** + * Required. The endpoint group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_endpoint_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this endpoint group will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see InterceptClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $interceptEndpointGroup Required. The endpoint group to create. + * @param string $interceptEndpointGroupId Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $interceptEndpointGroup, string $interceptEndpointGroupId): self + { + return (new self()) + ->setParent($parent) + ->setInterceptEndpointGroup($interceptEndpointGroup) + ->setInterceptEndpointGroupId($interceptEndpointGroupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this endpoint group will be created. + * Format: projects/{project}/locations/{location} + * @type string $intercept_endpoint_group_id + * Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $intercept_endpoint_group + * Required. The endpoint group to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this endpoint group will be created. + * Format: 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 parent resource where this endpoint group will be created. + * Format: 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 ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * Generated from protobuf field string intercept_endpoint_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInterceptEndpointGroupId() + { + return $this->intercept_endpoint_group_id; + } + + /** + * Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * Generated from protobuf field string intercept_endpoint_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInterceptEndpointGroupId($var) + { + GPBUtil::checkString($var, True); + $this->intercept_endpoint_group_id = $var; + + return $this; + } + + /** + * Required. The endpoint group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup|null + */ + public function getInterceptEndpointGroup() + { + return $this->intercept_endpoint_group; + } + + public function hasInterceptEndpointGroup() + { + return isset($this->intercept_endpoint_group); + } + + public function clearInterceptEndpointGroup() + { + unset($this->intercept_endpoint_group); + } + + /** + * Required. The endpoint group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $var + * @return $this + */ + public function setInterceptEndpointGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup::class); + $this->intercept_endpoint_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentGroupRequest.php new file mode 100644 index 000000000000..7625bd9e3229 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentGroupRequest.php @@ -0,0 +1,215 @@ +google.cloud.networksecurity.v1.CreateMirroringDeploymentGroupRequest + */ +class CreateMirroringDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this deployment group will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * Generated from protobuf field string mirroring_deployment_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_deployment_group_id = ''; + /** + * Required. The deployment group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_deployment_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this deployment group will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see MirroringClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $mirroringDeploymentGroup Required. The deployment group to create. + * @param string $mirroringDeploymentGroupId Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateMirroringDeploymentGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $mirroringDeploymentGroup, string $mirroringDeploymentGroupId): self + { + return (new self()) + ->setParent($parent) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup) + ->setMirroringDeploymentGroupId($mirroringDeploymentGroupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this deployment group will be created. + * Format: projects/{project}/locations/{location} + * @type string $mirroring_deployment_group_id + * Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $mirroring_deployment_group + * Required. The deployment group to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this deployment group will be created. + * Format: 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 parent resource where this deployment group will be created. + * Format: 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 ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * Generated from protobuf field string mirroring_deployment_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMirroringDeploymentGroupId() + { + return $this->mirroring_deployment_group_id; + } + + /** + * Required. The ID to use for the new deployment group, which will become the + * final component of the deployment group's resource name. + * + * Generated from protobuf field string mirroring_deployment_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMirroringDeploymentGroupId($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_deployment_group_id = $var; + + return $this; + } + + /** + * Required. The deployment group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup|null + */ + public function getMirroringDeploymentGroup() + { + return $this->mirroring_deployment_group; + } + + public function hasMirroringDeploymentGroup() + { + return isset($this->mirroring_deployment_group); + } + + public function clearMirroringDeploymentGroup() + { + unset($this->mirroring_deployment_group); + } + + /** + * Required. The deployment group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $var + * @return $this + */ + public function setMirroringDeploymentGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup::class); + $this->mirroring_deployment_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentRequest.php new file mode 100644 index 000000000000..b25eb53ce2db --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentRequest.php @@ -0,0 +1,215 @@ +google.cloud.networksecurity.v1.CreateMirroringDeploymentRequest + */ +class CreateMirroringDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this deployment will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * Generated from protobuf field string mirroring_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_deployment_id = ''; + /** + * Required. The deployment to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_deployment = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this deployment will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see MirroringClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeployment $mirroringDeployment Required. The deployment to create. + * @param string $mirroringDeploymentId Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateMirroringDeploymentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\MirroringDeployment $mirroringDeployment, string $mirroringDeploymentId): self + { + return (new self()) + ->setParent($parent) + ->setMirroringDeployment($mirroringDeployment) + ->setMirroringDeploymentId($mirroringDeploymentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this deployment will be created. + * Format: projects/{project}/locations/{location} + * @type string $mirroring_deployment_id + * Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringDeployment $mirroring_deployment + * Required. The deployment to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this deployment will be created. + * Format: 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 parent resource where this deployment will be created. + * Format: 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 ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * Generated from protobuf field string mirroring_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMirroringDeploymentId() + { + return $this->mirroring_deployment_id; + } + + /** + * Required. The ID to use for the new deployment, which will become the final + * component of the deployment's resource name. + * + * Generated from protobuf field string mirroring_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMirroringDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_deployment_id = $var; + + return $this; + } + + /** + * Required. The deployment to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringDeployment|null + */ + public function getMirroringDeployment() + { + return $this->mirroring_deployment; + } + + public function hasMirroringDeployment() + { + return isset($this->mirroring_deployment); + } + + public function clearMirroringDeployment() + { + unset($this->mirroring_deployment); + } + + /** + * Required. The deployment to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeployment $var + * @return $this + */ + public function setMirroringDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringDeployment::class); + $this->mirroring_deployment = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..7058bb911a21 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupAssociationRequest.php @@ -0,0 +1,220 @@ +google.cloud.networksecurity.v1.CreateMirroringEndpointGroupAssociationRequest + */ +class CreateMirroringEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this association will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * Generated from protobuf field string mirroring_endpoint_group_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mirroring_endpoint_group_association_id = ''; + /** + * Required. The association to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_association = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_endpoint_group_association = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this association will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see MirroringClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $mirroringEndpointGroupAssociation Required. The association to create. + * @param string $mirroringEndpointGroupAssociationId Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateMirroringEndpointGroupAssociationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $mirroringEndpointGroupAssociation, string $mirroringEndpointGroupAssociationId): self + { + return (new self()) + ->setParent($parent) + ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation) + ->setMirroringEndpointGroupAssociationId($mirroringEndpointGroupAssociationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this association will be created. + * Format: projects/{project}/locations/{location} + * @type string $mirroring_endpoint_group_association_id + * Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $mirroring_endpoint_group_association + * Required. The association to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this association will be created. + * Format: 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 parent resource where this association will be created. + * Format: 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 ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * Generated from protobuf field string mirroring_endpoint_group_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMirroringEndpointGroupAssociationId() + { + return $this->mirroring_endpoint_group_association_id; + } + + /** + * Optional. The ID to use for the new association, which will become the + * final component of the endpoint group's resource name. If not provided, the + * server will generate a unique ID. + * + * Generated from protobuf field string mirroring_endpoint_group_association_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMirroringEndpointGroupAssociationId($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_endpoint_group_association_id = $var; + + return $this; + } + + /** + * Required. The association to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation|null + */ + public function getMirroringEndpointGroupAssociation() + { + return $this->mirroring_endpoint_group_association; + } + + public function hasMirroringEndpointGroupAssociation() + { + return isset($this->mirroring_endpoint_group_association); + } + + public function clearMirroringEndpointGroupAssociation() + { + unset($this->mirroring_endpoint_group_association); + } + + /** + * Required. The association to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $var + * @return $this + */ + public function setMirroringEndpointGroupAssociation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation::class); + $this->mirroring_endpoint_group_association = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupRequest.php new file mode 100644 index 000000000000..5bbbf3004f2c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupRequest.php @@ -0,0 +1,215 @@ +google.cloud.networksecurity.v1.CreateMirroringEndpointGroupRequest + */ +class CreateMirroringEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this endpoint group will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * Generated from protobuf field string mirroring_endpoint_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_endpoint_group_id = ''; + /** + * Required. The endpoint group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_endpoint_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this endpoint group will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see MirroringClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $mirroringEndpointGroup Required. The endpoint group to create. + * @param string $mirroringEndpointGroupId Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateMirroringEndpointGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $mirroringEndpointGroup, string $mirroringEndpointGroupId): self + { + return (new self()) + ->setParent($parent) + ->setMirroringEndpointGroup($mirroringEndpointGroup) + ->setMirroringEndpointGroupId($mirroringEndpointGroupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this endpoint group will be created. + * Format: projects/{project}/locations/{location} + * @type string $mirroring_endpoint_group_id + * Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $mirroring_endpoint_group + * Required. The endpoint group to create. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this endpoint group will be created. + * Format: 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 parent resource where this endpoint group will be created. + * Format: 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 ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * Generated from protobuf field string mirroring_endpoint_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMirroringEndpointGroupId() + { + return $this->mirroring_endpoint_group_id; + } + + /** + * Required. The ID to use for the endpoint group, which will become the final + * component of the endpoint group's resource name. + * + * Generated from protobuf field string mirroring_endpoint_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMirroringEndpointGroupId($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_endpoint_group_id = $var; + + return $this; + } + + /** + * Required. The endpoint group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup|null + */ + public function getMirroringEndpointGroup() + { + return $this->mirroring_endpoint_group; + } + + public function hasMirroringEndpointGroup() + { + return isset($this->mirroring_endpoint_group); + } + + public function clearMirroringEndpointGroup() + { + unset($this->mirroring_endpoint_group); + } + + /** + * Required. The endpoint group to create. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $var + * @return $this + */ + public function setMirroringEndpointGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup::class); + $this->mirroring_endpoint_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileGroupRequest.php new file mode 100644 index 000000000000..865d6ae268d0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileGroupRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateSecurityProfileGroupRequest + */ +class CreateSecurityProfileGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the SecurityProfileGroup. Must be in the + * format `projects|organizations/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the SecurityProfileGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "security_profile_group1". + * + * Generated from protobuf field string security_profile_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_profile_group_id = ''; + /** + * Required. SecurityProfileGroup resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_profile_group = null; + + /** + * @param string $parent Required. The parent resource of the SecurityProfileGroup. Must be in the + * format `projects|organizations/*/locations/{location}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::organizationLocationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $securityProfileGroup Required. SecurityProfileGroup resource to be created. + * @param string $securityProfileGroupId Required. Short name of the SecurityProfileGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "security_profile_group1". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateSecurityProfileGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $securityProfileGroup, string $securityProfileGroupId): self + { + return (new self()) + ->setParent($parent) + ->setSecurityProfileGroup($securityProfileGroup) + ->setSecurityProfileGroupId($securityProfileGroupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the SecurityProfileGroup. Must be in the + * format `projects|organizations/{@*}locations/{location}`. + * @type string $security_profile_group_id + * Required. Short name of the SecurityProfileGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "security_profile_group1". + * @type \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $security_profile_group + * Required. SecurityProfileGroup resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the SecurityProfileGroup. Must be in the + * format `projects|organizations/{@*}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 parent resource of the SecurityProfileGroup. Must be in the + * format `projects|organizations/{@*}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. Short name of the SecurityProfileGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "security_profile_group1". + * + * Generated from protobuf field string security_profile_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSecurityProfileGroupId() + { + return $this->security_profile_group_id; + } + + /** + * Required. Short name of the SecurityProfileGroup resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "security_profile_group1". + * + * Generated from protobuf field string security_profile_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSecurityProfileGroupId($var) + { + GPBUtil::checkString($var, True); + $this->security_profile_group_id = $var; + + return $this; + } + + /** + * Required. SecurityProfileGroup resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup|null + */ + public function getSecurityProfileGroup() + { + return $this->security_profile_group; + } + + public function hasSecurityProfileGroup() + { + return isset($this->security_profile_group); + } + + public function clearSecurityProfileGroup() + { + unset($this->security_profile_group); + } + + /** + * Required. SecurityProfileGroup resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $var + * @return $this + */ + public function setSecurityProfileGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup::class); + $this->security_profile_group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileRequest.php new file mode 100644 index 000000000000..9fa9a15f5850 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateSecurityProfileRequest + */ +class CreateSecurityProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the SecurityProfile. Must be in the format + * `projects|organizations/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the SecurityProfile resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "security_profile1". + * + * Generated from protobuf field string security_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_profile_id = ''; + /** + * Required. SecurityProfile resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile security_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_profile = null; + + /** + * @param string $parent Required. The parent resource of the SecurityProfile. Must be in the format + * `projects|organizations/*/locations/{location}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::organizationLocationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfile $securityProfile Required. SecurityProfile resource to be created. + * @param string $securityProfileId Required. Short name of the SecurityProfile resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "security_profile1". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateSecurityProfileRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\SecurityProfile $securityProfile, string $securityProfileId): self + { + return (new self()) + ->setParent($parent) + ->setSecurityProfile($securityProfile) + ->setSecurityProfileId($securityProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the SecurityProfile. Must be in the format + * `projects|organizations/{@*}locations/{location}`. + * @type string $security_profile_id + * Required. Short name of the SecurityProfile resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "security_profile1". + * @type \Google\Cloud\NetworkSecurity\V1\SecurityProfile $security_profile + * Required. SecurityProfile resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the SecurityProfile. Must be in the format + * `projects|organizations/{@*}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 parent resource of the SecurityProfile. Must be in the format + * `projects|organizations/{@*}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. Short name of the SecurityProfile resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "security_profile1". + * + * Generated from protobuf field string security_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSecurityProfileId() + { + return $this->security_profile_id; + } + + /** + * Required. Short name of the SecurityProfile resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "security_profile1". + * + * Generated from protobuf field string security_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSecurityProfileId($var) + { + GPBUtil::checkString($var, True); + $this->security_profile_id = $var; + + return $this; + } + + /** + * Required. SecurityProfile resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile security_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\SecurityProfile|null + */ + public function getSecurityProfile() + { + return $this->security_profile; + } + + public function hasSecurityProfile() + { + return isset($this->security_profile); + } + + public function clearSecurityProfile() + { + unset($this->security_profile); + } + + /** + * Required. SecurityProfile resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile security_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfile $var + * @return $this + */ + public function setSecurityProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\SecurityProfile::class); + $this->security_profile = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php new file mode 100644 index 000000000000..bee5acb2ba61 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest + */ +class CreateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". + * + * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $server_tls_policy_id = ''; + /** + * Required. ServerTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $server_tls_policy = null; + + /** + * @param string $parent Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. ServerTlsPolicy resource to be created. + * @param string $serverTlsPolicyId Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateServerTlsPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, string $serverTlsPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setServerTlsPolicy($serverTlsPolicy) + ->setServerTlsPolicyId($serverTlsPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/{@*}locations/{location}`. + * @type string $server_tls_policy_id + * Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". + * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy + * Required. ServerTlsPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/{@*}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 parent resource of the ServerTlsPolicy. Must be in + * the format `projects/{@*}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. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". + * + * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServerTlsPolicyId() + { + return $this->server_tls_policy_id; + } + + /** + * Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". + * + * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServerTlsPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->server_tls_policy_id = $var; + + return $this; + } + + /** + * Required. ServerTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null + */ + public function getServerTlsPolicy() + { + return $this->server_tls_policy; + } + + public function hasServerTlsPolicy() + { + return isset($this->server_tls_policy); + } + + public function clearServerTlsPolicy() + { + unset($this->server_tls_policy); + } + + /** + * Required. ServerTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var + * @return $this + */ + public function setServerTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); + $this->server_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateTlsInspectionPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateTlsInspectionPolicyRequest.php new file mode 100644 index 000000000000..e6eaa4b9388b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateTlsInspectionPolicyRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateTlsInspectionPolicyRequest + */ +class CreateTlsInspectionPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the TlsInspectionPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the TlsInspectionPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "tls_inspection_policy1". + * + * Generated from protobuf field string tls_inspection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tls_inspection_policy_id = ''; + /** + * Required. TlsInspectionPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tls_inspection_policy = null; + + /** + * @param string $parent Required. The parent resource of the TlsInspectionPolicy. Must be in the + * format `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy $tlsInspectionPolicy Required. TlsInspectionPolicy resource to be created. + * @param string $tlsInspectionPolicyId Required. Short name of the TlsInspectionPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "tls_inspection_policy1". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateTlsInspectionPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy $tlsInspectionPolicy, string $tlsInspectionPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setTlsInspectionPolicy($tlsInspectionPolicy) + ->setTlsInspectionPolicyId($tlsInspectionPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the TlsInspectionPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * @type string $tls_inspection_policy_id + * Required. Short name of the TlsInspectionPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "tls_inspection_policy1". + * @type \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy $tls_inspection_policy + * Required. TlsInspectionPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the TlsInspectionPolicy. Must be in the + * format `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 parent resource of the TlsInspectionPolicy. Must be in the + * format `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. Short name of the TlsInspectionPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "tls_inspection_policy1". + * + * Generated from protobuf field string tls_inspection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTlsInspectionPolicyId() + { + return $this->tls_inspection_policy_id; + } + + /** + * Required. Short name of the TlsInspectionPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "tls_inspection_policy1". + * + * Generated from protobuf field string tls_inspection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTlsInspectionPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->tls_inspection_policy_id = $var; + + return $this; + } + + /** + * Required. TlsInspectionPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy|null + */ + public function getTlsInspectionPolicy() + { + return $this->tls_inspection_policy; + } + + public function hasTlsInspectionPolicy() + { + return isset($this->tls_inspection_policy); + } + + public function clearTlsInspectionPolicy() + { + unset($this->tls_inspection_policy); + } + + /** + * Required. TlsInspectionPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy $var + * @return $this + */ + public function setTlsInspectionPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy::class); + $this->tls_inspection_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateUrlListRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateUrlListRequest.php new file mode 100644 index 000000000000..b362db8d3e5d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateUrlListRequest.php @@ -0,0 +1,178 @@ +google.cloud.networksecurity.v1.CreateUrlListRequest + */ +class CreateUrlListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the UrlList. Must be in + * the format `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the UrlList resource to be created. This value + * should be 1-63 characters long, containing only letters, numbers, hyphens, + * and underscores, and should not start with a number. E.g. "url_list". + * + * Generated from protobuf field string url_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url_list_id = ''; + /** + * Required. UrlList resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlList url_list = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url_list = null; + + /** + * @param string $parent Required. The parent resource of the UrlList. Must be in + * the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\UrlList $urlList Required. UrlList resource to be created. + * @param string $urlListId Required. Short name of the UrlList resource to be created. This value + * should be 1-63 characters long, containing only letters, numbers, hyphens, + * and underscores, and should not start with a number. E.g. "url_list". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateUrlListRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\UrlList $urlList, string $urlListId): self + { + return (new self()) + ->setParent($parent) + ->setUrlList($urlList) + ->setUrlListId($urlListId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the UrlList. Must be in + * the format `projects/{@*}locations/{location}`. + * @type string $url_list_id + * Required. Short name of the UrlList resource to be created. This value + * should be 1-63 characters long, containing only letters, numbers, hyphens, + * and underscores, and should not start with a number. E.g. "url_list". + * @type \Google\Cloud\NetworkSecurity\V1\UrlList $url_list + * Required. UrlList resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the UrlList. Must be in + * the format `projects/{@*}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 parent resource of the UrlList. Must be in + * the format `projects/{@*}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. Short name of the UrlList resource to be created. This value + * should be 1-63 characters long, containing only letters, numbers, hyphens, + * and underscores, and should not start with a number. E.g. "url_list". + * + * Generated from protobuf field string url_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUrlListId() + { + return $this->url_list_id; + } + + /** + * Required. Short name of the UrlList resource to be created. This value + * should be 1-63 characters long, containing only letters, numbers, hyphens, + * and underscores, and should not start with a number. E.g. "url_list". + * + * Generated from protobuf field string url_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUrlListId($var) + { + GPBUtil::checkString($var, True); + $this->url_list_id = $var; + + return $this; + } + + /** + * Required. UrlList resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlList url_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\UrlList|null + */ + public function getUrlList() + { + return $this->url_list; + } + + public function hasUrlList() + { + return isset($this->url_list); + } + + public function clearUrlList() + { + unset($this->url_list); + } + + /** + * Required. UrlList resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlList url_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\UrlList $var + * @return $this + */ + public function setUrlList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\UrlList::class); + $this->url_list = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomInterceptProfile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomInterceptProfile.php new file mode 100644 index 000000000000..c3fbce4b62d2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomInterceptProfile.php @@ -0,0 +1,76 @@ +google.cloud.networksecurity.v1.CustomInterceptProfile + */ +class CustomInterceptProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The target InterceptEndpointGroup. + * When a firewall rule with this security profile attached matches a packet, + * the packet will be intercepted to the location-local target in this group. + * + * Generated from protobuf field string intercept_endpoint_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $intercept_endpoint_group = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $intercept_endpoint_group + * Required. The target InterceptEndpointGroup. + * When a firewall rule with this security profile attached matches a packet, + * the packet will be intercepted to the location-local target in this group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupIntercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The target InterceptEndpointGroup. + * When a firewall rule with this security profile attached matches a packet, + * the packet will be intercepted to the location-local target in this group. + * + * Generated from protobuf field string intercept_endpoint_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getInterceptEndpointGroup() + { + return $this->intercept_endpoint_group; + } + + /** + * Required. The target InterceptEndpointGroup. + * When a firewall rule with this security profile attached matches a packet, + * the packet will be intercepted to the location-local target in this group. + * + * Generated from protobuf field string intercept_endpoint_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInterceptEndpointGroup($var) + { + GPBUtil::checkString($var, True); + $this->intercept_endpoint_group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomMirroringProfile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomMirroringProfile.php new file mode 100644 index 000000000000..c7da9adb6184 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomMirroringProfile.php @@ -0,0 +1,76 @@ +google.cloud.networksecurity.v1.CustomMirroringProfile + */ +class CustomMirroringProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. The target MirroringEndpointGroup. + * When a mirroring rule with this security profile attached matches a packet, + * a replica will be mirrored to the location-local target in this group. + * + * Generated from protobuf field string mirroring_endpoint_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $mirroring_endpoint_group = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mirroring_endpoint_group + * Required. Immutable. The target MirroringEndpointGroup. + * When a mirroring rule with this security profile attached matches a packet, + * a replica will be mirrored to the location-local target in this group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupMirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. The target MirroringEndpointGroup. + * When a mirroring rule with this security profile attached matches a packet, + * a replica will be mirrored to the location-local target in this group. + * + * Generated from protobuf field string mirroring_endpoint_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getMirroringEndpointGroup() + { + return $this->mirroring_endpoint_group; + } + + /** + * Required. Immutable. The target MirroringEndpointGroup. + * When a mirroring rule with this security profile attached matches a packet, + * a replica will be mirrored to the location-local target in this group. + * + * Generated from protobuf field string mirroring_endpoint_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMirroringEndpointGroup($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_endpoint_group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php new file mode 100644 index 000000000000..b66da99720b6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php @@ -0,0 +1,160 @@ +google.cloud.networksecurity.v1.DeleteAddressGroupRequest + */ +class DeleteAddressGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AddressGroup to delete. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. A name of the AddressGroup to delete. Must be in the format + * `projects/*/locations/{location}/addressGroups/*`. Please see + * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteAddressGroupRequest + * + * @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. A name of the AddressGroup to delete. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AddressGroup to delete. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * + * 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. A name of the AddressGroup to delete. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..06679bb78539 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest + */ +class DeleteAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see + * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteAuthorizationPolicyRequest + * + * @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. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * 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. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthzPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthzPolicyRequest.php new file mode 100644 index 000000000000..dac0c6bdf2d7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthzPolicyRequest.php @@ -0,0 +1,165 @@ +google.cloud.networksecurity.v1.DeleteAuthzPolicyRequest + */ +class DeleteAuthzPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `AuthzPolicy` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the `AuthzPolicy` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. Please see + * {@see NetworkSecurityClient::authzPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteAuthzPolicyRequest + * + * @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 name of the `AuthzPolicy` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `AuthzPolicy` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the `AuthzPolicy` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteBackendAuthenticationConfigRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteBackendAuthenticationConfigRequest.php new file mode 100644 index 000000000000..88342a141ec4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteBackendAuthenticationConfigRequest.php @@ -0,0 +1,129 @@ +google.cloud.networksecurity.v1.DeleteBackendAuthenticationConfigRequest + */ +class DeleteBackendAuthenticationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the BackendAuthenticationConfig to delete. Must be in + * the format + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Etag of the resource. + * If this is provided, it must match the server's etag. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. A name of the BackendAuthenticationConfig to delete. Must be in + * the format + * `projects/*/locations/{location}/backendAuthenticationConfigs/*`. Please see + * {@see NetworkSecurityClient::backendAuthenticationConfigName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteBackendAuthenticationConfigRequest + * + * @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. A name of the BackendAuthenticationConfig to delete. Must be in + * the format + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * @type string $etag + * Optional. Etag of the resource. + * If this is provided, it must match the server's etag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the BackendAuthenticationConfig to delete. Must be in + * the format + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * + * 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. A name of the BackendAuthenticationConfig to delete. Must be in + * the format + * `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * + * 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. Etag of the resource. + * If this is provided, it must match the server's etag. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. Etag of the resource. + * If this is provided, it must match the server's etag. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php new file mode 100644 index 000000000000..68a17745138e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest + */ +class DeleteClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/clientTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteClientTlsPolicyRequest + * + * @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. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * + * 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. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteDnsThreatDetectorRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteDnsThreatDetectorRequest.php new file mode 100644 index 000000000000..c0009d15e6f3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteDnsThreatDetectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.networksecurity.v1.DeleteDnsThreatDetectorRequest + */ +class DeleteDnsThreatDetectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the DnsThreatDetector 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 DnsThreatDetector resource. Please see + * {@see DnsThreatDetectorServiceClient::dnsThreatDetectorName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteDnsThreatDetectorRequest + * + * @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 DnsThreatDetector resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\DnsThreatDetector::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the DnsThreatDetector 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 DnsThreatDetector 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointAssociationRequest.php new file mode 100644 index 000000000000..5e6b9079ec5e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointAssociationRequest.php @@ -0,0 +1,155 @@ +google.cloud.networksecurity.v1.DeleteFirewallEndpointAssociationRequest + */ +class DeleteFirewallEndpointAssociationRequest 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 = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see FirewallActivationClient::firewallEndpointAssociationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteFirewallEndpointAssociationRequest + * + * @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 + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::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; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointRequest.php new file mode 100644 index 000000000000..99fb548a4d8b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointRequest.php @@ -0,0 +1,155 @@ +google.cloud.networksecurity.v1.DeleteFirewallEndpointRequest + */ +class DeleteFirewallEndpointRequest 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 = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see FirewallActivationClient::firewallEndpointName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteFirewallEndpointRequest + * + * @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 + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::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; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRequest.php new file mode 100644 index 000000000000..5685672536f9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRequest + */ +class DeleteGatewaySecurityPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the GatewaySecurityPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the GatewaySecurityPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. Please see + * {@see NetworkSecurityClient::gatewaySecurityPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteGatewaySecurityPolicyRequest + * + * @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. A name of the GatewaySecurityPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the GatewaySecurityPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * + * 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. A name of the GatewaySecurityPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRuleRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRuleRequest.php new file mode 100644 index 000000000000..851b221ad62a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRuleRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRuleRequest + */ +class DeleteGatewaySecurityPolicyRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the GatewaySecurityPolicyRule to delete. Must be in the + * format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the GatewaySecurityPolicyRule to delete. Must be in the + * format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`. Please see + * {@see NetworkSecurityClient::gatewaySecurityPolicyRuleName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteGatewaySecurityPolicyRuleRequest + * + * @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. A name of the GatewaySecurityPolicyRule to delete. Must be in the + * format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the GatewaySecurityPolicyRule to delete. Must be in the + * format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`. + * + * 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. A name of the GatewaySecurityPolicyRule to delete. Must be in the + * format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentGroupRequest.php new file mode 100644 index 000000000000..9dbea1dd24fe --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentGroupRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteInterceptDeploymentGroupRequest + */ +class DeleteInterceptDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The deployment group to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The deployment group to delete. Please see + * {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentGroupRequest + * + * @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 deployment group to delete. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The deployment group to delete. + * + * 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 deployment group to delete. + * + * 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. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentRequest.php new file mode 100644 index 000000000000..639385545621 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteInterceptDeploymentRequest + */ +class DeleteInterceptDeploymentRequest 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 = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see InterceptClient::interceptDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentRequest + * + * @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 + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::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; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..8a51d046723c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupAssociationRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteInterceptEndpointGroupAssociationRequest + */ +class DeleteInterceptEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The association to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The association to delete. Please see + * {@see InterceptClient::interceptEndpointGroupAssociationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupAssociationRequest + * + * @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 association to delete. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The association to delete. + * + * 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 association to delete. + * + * 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. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupRequest.php new file mode 100644 index 000000000000..2b668a700af4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteInterceptEndpointGroupRequest + */ +class DeleteInterceptEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The endpoint group to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The endpoint group to delete. Please see + * {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupRequest + * + * @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 endpoint group to delete. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The endpoint group to delete. + * + * 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 endpoint group to delete. + * + * 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. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentGroupRequest.php new file mode 100644 index 000000000000..006697e67716 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentGroupRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteMirroringDeploymentGroupRequest + */ +class DeleteMirroringDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The deployment group to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The deployment group to delete. Please see + * {@see MirroringClient::mirroringDeploymentGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteMirroringDeploymentGroupRequest + * + * @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 deployment group to delete. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The deployment group to delete. + * + * 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 deployment group to delete. + * + * 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. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentRequest.php new file mode 100644 index 000000000000..d8ac5faed3fa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteMirroringDeploymentRequest + */ +class DeleteMirroringDeploymentRequest 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 = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see MirroringClient::mirroringDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteMirroringDeploymentRequest + * + * @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 + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::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; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..0ab65071b5c2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupAssociationRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteMirroringEndpointGroupAssociationRequest + */ +class DeleteMirroringEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The association to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The association to delete. Please see + * {@see MirroringClient::mirroringEndpointGroupAssociationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteMirroringEndpointGroupAssociationRequest + * + * @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 association to delete. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The association to delete. + * + * 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 association to delete. + * + * 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. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupRequest.php new file mode 100644 index 000000000000..5dd86772f587 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupRequest.php @@ -0,0 +1,123 @@ +google.cloud.networksecurity.v1.DeleteMirroringEndpointGroupRequest + */ +class DeleteMirroringEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The endpoint group to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The endpoint group to delete. Please see + * {@see MirroringClient::mirroringEndpointGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteMirroringEndpointGroupRequest + * + * @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 endpoint group to delete. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The endpoint group to delete. + * + * 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 endpoint group to delete. + * + * 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. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileGroupRequest.php new file mode 100644 index 000000000000..2273539d30ac --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileGroupRequest.php @@ -0,0 +1,129 @@ +google.cloud.networksecurity.v1.DeleteSecurityProfileGroupRequest + */ +class DeleteSecurityProfileGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the SecurityProfileGroup to delete. Must be in the + * format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. A name of the SecurityProfileGroup to delete. Must be in the + * format + * `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::securityProfileGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteSecurityProfileGroupRequest + * + * @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. A name of the SecurityProfileGroup to delete. Must be in the + * format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * @type string $etag + * Optional. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the SecurityProfileGroup to delete. Must be in the + * format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * 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. A name of the SecurityProfileGroup to delete. Must be in the + * format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * 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. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileRequest.php new file mode 100644 index 000000000000..1531f7f355f6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileRequest.php @@ -0,0 +1,124 @@ +google.cloud.networksecurity.v1.DeleteSecurityProfileRequest + */ +class DeleteSecurityProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the SecurityProfile to delete. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. A name of the SecurityProfile to delete. Must be in the format + * `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::securityProfileName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteSecurityProfileRequest + * + * @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. A name of the SecurityProfile to delete. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * @type string $etag + * Optional. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the SecurityProfile to delete. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the SecurityProfile to delete. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. If client provided etag is out of date, delete will return + * FAILED_PRECONDITION error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php new file mode 100644 index 000000000000..c9472fa2ccbc --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest + */ +class DeleteServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/serverTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteServerTlsPolicyRequest + * + * @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. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * + * 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. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteTlsInspectionPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteTlsInspectionPolicyRequest.php new file mode 100644 index 000000000000..a518e9a17c7e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteTlsInspectionPolicyRequest.php @@ -0,0 +1,133 @@ +google.cloud.networksecurity.v1.DeleteTlsInspectionPolicyRequest + */ +class DeleteTlsInspectionPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TlsInspectionPolicy to delete. Must be in the + * format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, any rules for this TlsInspectionPolicy will also be + * deleted. (Otherwise, the request will only work if the TlsInspectionPolicy + * has no rules.) + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. A name of the TlsInspectionPolicy to delete. Must be in the + * format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. Please see + * {@see NetworkSecurityClient::tlsInspectionPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteTlsInspectionPolicyRequest + * + * @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. A name of the TlsInspectionPolicy to delete. Must be in the + * format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * @type bool $force + * If set to true, any rules for this TlsInspectionPolicy will also be + * deleted. (Otherwise, the request will only work if the TlsInspectionPolicy + * has no rules.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TlsInspectionPolicy to delete. Must be in the + * format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * + * 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. A name of the TlsInspectionPolicy to delete. Must be in the + * format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * + * 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; + } + + /** + * If set to true, any rules for this TlsInspectionPolicy will also be + * deleted. (Otherwise, the request will only work if the TlsInspectionPolicy + * has no rules.) + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If set to true, any rules for this TlsInspectionPolicy will also be + * deleted. (Otherwise, the request will only work if the TlsInspectionPolicy + * has no rules.) + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteUrlListRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteUrlListRequest.php new file mode 100644 index 000000000000..4847f6eaae78 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteUrlListRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteUrlListRequest + */ +class DeleteUrlListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the UrlList to delete. Must be in + * the format `projects/{@*}locations/{location}/urlLists/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the UrlList to delete. Must be in + * the format `projects/*/locations/{location}/urlLists/*`. Please see + * {@see NetworkSecurityClient::urlListName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteUrlListRequest + * + * @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. A name of the UrlList to delete. Must be in + * the format `projects/{@*}locations/{location}/urlLists/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the UrlList to delete. Must be in + * the format `projects/{@*}locations/{location}/urlLists/*`. + * + * 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. A name of the UrlList to delete. Must be in + * the format `projects/{@*}locations/{location}/urlLists/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector.php new file mode 100644 index 000000000000..3fe85ed5d1a9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector.php @@ -0,0 +1,276 @@ +google.cloud.networksecurity.v1.DnsThreatDetector + */ +class DnsThreatDetector extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. Name of the DnsThreatDetector resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Any labels associated with the DnsThreatDetector, listed as key + * value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. A list of network resource names which aren't monitored by this + * DnsThreatDetector. + * Example: + * `projects/PROJECT_ID/global/networks/NETWORK_NAME`. + * + * Generated from protobuf field repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_networks; + /** + * Required. The provider used for DNS threat analysis. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $provider = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. Name of the DnsThreatDetector resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update time stamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Any labels associated with the DnsThreatDetector, listed as key + * value pairs. + * @type string[] $excluded_networks + * Optional. A list of network resource names which aren't monitored by this + * DnsThreatDetector. + * Example: + * `projects/PROJECT_ID/global/networks/NETWORK_NAME`. + * @type int $provider + * Required. The provider used for DNS threat analysis. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\DnsThreatDetector::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. Name of the DnsThreatDetector resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. Name of the DnsThreatDetector resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Update time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Update time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Any labels associated with the DnsThreatDetector, listed as key + * value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Any labels associated with the DnsThreatDetector, listed as key + * value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. A list of network resource names which aren't monitored by this + * DnsThreatDetector. + * Example: + * `projects/PROJECT_ID/global/networks/NETWORK_NAME`. + * + * Generated from protobuf field repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getExcludedNetworks() + { + return $this->excluded_networks; + } + + /** + * Optional. A list of network resource names which aren't monitored by this + * DnsThreatDetector. + * Example: + * `projects/PROJECT_ID/global/networks/NETWORK_NAME`. + * + * Generated from protobuf field repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setExcludedNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_networks = $arr; + + return $this; + } + + /** + * Required. The provider used for DNS threat analysis. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getProvider() + { + return $this->provider; + } + + /** + * Required. The provider used for DNS threat analysis. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setProvider($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector\Provider::class); + $this->provider = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector/Provider.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector/Provider.php new file mode 100644 index 000000000000..96e9e6acc3e7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector/Provider.php @@ -0,0 +1,54 @@ +google.cloud.networksecurity.v1.DnsThreatDetector.Provider + */ +class Provider +{ + /** + * An unspecified provider. + * + * Generated from protobuf enum PROVIDER_UNSPECIFIED = 0; + */ + const PROVIDER_UNSPECIFIED = 0; + /** + * The Infoblox DNS threat detector provider. + * + * Generated from protobuf enum INFOBLOX = 1; + */ + const INFOBLOX = 1; + + private static $valueToName = [ + self::PROVIDER_UNSPECIFIED => 'PROVIDER_UNSPECIFIED', + self::INFOBLOX => 'INFOBLOX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint.php new file mode 100644 index 000000000000..5d6194ea20d1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint.php @@ -0,0 +1,574 @@ +google.cloud.networksecurity.v1.FirewallEndpoint + */ +class FirewallEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Description of the firewall endpoint. Max length 2048 + * characters. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Current state of the endpoint. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. List of networks that are associated with this endpoint in the + * local zone. This is a projection of the FirewallEndpointAssociations + * pointing at this endpoint. A network will only appear in this list after + * traffic routing is fully configured. Format: + * projects/{project}/global/networks/{name}. + * + * Generated from protobuf field repeated string associated_networks = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + private $associated_networks; + /** + * Output only. List of FirewallEndpointAssociations that are associated to + * this endpoint. An association will only appear in this list after traffic + * routing is fully configured. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpoint.AssociationReference associations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $associations; + /** + * Output only. [Output Only] Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + /** + * Output only. [Output Only] Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = null; + /** + * Optional. Project to charge for the deployed firewall endpoint. + * This field must be specified when creating the endpoint in the organization + * scope, and should be omitted otherwise. + * + * Generated from protobuf field string billing_project_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $billing_project_id = ''; + /** + * Optional. Settings for the endpoint. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint.EndpointSettings endpoint_settings = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $endpoint_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. Name of resource. + * @type string $description + * Optional. Description of the firewall endpoint. Max length 2048 + * characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update time stamp + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs + * @type int $state + * Output only. Current state of the endpoint. + * @type bool $reconciling + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * @type string[] $associated_networks + * Output only. List of networks that are associated with this endpoint in the + * local zone. This is a projection of the FirewallEndpointAssociations + * pointing at this endpoint. A network will only appear in this list after + * traffic routing is fully configured. Format: + * projects/{project}/global/networks/{name}. + * @type \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\AssociationReference[] $associations + * Output only. List of FirewallEndpointAssociations that are associated to + * this endpoint. An association will only appear in this list after traffic + * routing is fully configured. + * @type bool $satisfies_pzs + * Output only. [Output Only] Reserved for future use. + * @type bool $satisfies_pzi + * Output only. [Output Only] Reserved for future use. + * @type string $billing_project_id + * Optional. Project to charge for the deployed firewall endpoint. + * This field must be specified when creating the endpoint in the organization + * scope, and should be omitted otherwise. + * @type \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\EndpointSettings $endpoint_settings + * Optional. Settings for the endpoint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Description of the firewall endpoint. Max length 2048 + * characters. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the firewall endpoint. Max length 2048 + * characters. + * + * Generated from protobuf field string description = 9 [(.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. Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels as key value pairs + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Current state of the endpoint. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the endpoint. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. List of networks that are associated with this endpoint in the + * local zone. This is a projection of the FirewallEndpointAssociations + * pointing at this endpoint. A network will only appear in this list after + * traffic routing is fully configured. Format: + * projects/{project}/global/networks/{name}. + * + * Generated from protobuf field repeated string associated_networks = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + * @deprecated + */ + public function getAssociatedNetworks() + { + if ($this->associated_networks->count() !== 0) { + @trigger_error('associated_networks is deprecated.', E_USER_DEPRECATED); + } + return $this->associated_networks; + } + + /** + * Output only. List of networks that are associated with this endpoint in the + * local zone. This is a projection of the FirewallEndpointAssociations + * pointing at this endpoint. A network will only appear in this list after + * traffic routing is fully configured. Format: + * projects/{project}/global/networks/{name}. + * + * Generated from protobuf field repeated string associated_networks = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + * @deprecated + */ + public function setAssociatedNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + if ($arr->count() !== 0) { + @trigger_error('associated_networks is deprecated.', E_USER_DEPRECATED); + } + $this->associated_networks = $arr; + + return $this; + } + + /** + * Output only. List of FirewallEndpointAssociations that are associated to + * this endpoint. An association will only appear in this list after traffic + * routing is fully configured. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpoint.AssociationReference associations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\AssociationReference> + */ + public function getAssociations() + { + return $this->associations; + } + + /** + * Output only. List of FirewallEndpointAssociations that are associated to + * this endpoint. An association will only appear in this list after traffic + * routing is fully configured. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpoint.AssociationReference associations = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\AssociationReference[] $var + * @return $this + */ + public function setAssociations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\AssociationReference::class); + $this->associations = $arr; + + return $this; + } + + /** + * Output only. [Output Only] Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Output only. [Output Only] Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. [Output Only] Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Output only. [Output Only] Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * Optional. Project to charge for the deployed firewall endpoint. + * This field must be specified when creating the endpoint in the organization + * scope, and should be omitted otherwise. + * + * Generated from protobuf field string billing_project_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBillingProjectId() + { + return $this->billing_project_id; + } + + /** + * Optional. Project to charge for the deployed firewall endpoint. + * This field must be specified when creating the endpoint in the organization + * scope, and should be omitted otherwise. + * + * Generated from protobuf field string billing_project_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBillingProjectId($var) + { + GPBUtil::checkString($var, True); + $this->billing_project_id = $var; + + return $this; + } + + /** + * Optional. Settings for the endpoint. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint.EndpointSettings endpoint_settings = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\EndpointSettings|null + */ + public function getEndpointSettings() + { + return $this->endpoint_settings; + } + + public function hasEndpointSettings() + { + return isset($this->endpoint_settings); + } + + public function clearEndpointSettings() + { + unset($this->endpoint_settings); + } + + /** + * Optional. Settings for the endpoint. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint.EndpointSettings endpoint_settings = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\EndpointSettings $var + * @return $this + */ + public function setEndpointSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint\EndpointSettings::class); + $this->endpoint_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/AssociationReference.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/AssociationReference.php new file mode 100644 index 000000000000..e48f3b99bf6b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/AssociationReference.php @@ -0,0 +1,114 @@ +google.cloud.networksecurity.v1.FirewallEndpoint.AssociationReference + */ +class AssociationReference extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the FirewallEndpointAssociation. + * Format: + * projects/{project}/locations/{location}/firewallEndpointAssociations/{id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The VPC network associated. Format: + * projects/{project}/global/networks/{name}. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the FirewallEndpointAssociation. + * Format: + * projects/{project}/locations/{location}/firewallEndpointAssociations/{id} + * @type string $network + * Output only. The VPC network associated. Format: + * projects/{project}/global/networks/{name}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the FirewallEndpointAssociation. + * Format: + * projects/{project}/locations/{location}/firewallEndpointAssociations/{id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the FirewallEndpointAssociation. + * Format: + * projects/{project}/locations/{location}/firewallEndpointAssociations/{id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The VPC network associated. Format: + * projects/{project}/global/networks/{name}. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. The VPC network associated. Format: + * projects/{project}/global/networks/{name}. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/EndpointSettings.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/EndpointSettings.php new file mode 100644 index 000000000000..0d5d9d5c13a9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/EndpointSettings.php @@ -0,0 +1,71 @@ +google.cloud.networksecurity.v1.FirewallEndpoint.EndpointSettings + */ +class EndpointSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Immutable. Indicates whether Jumbo Frames are enabled. + * Default value is false. + * + * Generated from protobuf field bool jumbo_frames_enabled = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $jumbo_frames_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $jumbo_frames_enabled + * Optional. Immutable. Indicates whether Jumbo Frames are enabled. + * Default value is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Immutable. Indicates whether Jumbo Frames are enabled. + * Default value is false. + * + * Generated from protobuf field bool jumbo_frames_enabled = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return bool + */ + public function getJumboFramesEnabled() + { + return $this->jumbo_frames_enabled; + } + + /** + * Optional. Immutable. Indicates whether Jumbo Frames are enabled. + * Default value is false. + * + * Generated from protobuf field bool jumbo_frames_enabled = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param bool $var + * @return $this + */ + public function setJumboFramesEnabled($var) + { + GPBUtil::checkBool($var); + $this->jumbo_frames_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/State.php new file mode 100644 index 000000000000..cb151b99a728 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/State.php @@ -0,0 +1,75 @@ +google.cloud.networksecurity.v1.FirewallEndpoint.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Processing configuration updates. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Down or in an error state. + * + * Generated from protobuf enum INACTIVE = 4; + */ + const INACTIVE = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + 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); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation.php new file mode 100644 index 000000000000..d2c83dcf78dd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation.php @@ -0,0 +1,401 @@ +google.cloud.networksecurity.v1.FirewallEndpointAssociation + */ +class FirewallEndpointAssociation extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Current state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. The URL of the network that is being associated. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network = ''; + /** + * Required. The URL of the FirewallEndpoint that is being associated. + * + * Generated from protobuf field string firewall_endpoint = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_endpoint = ''; + /** + * Optional. The URL of the TlsInspectionPolicy that is being associated. + * + * Generated from protobuf field string tls_inspection_policy = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $tls_inspection_policy = ''; + /** + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. Whether the association is disabled. + * True indicates that traffic won't be intercepted + * + * Generated from protobuf field bool disabled = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. name of resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time stamp + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update time stamp + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs + * @type int $state + * Output only. Current state of the association. + * @type string $network + * Required. The URL of the network that is being associated. + * @type string $firewall_endpoint + * Required. The URL of the FirewallEndpoint that is being associated. + * @type string $tls_inspection_policy + * Optional. The URL of the TlsInspectionPolicy that is being associated. + * @type bool $reconciling + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * @type bool $disabled + * Optional. Whether the association is disabled. + * True indicates that traffic won't be intercepted + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.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. Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels as key value pairs + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Current state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. The URL of the network that is being associated. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. The URL of the network that is being associated. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Required. The URL of the FirewallEndpoint that is being associated. + * + * Generated from protobuf field string firewall_endpoint = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFirewallEndpoint() + { + return $this->firewall_endpoint; + } + + /** + * Required. The URL of the FirewallEndpoint that is being associated. + * + * Generated from protobuf field string firewall_endpoint = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFirewallEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->firewall_endpoint = $var; + + return $this; + } + + /** + * Optional. The URL of the TlsInspectionPolicy that is being associated. + * + * Generated from protobuf field string tls_inspection_policy = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTlsInspectionPolicy() + { + return $this->tls_inspection_policy; + } + + /** + * Optional. The URL of the TlsInspectionPolicy that is being associated. + * + * Generated from protobuf field string tls_inspection_policy = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTlsInspectionPolicy($var) + { + GPBUtil::checkString($var, True); + $this->tls_inspection_policy = $var; + + return $this; + } + + /** + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Whether reconciling is in progress, recommended per + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. Whether the association is disabled. + * True indicates that traffic won't be intercepted + * + * Generated from protobuf field bool disabled = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Optional. Whether the association is disabled. + * True indicates that traffic won't be intercepted + * + * Generated from protobuf field bool disabled = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation/State.php new file mode 100644 index 000000000000..6c8a678f0be7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation/State.php @@ -0,0 +1,82 @@ +google.cloud.networksecurity.v1.FirewallEndpointAssociation.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Active and ready for traffic. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Down or in an error state. + * + * Generated from protobuf enum INACTIVE = 4; + */ + const INACTIVE = 4; + /** + * The project that housed the association has been deleted. + * + * Generated from protobuf enum ORPHAN = 5; + */ + const ORPHAN = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::INACTIVE => 'INACTIVE', + self::ORPHAN => 'ORPHAN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicy.php new file mode 100644 index 000000000000..05188c0f6eb4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicy.php @@ -0,0 +1,240 @@ +google.cloud.networksecurity.v1.GatewaySecurityPolicy + */ +class GatewaySecurityPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} + * gateway_security_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Name of a TLS Inspection Policy resource that defines how TLS + * inspection will be performed for any rule(s) which enables it. + * + * Generated from protobuf field string tls_inspection_policy = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $tls_inspection_policy = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} + * gateway_security_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $description + * Optional. Free-text description of the resource. + * @type string $tls_inspection_policy + * Optional. Name of a TLS Inspection Policy resource that defines how TLS + * inspection will be performed for any rule(s) which enables it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} + * gateway_security_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} + * gateway_security_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Free-text description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Name of a TLS Inspection Policy resource that defines how TLS + * inspection will be performed for any rule(s) which enables it. + * + * Generated from protobuf field string tls_inspection_policy = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTlsInspectionPolicy() + { + return $this->tls_inspection_policy; + } + + /** + * Optional. Name of a TLS Inspection Policy resource that defines how TLS + * inspection will be performed for any rule(s) which enables it. + * + * Generated from protobuf field string tls_inspection_policy = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTlsInspectionPolicy($var) + { + GPBUtil::checkString($var, True); + $this->tls_inspection_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule.php new file mode 100644 index 000000000000..44ca6fcc4b8e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule.php @@ -0,0 +1,427 @@ +google.cloud.networksecurity.v1.GatewaySecurityPolicyRule + */ +class GatewaySecurityPolicyRule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. Name of the resource. ame is the full resource name so + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} + * rule should match the + * pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. Time when the rule was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time when the rule was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. Whether the rule is enforced. + * + * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $enabled = false; + /** + * Required. Priority of the rule. + * Lower number corresponds to higher precedence. + * + * Generated from protobuf field int32 priority = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $priority = 0; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. CEL expression for matching on session criteria. + * + * Generated from protobuf field string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_matcher = ''; + /** + * Optional. CEL expression for matching on L7/application level criteria. + * + * Generated from protobuf field string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $application_matcher = ''; + /** + * Optional. Flag to enable TLS inspection of traffic matching on + * , can only be true if the parent GatewaySecurityPolicy + * references a TLSInspectionConfig. + * + * Generated from protobuf field bool tls_inspection_enabled = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tls_inspection_enabled = false; + protected $profile; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $basic_profile + * Required. Profile which tells what the primitive action should be. + * @type string $name + * Required. Immutable. Name of the resource. ame is the full resource name so + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} + * rule should match the + * pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the rule was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when the rule was updated. + * @type bool $enabled + * Required. Whether the rule is enforced. + * @type int $priority + * Required. Priority of the rule. + * Lower number corresponds to higher precedence. + * @type string $description + * Optional. Free-text description of the resource. + * @type string $session_matcher + * Required. CEL expression for matching on session criteria. + * @type string $application_matcher + * Optional. CEL expression for matching on L7/application level criteria. + * @type bool $tls_inspection_enabled + * Optional. Flag to enable TLS inspection of traffic matching on + * , can only be true if the parent GatewaySecurityPolicy + * references a TLSInspectionConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); + parent::__construct($data); + } + + /** + * Required. Profile which tells what the primitive action should be. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBasicProfile() + { + return $this->readOneof(9); + } + + public function hasBasicProfile() + { + return $this->hasOneof(9); + } + + /** + * Required. Profile which tells what the primitive action should be. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBasicProfile($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule\BasicProfile::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Required. Immutable. Name of the resource. ame is the full resource name so + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} + * rule should match the + * pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Immutable. Name of the resource. ame is the full resource name so + * projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} + * rule should match the + * pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Time when the rule was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when the rule was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when the rule was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Time when the rule was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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; + } + + /** + * Required. Whether the rule is enforced. + * + * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Required. Whether the rule is enforced. + * + * Generated from protobuf field bool enabled = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Required. Priority of the rule. + * Lower number corresponds to higher precedence. + * + * Generated from protobuf field int32 priority = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Required. Priority of the rule. + * Lower number corresponds to higher precedence. + * + * Generated from protobuf field int32 priority = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. CEL expression for matching on session criteria. + * + * Generated from protobuf field string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSessionMatcher() + { + return $this->session_matcher; + } + + /** + * Required. CEL expression for matching on session criteria. + * + * Generated from protobuf field string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSessionMatcher($var) + { + GPBUtil::checkString($var, True); + $this->session_matcher = $var; + + return $this; + } + + /** + * Optional. CEL expression for matching on L7/application level criteria. + * + * Generated from protobuf field string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getApplicationMatcher() + { + return $this->application_matcher; + } + + /** + * Optional. CEL expression for matching on L7/application level criteria. + * + * Generated from protobuf field string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setApplicationMatcher($var) + { + GPBUtil::checkString($var, True); + $this->application_matcher = $var; + + return $this; + } + + /** + * Optional. Flag to enable TLS inspection of traffic matching on + * , can only be true if the parent GatewaySecurityPolicy + * references a TLSInspectionConfig. + * + * Generated from protobuf field bool tls_inspection_enabled = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getTlsInspectionEnabled() + { + return $this->tls_inspection_enabled; + } + + /** + * Optional. Flag to enable TLS inspection of traffic matching on + * , can only be true if the parent GatewaySecurityPolicy + * references a TLSInspectionConfig. + * + * Generated from protobuf field bool tls_inspection_enabled = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setTlsInspectionEnabled($var) + { + GPBUtil::checkBool($var); + $this->tls_inspection_enabled = $var; + + return $this; + } + + /** + * @return string + */ + public function getProfile() + { + return $this->whichOneof("profile"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule/BasicProfile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule/BasicProfile.php new file mode 100644 index 000000000000..d9e9c1ecdd3e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule/BasicProfile.php @@ -0,0 +1,61 @@ +google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile + */ +class BasicProfile +{ + /** + * If there is not a mentioned action for the target. + * + * Generated from protobuf enum BASIC_PROFILE_UNSPECIFIED = 0; + */ + const BASIC_PROFILE_UNSPECIFIED = 0; + /** + * Allow the matched traffic. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * Deny the matched traffic. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + + private static $valueToName = [ + self::BASIC_PROFILE_UNSPECIFIED => 'BASIC_PROFILE_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php new file mode 100644 index 000000000000..141f092a49de --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetAddressGroupRequest + */ +class GetAddressGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AddressGroup to get. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the AddressGroup to get. Must be in the format + * `projects/*/locations/{location}/addressGroups/*`. Please see + * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetAddressGroupRequest + * + * @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. A name of the AddressGroup to get. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AddressGroup to get. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * + * 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. A name of the AddressGroup to get. Must be in the format + * `projects/{@*}locations/{location}/addressGroups/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..d09e0ee421b4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest + */ +class GetAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see + * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetAuthorizationPolicyRequest + * + * @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. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * 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. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthzPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthzPolicyRequest.php new file mode 100644 index 000000000000..34614ff75c32 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthzPolicyRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetAuthzPolicyRequest + */ +class GetAuthzPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the `AuthzPolicy` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the `AuthzPolicy` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. Please see + * {@see NetworkSecurityClient::authzPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetAuthzPolicyRequest + * + * @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. A name of the `AuthzPolicy` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the `AuthzPolicy` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * 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. A name of the `AuthzPolicy` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetBackendAuthenticationConfigRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetBackendAuthenticationConfigRequest.php new file mode 100644 index 000000000000..38cb4b4617ee --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetBackendAuthenticationConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetBackendAuthenticationConfigRequest + */ +class GetBackendAuthenticationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the BackendAuthenticationConfig to get. Must be in the + * format `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the BackendAuthenticationConfig to get. Must be in the + * format `projects/*/locations/{location}/backendAuthenticationConfigs/*`. Please see + * {@see NetworkSecurityClient::backendAuthenticationConfigName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetBackendAuthenticationConfigRequest + * + * @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. A name of the BackendAuthenticationConfig to get. Must be in the + * format `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the BackendAuthenticationConfig to get. Must be in the + * format `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * + * 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. A name of the BackendAuthenticationConfig to get. Must be in the + * format `projects/{@*}locations/{location}/backendAuthenticationConfigs/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php new file mode 100644 index 000000000000..b4685c0f7f1d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetClientTlsPolicyRequest + */ +class GetClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/clientTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetClientTlsPolicyRequest + * + * @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. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * + * 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. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/clientTlsPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetDnsThreatDetectorRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetDnsThreatDetectorRequest.php new file mode 100644 index 000000000000..2e373202da9c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetDnsThreatDetectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.networksecurity.v1.GetDnsThreatDetectorRequest + */ +class GetDnsThreatDetectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the DnsThreatDetector 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 DnsThreatDetector resource. Please see + * {@see DnsThreatDetectorServiceClient::dnsThreatDetectorName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetDnsThreatDetectorRequest + * + * @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 DnsThreatDetector resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\DnsThreatDetector::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the DnsThreatDetector 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 DnsThreatDetector 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointAssociationRequest.php new file mode 100644 index 000000000000..804e29775365 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointAssociationRequest.php @@ -0,0 +1,81 @@ +google.cloud.networksecurity.v1.GetFirewallEndpointAssociationRequest + */ +class GetFirewallEndpointAssociationRequest 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 FirewallActivationClient::firewallEndpointAssociationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetFirewallEndpointAssociationRequest + * + * @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\Networksecurity\V1\FirewallActivation::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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointRequest.php new file mode 100644 index 000000000000..1eb1715e50b1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointRequest.php @@ -0,0 +1,81 @@ +google.cloud.networksecurity.v1.GetFirewallEndpointRequest + */ +class GetFirewallEndpointRequest 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 FirewallActivationClient::firewallEndpointName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetFirewallEndpointRequest + * + * @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\Networksecurity\V1\FirewallActivation::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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRequest.php new file mode 100644 index 000000000000..a5282a97a62b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRequest + */ +class GetGatewaySecurityPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the GatewaySecurityPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the GatewaySecurityPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. Please see + * {@see NetworkSecurityClient::gatewaySecurityPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetGatewaySecurityPolicyRequest + * + * @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. A name of the GatewaySecurityPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the GatewaySecurityPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * + * 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. A name of the GatewaySecurityPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRuleRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRuleRequest.php new file mode 100644 index 000000000000..23e29a3a4579 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRuleRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRuleRequest + */ +class GetGatewaySecurityPolicyRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the GatewaySecurityPolicyRule to retrieve. + * Format: + * projects/{project}/location/{location}/gatewaySecurityPolicies/{@*}rules/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the GatewaySecurityPolicyRule to retrieve. + * Format: + * projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/* + * Please see {@see NetworkSecurityClient::gatewaySecurityPolicyRuleName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetGatewaySecurityPolicyRuleRequest + * + * @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 name of the GatewaySecurityPolicyRule to retrieve. + * Format: + * projects/{project}/location/{location}/gatewaySecurityPolicies/{@*}rules/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the GatewaySecurityPolicyRule to retrieve. + * Format: + * projects/{project}/location/{location}/gatewaySecurityPolicies/{@*}rules/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the GatewaySecurityPolicyRule to retrieve. + * Format: + * projects/{project}/location/{location}/gatewaySecurityPolicies/{@*}rules/* + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentGroupRequest.php new file mode 100644 index 000000000000..4cb670d2c316 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentGroupRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetInterceptDeploymentGroupRequest + */ +class GetInterceptDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group} + * Please see {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentGroupRequest + * + * @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 name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentRequest.php new file mode 100644 index 000000000000..359bb3fecd83 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetInterceptDeploymentRequest + */ +class GetInterceptDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment} + * Please see {@see InterceptClient::interceptDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentRequest + * + * @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 name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..4ea6b640e0a8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupAssociationRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetInterceptEndpointGroupAssociationRequest + */ +class GetInterceptEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association} + * Please see {@see InterceptClient::interceptEndpointGroupAssociationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupAssociationRequest + * + * @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 name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupRequest.php new file mode 100644 index 000000000000..34da5cf2fdc4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetInterceptEndpointGroupRequest + */ +class GetInterceptEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group} + * Please see {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupRequest + * + * @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 name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentGroupRequest.php new file mode 100644 index 000000000000..636097dc801a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentGroupRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetMirroringDeploymentGroupRequest + */ +class GetMirroringDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group} + * Please see {@see MirroringClient::mirroringDeploymentGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetMirroringDeploymentGroupRequest + * + * @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 name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the deployment group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentRequest.php new file mode 100644 index 000000000000..6f21c239ea2b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetMirroringDeploymentRequest + */ +class GetMirroringDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment} + * Please see {@see MirroringClient::mirroringDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetMirroringDeploymentRequest + * + * @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 name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the deployment to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..54c0b35b53bd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupAssociationRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetMirroringEndpointGroupAssociationRequest + */ +class GetMirroringEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association} + * Please see {@see MirroringClient::mirroringEndpointGroupAssociationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetMirroringEndpointGroupAssociationRequest + * + * @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 name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the association to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupRequest.php new file mode 100644 index 000000000000..8d9894741781 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupRequest.php @@ -0,0 +1,91 @@ +google.cloud.networksecurity.v1.GetMirroringEndpointGroupRequest + */ +class GetMirroringEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group} + * Please see {@see MirroringClient::mirroringEndpointGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetMirroringEndpointGroupRequest + * + * @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 name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the endpoint group to retrieve. + * Format: + * projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group} + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileGroupRequest.php new file mode 100644 index 000000000000..493ed3de061a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileGroupRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetSecurityProfileGroupRequest + */ +class GetSecurityProfileGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the SecurityProfileGroup to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the SecurityProfileGroup to get. Must be in the format + * `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::securityProfileGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetSecurityProfileGroupRequest + * + * @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. A name of the SecurityProfileGroup to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the SecurityProfileGroup to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * 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. A name of the SecurityProfileGroup to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileRequest.php new file mode 100644 index 000000000000..bf1967b26637 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetSecurityProfileRequest + */ +class GetSecurityProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the SecurityProfile to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the SecurityProfile to get. Must be in the format + * `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::securityProfileName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetSecurityProfileRequest + * + * @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. A name of the SecurityProfile to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the SecurityProfile to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the SecurityProfile to get. Must be in the format + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php new file mode 100644 index 000000000000..0cde29f416e8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetServerTlsPolicyRequest + */ +class GetServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/serverTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetServerTlsPolicyRequest + * + * @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. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * + * 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. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/{@*}locations/{location}/serverTlsPolicies/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetTlsInspectionPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetTlsInspectionPolicyRequest.php new file mode 100644 index 000000000000..7fa3177a0a63 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetTlsInspectionPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetTlsInspectionPolicyRequest + */ +class GetTlsInspectionPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TlsInspectionPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the TlsInspectionPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. Please see + * {@see NetworkSecurityClient::tlsInspectionPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetTlsInspectionPolicyRequest + * + * @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. A name of the TlsInspectionPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TlsInspectionPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * + * 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. A name of the TlsInspectionPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetUrlListRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetUrlListRequest.php new file mode 100644 index 000000000000..ffa52bc207d2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetUrlListRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetUrlListRequest + */ +class GetUrlListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the UrlList to get. Must be in the format + * `projects/{@*}locations/{location}/urlLists/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the UrlList to get. Must be in the format + * `projects/*/locations/{location}/urlLists/*`. Please see + * {@see NetworkSecurityClient::urlListName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetUrlListRequest + * + * @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. A name of the UrlList to get. Must be in the format + * `projects/{@*}locations/{location}/urlLists/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the UrlList to get. Must be in the format + * `projects/{@*}locations/{location}/urlLists/*`. + * + * 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. A name of the UrlList to get. Must be in the format + * `projects/{@*}locations/{location}/urlLists/*`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php new file mode 100644 index 000000000000..eeacff27c860 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php @@ -0,0 +1,71 @@ +google.cloud.networksecurity.v1.GrpcEndpoint + */ +class GrpcEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". + * + * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_uri + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". + * + * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetUri() + { + return $this->target_uri; + } + + /** + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". + * + * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetUri($var) + { + GPBUtil::checkString($var, True); + $this->target_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment.php new file mode 100644 index 000000000000..9c679bb154eb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment.php @@ -0,0 +1,426 @@ +google.cloud.networksecurity.v1.InterceptDeployment + */ +class InterceptDeployment extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/interceptDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The regional forwarding rule that fronts the + * interceptors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string forwarding_rule = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $forwarding_rule = ''; + /** + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_deployment_group = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $intercept_deployment_group = ''; + /** + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/interceptDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $forwarding_rule + * Required. Immutable. The regional forwarding rule that fronts the + * interceptors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. + * See https://google.aip.dev/124. + * @type string $intercept_deployment_group + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * @type int $state + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * @type string $description + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/interceptDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/interceptDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The regional forwarding rule that fronts the + * interceptors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string forwarding_rule = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getForwardingRule() + { + return $this->forwarding_rule; + } + + /** + * Required. Immutable. The regional forwarding rule that fronts the + * interceptors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string forwarding_rule = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setForwardingRule($var) + { + GPBUtil::checkString($var, True); + $this->forwarding_rule = $var; + + return $this; + } + + /** + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_deployment_group = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getInterceptDeploymentGroup() + { + return $this->intercept_deployment_group; + } + + /** + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_deployment_group = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInterceptDeploymentGroup($var) + { + GPBUtil::checkString($var, True); + $this->intercept_deployment_group = $var; + + return $this; + } + + /** + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptDeployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment/State.php new file mode 100644 index 000000000000..c0b55cda2efa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment/State.php @@ -0,0 +1,87 @@ +google.cloud.networksecurity.v1.InterceptDeployment.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The deployment is ready and in sync with the parent group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The deployment is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The deployment is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The deployment is out of sync with the parent group. + * In most cases, this is a result of a transient issue within the system + * (e.g. a delayed data-path config) and the system is expected to recover + * automatically. See the parent deployment group's state for more details. + * + * Generated from protobuf enum OUT_OF_SYNC = 4; + */ + const OUT_OF_SYNC = 4; + /** + * An attempt to delete the deployment has failed. This is a terminal state + * and the deployment is not expected to recover. The only permitted + * operation is to retry deleting the deployment. + * + * Generated from protobuf enum DELETE_FAILED = 5; + */ + const DELETE_FAILED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + self::DELETE_FAILED => 'DELETE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup.php new file mode 100644 index 000000000000..83f3a16aa255 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup.php @@ -0,0 +1,494 @@ +google.cloud.networksecurity.v1.InterceptDeploymentGroup + */ +class InterceptDeploymentGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. The list of endpoint groups that are connected to this + * resource. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup.ConnectedEndpointGroup connected_endpoint_groups = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $connected_endpoint_groups; + /** + * Output only. The list of Intercept Deployments that belong to this group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup.Deployment nested_deployments = 10 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + private $nested_deployments; + /** + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $network + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\ConnectedEndpointGroup[] $connected_endpoint_groups + * Output only. The list of endpoint groups that are connected to this + * resource. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\Deployment[] $nested_deployments + * Output only. The list of Intercept Deployments that belong to this group. + * @type int $state + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * @type string $description + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptLocation[] $locations + * Output only. The list of locations where the deployment group is present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The list of endpoint groups that are connected to this + * resource. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup.ConnectedEndpointGroup connected_endpoint_groups = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\ConnectedEndpointGroup> + */ + public function getConnectedEndpointGroups() + { + return $this->connected_endpoint_groups; + } + + /** + * Output only. The list of endpoint groups that are connected to this + * resource. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup.ConnectedEndpointGroup connected_endpoint_groups = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\ConnectedEndpointGroup[] $var + * @return $this + */ + public function setConnectedEndpointGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\ConnectedEndpointGroup::class); + $this->connected_endpoint_groups = $arr; + + return $this; + } + + /** + * Output only. The list of Intercept Deployments that belong to this group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup.Deployment nested_deployments = 10 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\Deployment> + * @deprecated + */ + public function getNestedDeployments() + { + if ($this->nested_deployments->count() !== 0) { + @trigger_error('nested_deployments is deprecated.', E_USER_DEPRECATED); + } + return $this->nested_deployments; + } + + /** + * Output only. The list of Intercept Deployments that belong to this group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup.Deployment nested_deployments = 10 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\Deployment[] $var + * @return $this + * @deprecated + */ + public function setNestedDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\Deployment::class); + if ($arr->count() !== 0) { + @trigger_error('nested_deployments is deprecated.', E_USER_DEPRECATED); + } + $this->nested_deployments = $arr; + + return $this; + } + + /** + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * + * Generated from protobuf field string description = 9 [(.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 list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptLocation> + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptLocation[] $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptLocation::class); + $this->locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php new file mode 100644 index 000000000000..c40f23601d6d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php @@ -0,0 +1,75 @@ +google.cloud.networksecurity.v1.InterceptDeploymentGroup.ConnectedEndpointGroup + */ +class ConnectedEndpointGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/Deployment.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/Deployment.php new file mode 100644 index 000000000000..9bf8539e9292 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/Deployment.php @@ -0,0 +1,105 @@ +google.cloud.networksecurity.v1.InterceptDeploymentGroup.Deployment + */ +class Deployment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the Intercept Deployment, in the format: + * `projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. Most recent known state of the deployment. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the Intercept Deployment, in the format: + * `projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}`. + * @type int $state + * Output only. Most recent known state of the deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the Intercept Deployment, in the format: + * `projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the Intercept Deployment, in the format: + * `projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Most recent known state of the deployment. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Most recent known state of the deployment. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptDeployment\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/State.php new file mode 100644 index 000000000000..6263a97cdc61 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/State.php @@ -0,0 +1,68 @@ +google.cloud.networksecurity.v1.InterceptDeploymentGroup.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The deployment group is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The deployment group is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The deployment group is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup.php new file mode 100644 index 000000000000..d88400d181cd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup.php @@ -0,0 +1,467 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroup + */ +class InterceptEndpointGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The deployment group that this endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_deployment_group = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $intercept_deployment_group = ''; + /** + * Output only. Details about the connected deployment group to this endpoint + * group. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup.ConnectedDeploymentGroup connected_deployment_group = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connected_deployment_group = null; + /** + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. List of associations to this endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroup.AssociationDetails associations = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $associations; + /** + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * + * Generated from protobuf field string description = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $intercept_deployment_group + * Required. Immutable. The deployment group that this endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\ConnectedDeploymentGroup $connected_deployment_group + * Output only. Details about the connected deployment group to this endpoint + * group. + * @type int $state + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\AssociationDetails[] $associations + * Output only. List of associations to this endpoint group. + * @type string $description + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The deployment group that this endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_deployment_group = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getInterceptDeploymentGroup() + { + return $this->intercept_deployment_group; + } + + /** + * Required. Immutable. The deployment group that this endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_deployment_group = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInterceptDeploymentGroup($var) + { + GPBUtil::checkString($var, True); + $this->intercept_deployment_group = $var; + + return $this; + } + + /** + * Output only. Details about the connected deployment group to this endpoint + * group. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup.ConnectedDeploymentGroup connected_deployment_group = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\ConnectedDeploymentGroup|null + */ + public function getConnectedDeploymentGroup() + { + return $this->connected_deployment_group; + } + + public function hasConnectedDeploymentGroup() + { + return isset($this->connected_deployment_group); + } + + public function clearConnectedDeploymentGroup() + { + unset($this->connected_deployment_group); + } + + /** + * Output only. Details about the connected deployment group to this endpoint + * group. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup.ConnectedDeploymentGroup connected_deployment_group = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\ConnectedDeploymentGroup $var + * @return $this + */ + public function setConnectedDeploymentGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\ConnectedDeploymentGroup::class); + $this->connected_deployment_group = $var; + + return $this; + } + + /** + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. List of associations to this endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroup.AssociationDetails associations = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\AssociationDetails> + */ + public function getAssociations() + { + return $this->associations; + } + + /** + * Output only. List of associations to this endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroup.AssociationDetails associations = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\AssociationDetails[] $var + * @return $this + */ + public function setAssociations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup\AssociationDetails::class); + $this->associations = $arr; + + return $this; + } + + /** + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * + * Generated from protobuf field string description = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * + * Generated from protobuf field string description = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/AssociationDetails.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/AssociationDetails.php new file mode 100644 index 000000000000..188b05de31fb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/AssociationDetails.php @@ -0,0 +1,151 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroup.AssociationDetails + */ +class AssociationDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. Most recent known state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * @type string $network + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * @type int $state + * Output only. Most recent known state of the association. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. Most recent known state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Most recent known state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php new file mode 100644 index 000000000000..2e1ddb0ca3c9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroup.ConnectedDeploymentGroup + */ +class ConnectedDeploymentGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptLocation[] $locations + * Output only. The list of locations where the deployment group is present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptLocation> + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptLocation[] $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptLocation::class); + $this->locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/State.php new file mode 100644 index 000000000000..c95a54eb1198 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/State.php @@ -0,0 +1,97 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroup.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The endpoint group is ready and in sync with the target deployment group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The deployment group backing this endpoint group has been force-deleted. + * This endpoint group cannot be used and interception is effectively + * disabled. + * + * Generated from protobuf enum CLOSED = 2; + */ + const CLOSED = 2; + /** + * The endpoint group is being created. + * + * Generated from protobuf enum CREATING = 3; + */ + const CREATING = 3; + /** + * The endpoint group is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The endpoint group is out of sync with the backing deployment group. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. See the associations field for details per network and + * location. + * + * Generated from protobuf enum OUT_OF_SYNC = 5; + */ + const OUT_OF_SYNC = 5; + /** + * An attempt to delete the endpoint group has failed. This is a terminal + * state and the endpoint group is not expected to recover. + * The only permitted operation is to retry deleting the endpoint group. + * + * Generated from protobuf enum DELETE_FAILED = 6; + */ + const DELETE_FAILED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CLOSED => 'CLOSED', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + self::DELETE_FAILED => 'DELETE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation.php new file mode 100644 index 000000000000..cda45d6bbd1f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation.php @@ -0,0 +1,517 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation + */ +class InterceptEndpointGroupAssociation extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The endpoint group that this association is connected + * to, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_endpoint_group = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $intercept_endpoint_group = ''; + /** + * Required. Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails locations_details = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + private $locations_details; + /** + * Output only. Current state of the endpoint group association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $locations; + /** + * Output only. Identifier used by the data-path. + * See the NSI GENEVE format for more details: + * https://docs.cloud.google.com/network-security-integration/docs/understand-geneve#network_id + * + * Generated from protobuf field uint32 network_cookie = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $network_cookie = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $intercept_endpoint_group + * Required. Immutable. The endpoint group that this association is connected + * to, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * @type string $network + * Required. Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation\LocationDetails[] $locations_details + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * @type int $state + * Output only. Current state of the endpoint group association. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptLocation[] $locations + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * @type int $network_cookie + * Output only. Identifier used by the data-path. + * See the NSI GENEVE format for more details: + * https://docs.cloud.google.com/network-security-integration/docs/understand-geneve#network_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/interceptEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The endpoint group that this association is connected + * to, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_endpoint_group = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getInterceptEndpointGroup() + { + return $this->intercept_endpoint_group; + } + + /** + * Required. Immutable. The endpoint group that this association is connected + * to, for example: + * `projects/123456789/locations/global/interceptEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string intercept_endpoint_group = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInterceptEndpointGroup($var) + { + GPBUtil::checkString($var, True); + $this->intercept_endpoint_group = $var; + + return $this; + } + + /** + * Required. Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails locations_details = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation\LocationDetails> + * @deprecated + */ + public function getLocationsDetails() + { + if ($this->locations_details->count() !== 0) { + @trigger_error('locations_details is deprecated.', E_USER_DEPRECATED); + } + return $this->locations_details; + } + + /** + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails locations_details = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation\LocationDetails[] $var + * @return $this + * @deprecated + */ + public function setLocationsDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation\LocationDetails::class); + if ($arr->count() !== 0) { + @trigger_error('locations_details is deprecated.', E_USER_DEPRECATED); + } + $this->locations_details = $arr; + + return $this; + } + + /** + * Output only. Current state of the endpoint group association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the endpoint group association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptLocation> + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptLocation locations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptLocation[] $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptLocation::class); + $this->locations = $arr; + + return $this; + } + + /** + * Output only. Identifier used by the data-path. + * See the NSI GENEVE format for more details: + * https://docs.cloud.google.com/network-security-integration/docs/understand-geneve#network_id + * + * Generated from protobuf field uint32 network_cookie = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getNetworkCookie() + { + return $this->network_cookie; + } + + /** + * Output only. Identifier used by the data-path. + * See the NSI GENEVE format for more details: + * https://docs.cloud.google.com/network-security-integration/docs/understand-geneve#network_id + * + * Generated from protobuf field uint32 network_cookie = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setNetworkCookie($var) + { + GPBUtil::checkUint32($var); + $this->network_cookie = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails.php new file mode 100644 index 000000000000..0661a49485fa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails.php @@ -0,0 +1,102 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails + */ +class LocationDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * @type int $state + * Output only. The current state of the association in this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation\LocationDetails\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php new file mode 100644 index 000000000000..3cac6fe3b126 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php @@ -0,0 +1,64 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.LocationDetails.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The association is ready and in sync with the linked endpoint group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The association is out of sync with the linked endpoint group. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. + * + * Generated from protobuf enum OUT_OF_SYNC = 2; + */ + const OUT_OF_SYNC = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/State.php new file mode 100644 index 000000000000..a6aede8663b4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/State.php @@ -0,0 +1,95 @@ +google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The association is ready and in sync with the linked endpoint group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The association is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The association is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The association is disabled due to a breaking change in another resource. + * + * Generated from protobuf enum CLOSED = 4; + */ + const CLOSED = 4; + /** + * The association is out of sync with the linked endpoint group. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. Check the `locations_details` field for more details. + * + * Generated from protobuf enum OUT_OF_SYNC = 5; + */ + const OUT_OF_SYNC = 5; + /** + * An attempt to delete the association has failed. This is a terminal state + * and the association is not expected to be usable as some of its resources + * have been deleted. + * The only permitted operation is to retry deleting the association. + * + * Generated from protobuf enum DELETE_FAILED = 6; + */ + const DELETE_FAILED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::CLOSED => 'CLOSED', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + self::DELETE_FAILED => 'DELETE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation.php new file mode 100644 index 000000000000..97d7c220ad8c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation.php @@ -0,0 +1,101 @@ +google.cloud.networksecurity.v1.InterceptLocation + */ +class InterceptLocation extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptLocation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * @type int $state + * Output only. The current state of the association in this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptLocation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptLocation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\InterceptLocation\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation/State.php new file mode 100644 index 000000000000..cc2a67f66525 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation/State.php @@ -0,0 +1,64 @@ +google.cloud.networksecurity.v1.InterceptLocation.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The resource is ready and in sync in the location. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The resource is out of sync in the location. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. + * + * Generated from protobuf enum OUT_OF_SYNC = 2; + */ + const OUT_OF_SYNC = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php new file mode 100644 index 000000000000..1ea476f00d45 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php @@ -0,0 +1,174 @@ +google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest + */ +class ListAddressGroupReferencesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $address_group = ''; + /** + * The maximum number of references to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] + * to determine if there are more AddressGroupUsers left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $addressGroup Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/*/locations/{location}/addressGroups/*`. Please see + * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesRequest + * + * @experimental + */ + public static function build(string $addressGroup): self + { + return (new self()) + ->setAddressGroup($addressGroup); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address_group + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * @type int $page_size + * The maximum number of references to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] + * to determine if there are more AddressGroupUsers left to be queried. + * @type string $page_token + * The next_page_token value returned from a previous List request, + * if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAddressGroup() + { + return $this->address_group; + } + + /** + * Required. A name of the AddressGroup to clone items to. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAddressGroup($var) + { + GPBUtil::checkString($var, True); + $this->address_group = $var; + + return $this; + } + + /** + * The maximum number of references to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] + * to determine if there are more AddressGroupUsers left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of references to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] + * to determine if there are more AddressGroupUsers left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php new file mode 100644 index 000000000000..a1666bdd069e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse + */ +class ListAddressGroupReferencesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of references that matches the specified filter in the request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference address_group_references = 1; + */ + private $address_group_references; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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 \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference[] $address_group_references + * A list of references that matches the specified filter in the request. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * A list of references that matches the specified filter in the request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference address_group_references = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference> + */ + public function getAddressGroupReferences() + { + return $this->address_group_references; + } + + /** + * A list of references that matches the specified filter in the request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference address_group_references = 1; + * @param \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference[] $var + * @return $this + */ + public function setAddressGroupReferences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference::class); + $this->address_group_references = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php new file mode 100644 index 000000000000..f3e7345a2e1d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php @@ -0,0 +1,135 @@ +google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference + */ +class AddressGroupReference extends \Google\Protobuf\Internal\Message +{ + /** + * FirewallPolicy that is using the Address Group. + * + * Generated from protobuf field string firewall_policy = 1; + */ + protected $firewall_policy = ''; + /** + * Cloud Armor SecurityPolicy that is using the Address Group. + * + * Generated from protobuf field string security_policy = 4; + */ + protected $security_policy = ''; + /** + * Rule priority of the FirewallPolicy that is using the Address Group. + * + * Generated from protobuf field int32 rule_priority = 2; + */ + protected $rule_priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $firewall_policy + * FirewallPolicy that is using the Address Group. + * @type string $security_policy + * Cloud Armor SecurityPolicy that is using the Address Group. + * @type int $rule_priority + * Rule priority of the FirewallPolicy that is using the Address Group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * FirewallPolicy that is using the Address Group. + * + * Generated from protobuf field string firewall_policy = 1; + * @return string + */ + public function getFirewallPolicy() + { + return $this->firewall_policy; + } + + /** + * FirewallPolicy that is using the Address Group. + * + * Generated from protobuf field string firewall_policy = 1; + * @param string $var + * @return $this + */ + public function setFirewallPolicy($var) + { + GPBUtil::checkString($var, True); + $this->firewall_policy = $var; + + return $this; + } + + /** + * Cloud Armor SecurityPolicy that is using the Address Group. + * + * Generated from protobuf field string security_policy = 4; + * @return string + */ + public function getSecurityPolicy() + { + return $this->security_policy; + } + + /** + * Cloud Armor SecurityPolicy that is using the Address Group. + * + * Generated from protobuf field string security_policy = 4; + * @param string $var + * @return $this + */ + public function setSecurityPolicy($var) + { + GPBUtil::checkString($var, True); + $this->security_policy = $var; + + return $this; + } + + /** + * Rule priority of the FirewallPolicy that is using the Address Group. + * + * Generated from protobuf field int32 rule_priority = 2; + * @return int + */ + public function getRulePriority() + { + return $this->rule_priority; + } + + /** + * Rule priority of the FirewallPolicy that is using the Address Group. + * + * Generated from protobuf field int32 rule_priority = 2; + * @param int $var + * @return $this + */ + public function setRulePriority($var) + { + GPBUtil::checkInt32($var); + $this->rule_priority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php new file mode 100644 index 000000000000..f4ed9cdb6f85 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php @@ -0,0 +1,209 @@ +google.cloud.networksecurity.v1.ListAddressGroupsRequest + */ +class ListAddressGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the AddressGroups + * should be listed, specified in the format + * `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of AddressGroups to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * `ListAddressGroupsResponse` Indicates that this is a + * continuation of a prior `ListAddressGroups` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. If true, allow partial responses for multi-regional Aggregated + * List requests. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $return_partial_success = false; + + /** + * @param string $parent Required. The project and location from which the AddressGroups + * should be listed, specified in the format + * `projects/*/locations/{location}`. Please see + * {@see AddressGroupServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListAddressGroupsRequest + * + * @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 project and location from which the AddressGroups + * should be listed, specified in the format + * `projects/{@*}locations/{location}`. + * @type int $page_size + * Maximum number of AddressGroups to return per call. + * @type string $page_token + * The value returned by the last + * `ListAddressGroupsResponse` Indicates that this is a + * continuation of a prior `ListAddressGroups` call, and + * that the system should return the next page of data. + * @type bool $return_partial_success + * Optional. If true, allow partial responses for multi-regional Aggregated + * List requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the AddressGroups + * should be listed, specified in the format + * `projects/{@*}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 project and location from which the AddressGroups + * should be listed, specified in the format + * `projects/{@*}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; + } + + /** + * Maximum number of AddressGroups to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of AddressGroups to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last + * `ListAddressGroupsResponse` Indicates that this is a + * continuation of a prior `ListAddressGroups` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last + * `ListAddressGroupsResponse` Indicates that this is a + * continuation of a prior `ListAddressGroups` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. If true, allow partial responses for multi-regional Aggregated + * List requests. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getReturnPartialSuccess() + { + return $this->return_partial_success; + } + + /** + * Optional. If true, allow partial responses for multi-regional Aggregated + * List requests. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php new file mode 100644 index 000000000000..b5a932bffe95 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListAddressGroupsResponse + */ +class ListAddressGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of AddressGroups resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup address_groups = 1; + */ + private $address_groups; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AddressGroup[] $address_groups + * List of AddressGroups resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * List of AddressGroups resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup address_groups = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AddressGroup> + */ + public function getAddressGroups() + { + return $this->address_groups; + } + + /** + * List of AddressGroups resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup address_groups = 1; + * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup[] $var + * @return $this + */ + public function setAddressGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AddressGroup::class); + $this->address_groups = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php new file mode 100644 index 000000000000..767ab1e44205 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest + */ +class ListAuthorizationPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of AuthorizationPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesRequest + * + * @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 project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Maximum number of AuthorizationPolicies to return per call. + * @type string $page_token + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `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 project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `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; + } + + /** + * Maximum number of AuthorizationPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of AuthorizationPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php new file mode 100644 index 000000000000..fa24257259ff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse + */ +class ListAuthorizationPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of AuthorizationPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; + */ + private $authorization_policies; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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 \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy[] $authorization_policies + * List of AuthorizationPolicies resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of AuthorizationPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy> + */ + public function getAuthorizationPolicies() + { + return $this->authorization_policies; + } + + /** + * List of AuthorizationPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy[] $var + * @return $this + */ + public function setAuthorizationPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); + $this->authorization_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesRequest.php new file mode 100644 index 000000000000..3bc282bedce0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesRequest.php @@ -0,0 +1,231 @@ +google.cloud.networksecurity.v1.ListAuthzPoliciesRequest + */ +class ListAuthzPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the `AuthzPolicy` resources + * are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * 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 that the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the `AuthzPolicy` resources + * are listed, specified in the following format: + * `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListAuthzPoliciesRequest + * + * @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 project and location from which the `AuthzPolicy` resources + * are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results that the server returns. + * @type string $filter + * Optional. Filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the `AuthzPolicy` resources + * are listed, specified in the following format: + * `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 project and location from which the `AuthzPolicy` resources + * are listed, specified in the following format: + * `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. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * 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 that the server returns. + * + * 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 that the server returns. + * + * 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; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesResponse.php new file mode 100644 index 000000000000..f2cd123ffe38 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesResponse.php @@ -0,0 +1,135 @@ +google.cloud.networksecurity.v1.ListAuthzPoliciesResponse + */ +class ListAuthzPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of `AuthzPolicy` resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy authz_policies = 1; + */ + private $authz_policies; + /** + * A token identifying a page of results that the server returns. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy[] $authz_policies + * The list of `AuthzPolicy` resources. + * @type string $next_page_token + * A token identifying a page of results that the server returns. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * The list of `AuthzPolicy` resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy authz_policies = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthzPolicy> + */ + public function getAuthzPolicies() + { + return $this->authz_policies; + } + + /** + * The list of `AuthzPolicy` resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthzPolicy authz_policies = 1; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy[] $var + * @return $this + */ + public function setAuthzPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy::class); + $this->authz_policies = $arr; + + return $this; + } + + /** + * A token identifying a page of results that the server returns. + * + * 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 that the server returns. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsRequest.php new file mode 100644 index 000000000000..8f2f83ed267c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsRequest + */ +class ListBackendAuthenticationConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the + * BackendAuthenticationConfigs should be listed, specified in the format + * `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of BackendAuthenticationConfigs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListBackendAuthenticationConfigsResponse` + * Indicates that this is a continuation of a prior + * `ListBackendAuthenticationConfigs` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the + * BackendAuthenticationConfigs should be listed, specified in the format + * `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListBackendAuthenticationConfigsRequest + * + * @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 project and location from which the + * BackendAuthenticationConfigs should be listed, specified in the format + * `projects/{@*}locations/{location}`. + * @type int $page_size + * Maximum number of BackendAuthenticationConfigs to return per call. + * @type string $page_token + * The value returned by the last `ListBackendAuthenticationConfigsResponse` + * Indicates that this is a continuation of a prior + * `ListBackendAuthenticationConfigs` call, and that the system + * should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the + * BackendAuthenticationConfigs should be listed, specified in the format + * `projects/{@*}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 project and location from which the + * BackendAuthenticationConfigs should be listed, specified in the format + * `projects/{@*}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; + } + + /** + * Maximum number of BackendAuthenticationConfigs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of BackendAuthenticationConfigs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListBackendAuthenticationConfigsResponse` + * Indicates that this is a continuation of a prior + * `ListBackendAuthenticationConfigs` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListBackendAuthenticationConfigsResponse` + * Indicates that this is a continuation of a prior + * `ListBackendAuthenticationConfigs` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsResponse.php new file mode 100644 index 000000000000..14d3be1c5f7d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsResponse + */ +class ListBackendAuthenticationConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of BackendAuthenticationConfig resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_configs = 1; + */ + private $backend_authentication_configs; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig[] $backend_authentication_configs + * List of BackendAuthenticationConfig resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); + parent::__construct($data); + } + + /** + * List of BackendAuthenticationConfig resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_configs = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig> + */ + public function getBackendAuthenticationConfigs() + { + return $this->backend_authentication_configs; + } + + /** + * List of BackendAuthenticationConfig resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_configs = 1; + * @param \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig[] $var + * @return $this + */ + public function setBackendAuthenticationConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig::class); + $this->backend_authentication_configs = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php new file mode 100644 index 000000000000..44312beff82a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php @@ -0,0 +1,166 @@ +google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest + */ +class ListClientTlsPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of ClientTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesRequest + * + * @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 project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/{@*}locations/{location}`. + * @type int $page_size + * Maximum number of ClientTlsPolicies to return per call. + * @type string $page_token + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/{@*}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 project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/{@*}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; + } + + /** + * Maximum number of ClientTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of ClientTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php new file mode 100644 index 000000000000..759f3ba73cfa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse + */ +class ListClientTlsPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of ClientTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; + */ + private $client_tls_policies; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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 \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy[] $client_tls_policies + * List of ClientTlsPolicy resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of ClientTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy> + */ + public function getClientTlsPolicies() + { + return $this->client_tls_policies; + } + + /** + * List of ClientTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy[] $var + * @return $this + */ + public function setClientTlsPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); + $this->client_tls_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsRequest.php new file mode 100644 index 000000000000..66aba4f4afd4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsRequest.php @@ -0,0 +1,161 @@ +google.cloud.networksecurity.v1.ListDnsThreatDetectorsRequest + */ +class ListDnsThreatDetectorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for `ListDnsThreatDetectorsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The requested page size. The server may return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * 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 + * `ListDnsThreatDetectorsRequest` call. Provide this to retrieve the + * subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for `ListDnsThreatDetectorsRequest`. Please see + * {@see DnsThreatDetectorServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListDnsThreatDetectorsRequest + * + * @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 parent value for `ListDnsThreatDetectorsRequest`. + * @type int $page_size + * Optional. The requested page size. The server may return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @type string $page_token + * Optional. A page token received from a previous + * `ListDnsThreatDetectorsRequest` call. Provide this to retrieve the + * subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\DnsThreatDetector::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for `ListDnsThreatDetectorsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for `ListDnsThreatDetectorsRequest`. + * + * 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 requested page size. The server may return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The requested page size. The server may return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * 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 + * `ListDnsThreatDetectorsRequest` call. Provide this to retrieve the + * subsequent page. + * + * 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 + * `ListDnsThreatDetectorsRequest` call. Provide this to retrieve the + * subsequent page. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsResponse.php new file mode 100644 index 000000000000..cd507c97caf1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsResponse.php @@ -0,0 +1,135 @@ +google.cloud.networksecurity.v1.ListDnsThreatDetectorsResponse + */ +class ListDnsThreatDetectorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of DnsThreatDetector resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detectors = 1; + */ + private $dns_threat_detectors; + /** + * A token, which can be sent as `page_token`, to retrieve the next page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unordered list. Unreachable `DnsThreatDetector` resources. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector[] $dns_threat_detectors + * The list of DnsThreatDetector resources. + * @type string $next_page_token + * A token, which can be sent as `page_token`, to retrieve the next page. + * @type string[] $unreachable + * Unordered list. Unreachable `DnsThreatDetector` resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\DnsThreatDetector::initOnce(); + parent::__construct($data); + } + + /** + * The list of DnsThreatDetector resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detectors = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\DnsThreatDetector> + */ + public function getDnsThreatDetectors() + { + return $this->dns_threat_detectors; + } + + /** + * The list of DnsThreatDetector resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detectors = 1; + * @param \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector[] $var + * @return $this + */ + public function setDnsThreatDetectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector::class); + $this->dns_threat_detectors = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token`, to retrieve the next page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token`, to retrieve the next page. + * + * 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; + } + + /** + * Unordered list. Unreachable `DnsThreatDetector` resources. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unordered list. Unreachable `DnsThreatDetector` resources. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsRequest.php new file mode 100644 index 000000000000..a3116cc517ed --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsRequest.php @@ -0,0 +1,221 @@ +google.cloud.networksecurity.v1.ListFirewallEndpointAssociationsRequest + */ +class ListFirewallEndpointAssociationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListAssociationsRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListAssociationsRequest + * Please see {@see FirewallActivationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListFirewallEndpointAssociationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListAssociationsRequest + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListAssociationsRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListAssociationsRequest + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * 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; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsResponse.php new file mode 100644 index 000000000000..b90960b79d24 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsResponse.php @@ -0,0 +1,135 @@ +google.cloud.networksecurity.v1.ListFirewallEndpointAssociationsResponse + */ +class ListFirewallEndpointAssociationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Association + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_associations = 1; + */ + private $firewall_endpoint_associations; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation[] $firewall_endpoint_associations + * The list of Association + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * The list of Association + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_associations = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation> + */ + public function getFirewallEndpointAssociations() + { + return $this->firewall_endpoint_associations; + } + + /** + * The list of Association + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_associations = 1; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation[] $var + * @return $this + */ + public function setFirewallEndpointAssociations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation::class); + $this->firewall_endpoint_associations = $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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsRequest.php new file mode 100644 index 000000000000..f0e3fd7c411c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsRequest.php @@ -0,0 +1,221 @@ +google.cloud.networksecurity.v1.ListFirewallEndpointsRequest + */ +class ListFirewallEndpointsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListEndpointsRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListEndpointsRequest + * Please see {@see FirewallActivationClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListFirewallEndpointsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListEndpointsRequest + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListEndpointsRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListEndpointsRequest + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * 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; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsResponse.php new file mode 100644 index 000000000000..4e7e843ca47a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsResponse.php @@ -0,0 +1,135 @@ +google.cloud.networksecurity.v1.ListFirewallEndpointsResponse + */ +class ListFirewallEndpointsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Endpoint + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoints = 1; + */ + private $firewall_endpoints; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint[] $firewall_endpoints + * The list of Endpoint + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * The list of Endpoint + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoints = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\FirewallEndpoint> + */ + public function getFirewallEndpoints() + { + return $this->firewall_endpoints; + } + + /** + * The list of Endpoint + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoints = 1; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint[] $var + * @return $this + */ + public function setFirewallEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint::class); + $this->firewall_endpoints = $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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesRequest.php new file mode 100644 index 000000000000..e467d78734cf --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesRequest + */ +class ListGatewaySecurityPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the GatewaySecurityPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of GatewaySecurityPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * 'ListGatewaySecurityPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicies' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the GatewaySecurityPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPoliciesRequest + * + * @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 project and location from which the GatewaySecurityPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Maximum number of GatewaySecurityPolicies to return per call. + * @type string $page_token + * The value returned by the last + * 'ListGatewaySecurityPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicies' call, and + * that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the GatewaySecurityPolicies + * should be listed, specified in the format + * `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 project and location from which the GatewaySecurityPolicies + * should be listed, specified in the format + * `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; + } + + /** + * Maximum number of GatewaySecurityPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of GatewaySecurityPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last + * 'ListGatewaySecurityPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicies' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last + * 'ListGatewaySecurityPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicies' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesResponse.php new file mode 100644 index 000000000000..0a8e19c9436c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesResponse + */ +class ListGatewaySecurityPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of GatewaySecurityPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policies = 1; + */ + private $gateway_security_policies; + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy[] $gateway_security_policies + * List of GatewaySecurityPolicies resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of GatewaySecurityPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policies = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy> + */ + public function getGatewaySecurityPolicies() + { + return $this->gateway_security_policies; + } + + /** + * List of GatewaySecurityPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policies = 1; + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy[] $var + * @return $this + */ + public function setGatewaySecurityPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy::class); + $this->gateway_security_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesRequest.php new file mode 100644 index 000000000000..6e7d0695350f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesRequest + */ +class ListGatewaySecurityPolicyRulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project, location and GatewaySecurityPolicy from which the + * GatewaySecurityPolicyRules should be listed, specified in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of GatewaySecurityPolicyRules to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicyRules' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project, location and GatewaySecurityPolicy from which the + * GatewaySecurityPolicyRules should be listed, specified in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`. Please see + * {@see NetworkSecurityClient::gatewaySecurityPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPolicyRulesRequest + * + * @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 project, location and GatewaySecurityPolicy from which the + * GatewaySecurityPolicyRules should be listed, specified in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`. + * @type int $page_size + * Maximum number of GatewaySecurityPolicyRules to return per call. + * @type string $page_token + * The value returned by the last + * 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicyRules' call, and + * that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project, location and GatewaySecurityPolicy from which the + * GatewaySecurityPolicyRules should be listed, specified in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`. + * + * 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 project, location and GatewaySecurityPolicy from which the + * GatewaySecurityPolicyRules should be listed, specified in the format + * `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`. + * + * 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; + } + + /** + * Maximum number of GatewaySecurityPolicyRules to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of GatewaySecurityPolicyRules to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last + * 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicyRules' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last + * 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a + * continuation of a prior 'ListGatewaySecurityPolicyRules' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesResponse.php new file mode 100644 index 000000000000..d032f4e6b7d6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesResponse + */ +class ListGatewaySecurityPolicyRulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of GatewaySecurityPolicyRule resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rules = 1; + */ + private $gateway_security_policy_rules; + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule[] $gateway_security_policy_rules + * List of GatewaySecurityPolicyRule resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); + parent::__construct($data); + } + + /** + * List of GatewaySecurityPolicyRule resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rules = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule> + */ + public function getGatewaySecurityPolicyRules() + { + return $this->gateway_security_policy_rules; + } + + /** + * List of GatewaySecurityPolicyRule resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rules = 1; + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule[] $var + * @return $this + */ + public function setGatewaySecurityPolicyRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule::class); + $this->gateway_security_policy_rules = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsRequest.php new file mode 100644 index 000000000000..d5da1220a5cc --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsRequest.php @@ -0,0 +1,259 @@ +google.cloud.networksecurity.v1.ListInterceptDeploymentGroupsRequest + */ +class ListInterceptDeploymentGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListInterceptDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. Please see + * {@see InterceptClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentGroupsRequest + * + * @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 parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListInterceptDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListInterceptDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListInterceptDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListInterceptDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsResponse.php new file mode 100644 index 000000000000..7102de42fe55 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListInterceptDeploymentGroupsResponse + */ +class ListInterceptDeploymentGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The deployment groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_groups = 1; + */ + private $intercept_deployment_groups; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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 \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup[] $intercept_deployment_groups + * The deployment groups from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * The deployment groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_groups = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup> + */ + public function getInterceptDeploymentGroups() + { + return $this->intercept_deployment_groups; + } + + /** + * The deployment groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_groups = 1; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup[] $var + * @return $this + */ + public function setInterceptDeploymentGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup::class); + $this->intercept_deployment_groups = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsRequest.php new file mode 100644 index 000000000000..a9142f063013 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsRequest.php @@ -0,0 +1,259 @@ +google.cloud.networksecurity.v1.ListInterceptDeploymentsRequest + */ +class ListInterceptDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 `ListInterceptDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListInterceptDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. Please see + * {@see InterceptClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentsRequest + * + * @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 parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous `ListInterceptDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListInterceptDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 `ListInterceptDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListInterceptDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * + * 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 `ListInterceptDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListInterceptDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsResponse.php new file mode 100644 index 000000000000..f51772ea8986 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListInterceptDeploymentsResponse + */ +class ListInterceptDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The deployments from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployments = 1; + */ + private $intercept_deployments; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\InterceptDeployment[] $intercept_deployments + * The deployments from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * The deployments from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployments = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptDeployment> + */ + public function getInterceptDeployments() + { + return $this->intercept_deployments; + } + + /** + * The deployments from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployments = 1; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeployment[] $var + * @return $this + */ + public function setInterceptDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptDeployment::class); + $this->intercept_deployments = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsRequest.php new file mode 100644 index 000000000000..46798a0003d4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsRequest.php @@ -0,0 +1,259 @@ +google.cloud.networksecurity.v1.ListInterceptEndpointGroupAssociationsRequest + */ +class ListInterceptEndpointGroupAssociationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. Please see + * {@see InterceptClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupAssociationsRequest + * + * @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 parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsResponse.php new file mode 100644 index 000000000000..02c9fc016de9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListInterceptEndpointGroupAssociationsResponse + */ +class ListInterceptEndpointGroupAssociationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The associations from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_associations = 1; + */ + private $intercept_endpoint_group_associations; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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 \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation[] $intercept_endpoint_group_associations + * The associations from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * The associations from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_associations = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation> + */ + public function getInterceptEndpointGroupAssociations() + { + return $this->intercept_endpoint_group_associations; + } + + /** + * The associations from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_associations = 1; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation[] $var + * @return $this + */ + public function setInterceptEndpointGroupAssociations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation::class); + $this->intercept_endpoint_group_associations = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsRequest.php new file mode 100644 index 000000000000..496865de4f2a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsRequest.php @@ -0,0 +1,263 @@ +google.cloud.networksecurity.v1.ListInterceptEndpointGroupsRequest + */ +class ListInterceptEndpointGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. Please see + * {@see InterceptClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupsRequest + * + * @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 parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * + * 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 + * `ListInterceptEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListInterceptEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsResponse.php new file mode 100644 index 000000000000..d71067a4a83e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListInterceptEndpointGroupsResponse + */ +class ListInterceptEndpointGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The endpoint groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_groups = 1; + */ + private $intercept_endpoint_groups; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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 \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup[] $intercept_endpoint_groups + * The endpoint groups from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * The endpoint groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_groups = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup> + */ + public function getInterceptEndpointGroups() + { + return $this->intercept_endpoint_groups; + } + + /** + * The endpoint groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_groups = 1; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup[] $var + * @return $this + */ + public function setInterceptEndpointGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup::class); + $this->intercept_endpoint_groups = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsRequest.php new file mode 100644 index 000000000000..b1876553d3ac --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsRequest.php @@ -0,0 +1,259 @@ +google.cloud.networksecurity.v1.ListMirroringDeploymentGroupsRequest + */ +class ListMirroringDeploymentGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMirroringDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. Please see + * {@see MirroringClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListMirroringDeploymentGroupsRequest + * + * @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 parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListMirroringDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMirroringDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of deployment groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMirroringDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringDeploymentGroups` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMirroringDeploymentGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsResponse.php new file mode 100644 index 000000000000..7b310d381c02 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListMirroringDeploymentGroupsResponse + */ +class ListMirroringDeploymentGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The deployment groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_groups = 1; + */ + private $mirroring_deployment_groups; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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 \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup[] $mirroring_deployment_groups + * The deployment groups from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * The deployment groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_groups = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup> + */ + public function getMirroringDeploymentGroups() + { + return $this->mirroring_deployment_groups; + } + + /** + * The deployment groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_groups = 1; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup[] $var + * @return $this + */ + public function setMirroringDeploymentGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup::class); + $this->mirroring_deployment_groups = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsRequest.php new file mode 100644 index 000000000000..560d072f39e6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsRequest.php @@ -0,0 +1,259 @@ +google.cloud.networksecurity.v1.ListMirroringDeploymentsRequest + */ +class ListMirroringDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 `ListMirroringDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMirroringDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. Please see + * {@see MirroringClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListMirroringDeploymentsRequest + * + * @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 parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous `ListMirroringDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMirroringDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of deployments. + * Example: `projects/123456789/locations/us-central1-a`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 `ListMirroringDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMirroringDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * + * 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 `ListMirroringDeployments` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMirroringDeployments` must match the call + * that provided the page token. See https://google.aip.dev/158 for more + * details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsResponse.php new file mode 100644 index 000000000000..f3e17e57c757 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListMirroringDeploymentsResponse + */ +class ListMirroringDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The deployments from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployments = 1; + */ + private $mirroring_deployments; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\MirroringDeployment[] $mirroring_deployments + * The deployments from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * The deployments from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployments = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringDeployment> + */ + public function getMirroringDeployments() + { + return $this->mirroring_deployments; + } + + /** + * The deployments from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployments = 1; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeployment[] $var + * @return $this + */ + public function setMirroringDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringDeployment::class); + $this->mirroring_deployments = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsRequest.php new file mode 100644 index 000000000000..48c7fd61c7ec --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsRequest.php @@ -0,0 +1,259 @@ +google.cloud.networksecurity.v1.ListMirroringEndpointGroupAssociationsRequest + */ +class ListMirroringEndpointGroupAssociationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. Please see + * {@see MirroringClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListMirroringEndpointGroupAssociationsRequest + * + * @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 parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of associations. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsResponse.php new file mode 100644 index 000000000000..d617e88a7eba --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListMirroringEndpointGroupAssociationsResponse + */ +class ListMirroringEndpointGroupAssociationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The associations from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_associations = 1; + */ + private $mirroring_endpoint_group_associations; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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 \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation[] $mirroring_endpoint_group_associations + * The associations from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * The associations from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_associations = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation> + */ + public function getMirroringEndpointGroupAssociations() + { + return $this->mirroring_endpoint_group_associations; + } + + /** + * The associations from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_associations = 1; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation[] $var + * @return $this + */ + public function setMirroringEndpointGroupAssociations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation::class); + $this->mirroring_endpoint_group_associations = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsRequest.php new file mode 100644 index 000000000000..b59482fb1c7c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsRequest.php @@ -0,0 +1,263 @@ +google.cloud.networksecurity.v1.ListMirroringEndpointGroupsRequest + */ +class ListMirroringEndpointGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. Please see + * {@see MirroringClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListMirroringEndpointGroupsRequest + * + * @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 parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * @type string $filter + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * @type string $order_by + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of endpoint groups. + * Example: `projects/123456789/locations/global`. + * See https://google.aip.dev/132 for more details. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. See + * https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * + * 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 + * `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `ListMirroringEndpointGroups` must match the call that provided the page + * token. + * See https://google.aip.dev/158 for more details. + * + * 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; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression. + * See https://google.aip.dev/160#filtering for more details. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort expression. + * See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsResponse.php new file mode 100644 index 000000000000..ea5eaf5a6ce4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListMirroringEndpointGroupsResponse + */ +class ListMirroringEndpointGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The endpoint groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_groups = 1; + */ + private $mirroring_endpoint_groups; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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 \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup[] $mirroring_endpoint_groups + * The endpoint groups from the specified parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * The endpoint groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_groups = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup> + */ + public function getMirroringEndpointGroups() + { + return $this->mirroring_endpoint_groups; + } + + /** + * The endpoint groups from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_groups = 1; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup[] $var + * @return $this + */ + public function setMirroringEndpointGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup::class); + $this->mirroring_endpoint_groups = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * See https://google.aip.dev/158 for more details. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsRequest.php new file mode 100644 index 000000000000..05b5eba79b98 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListSecurityProfileGroupsRequest + */ +class ListSecurityProfileGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project or organization and location from which the + * SecurityProfileGroups should be listed, specified in the format + * `projects|organizations/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of SecurityProfileGroups to return per call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The value returned by the last + * `ListSecurityProfileGroupsResponse` Indicates that this is a + * continuation of a prior `ListSecurityProfileGroups` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project or organization and location from which the + * SecurityProfileGroups should be listed, specified in the format + * `projects|organizations/*/locations/{location}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListSecurityProfileGroupsRequest + * + * @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 project or organization and location from which the + * SecurityProfileGroups should be listed, specified in the format + * `projects|organizations/{@*}locations/{location}`. + * @type int $page_size + * Optional. Maximum number of SecurityProfileGroups to return per call. + * @type string $page_token + * Optional. The value returned by the last + * `ListSecurityProfileGroupsResponse` Indicates that this is a + * continuation of a prior `ListSecurityProfileGroups` call, and + * that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project or organization and location from which the + * SecurityProfileGroups should be listed, specified in the format + * `projects|organizations/{@*}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 project or organization and location from which the + * SecurityProfileGroups should be listed, specified in the format + * `projects|organizations/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of SecurityProfileGroups to return per call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of SecurityProfileGroups to return per call. + * + * 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 + * `ListSecurityProfileGroupsResponse` Indicates that this is a + * continuation of a prior `ListSecurityProfileGroups` call, and + * that the system should return the next page of data. + * + * 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 + * `ListSecurityProfileGroupsResponse` Indicates that this is a + * continuation of a prior `ListSecurityProfileGroups` call, and + * that the system should return the next page of data. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsResponse.php new file mode 100644 index 000000000000..50a6c1ae9e2f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListSecurityProfileGroupsResponse + */ +class ListSecurityProfileGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of SecurityProfileGroups resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_groups = 1; + */ + private $security_profile_groups; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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 \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup[] $security_profile_groups + * List of SecurityProfileGroups resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * List of SecurityProfileGroups resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_groups = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup> + */ + public function getSecurityProfileGroups() + { + return $this->security_profile_groups; + } + + /** + * List of SecurityProfileGroups resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_groups = 1; + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup[] $var + * @return $this + */ + public function setSecurityProfileGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup::class); + $this->security_profile_groups = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesRequest.php new file mode 100644 index 000000000000..36fd2cca3aea --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListSecurityProfilesRequest + */ +class ListSecurityProfilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project or organization and location from which the + * SecurityProfiles should be listed, specified in the format + * `projects|organizations/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of SecurityProfiles to return per call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The value returned by the last + * `ListSecurityProfilesResponse` Indicates that this is a continuation of a + * prior `ListSecurityProfiles` call, and that the system should return the + * next page of data. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project or organization and location from which the + * SecurityProfiles should be listed, specified in the format + * `projects|organizations/*/locations/{location}`. Please see + * {@see OrganizationSecurityProfileGroupServiceClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListSecurityProfilesRequest + * + * @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 project or organization and location from which the + * SecurityProfiles should be listed, specified in the format + * `projects|organizations/{@*}locations/{location}`. + * @type int $page_size + * Optional. Maximum number of SecurityProfiles to return per call. + * @type string $page_token + * Optional. The value returned by the last + * `ListSecurityProfilesResponse` Indicates that this is a continuation of a + * prior `ListSecurityProfiles` call, and that the system should return the + * next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project or organization and location from which the + * SecurityProfiles should be listed, specified in the format + * `projects|organizations/{@*}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 project or organization and location from which the + * SecurityProfiles should be listed, specified in the format + * `projects|organizations/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of SecurityProfiles to return per call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of SecurityProfiles to return per call. + * + * 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 + * `ListSecurityProfilesResponse` Indicates that this is a continuation of a + * prior `ListSecurityProfiles` call, and that the system should return the + * next page of data. + * + * 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 + * `ListSecurityProfilesResponse` Indicates that this is a continuation of a + * prior `ListSecurityProfiles` call, and that the system should return the + * next page of data. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesResponse.php new file mode 100644 index 000000000000..60f4099fff89 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListSecurityProfilesResponse + */ +class ListSecurityProfilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of SecurityProfile resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SecurityProfile security_profiles = 1; + */ + private $security_profiles; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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 \Google\Cloud\NetworkSecurity\V1\SecurityProfile[] $security_profiles + * List of SecurityProfile resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * List of SecurityProfile resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SecurityProfile security_profiles = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\SecurityProfile> + */ + public function getSecurityProfiles() + { + return $this->security_profiles; + } + + /** + * List of SecurityProfile resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SecurityProfile security_profiles = 1; + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfile[] $var + * @return $this + */ + public function setSecurityProfiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\SecurityProfile::class); + $this->security_profiles = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php new file mode 100644 index 000000000000..63dd0b8cfe3b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php @@ -0,0 +1,216 @@ +google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest + */ +class ListServerTlsPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/{@*}locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of ServerTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $return_partial_success = false; + + /** + * @param string $parent Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesRequest + * + * @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 project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/{@*}locations/{location}`. + * @type int $page_size + * Maximum number of ServerTlsPolicies to return per call. + * @type string $page_token + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * @type bool $return_partial_success + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/{@*}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 project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/{@*}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; + } + + /** + * Maximum number of ServerTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of ServerTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getReturnPartialSuccess() + { + return $this->return_partial_success; + } + + /** + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php new file mode 100644 index 000000000000..715750ede395 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php @@ -0,0 +1,151 @@ +google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse + */ +class ListServerTlsPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of ServerTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; + */ + private $server_tls_policies; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy[] $server_tls_policies + * List of ServerTlsPolicy resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type string[] $unreachable + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of ServerTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy> + */ + public function getServerTlsPolicies() + { + return $this->server_tls_policies; + } + + /** + * List of ServerTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy[] $var + * @return $this + */ + public function setServerTlsPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); + $this->server_tls_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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; + } + + /** + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesRequest.php new file mode 100644 index 000000000000..7955335ba30f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListTlsInspectionPoliciesRequest + */ +class ListTlsInspectionPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the TlsInspectionPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of TlsInspectionPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * 'ListTlsInspectionPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListTlsInspectionPolicies' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the TlsInspectionPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListTlsInspectionPoliciesRequest + * + * @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 project and location from which the TlsInspectionPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Maximum number of TlsInspectionPolicies to return per call. + * @type string $page_token + * The value returned by the last + * 'ListTlsInspectionPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListTlsInspectionPolicies' call, and + * that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the TlsInspectionPolicies + * should be listed, specified in the format + * `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 project and location from which the TlsInspectionPolicies + * should be listed, specified in the format + * `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; + } + + /** + * Maximum number of TlsInspectionPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of TlsInspectionPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last + * 'ListTlsInspectionPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListTlsInspectionPolicies' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last + * 'ListTlsInspectionPoliciesResponse' Indicates that this is a + * continuation of a prior 'ListTlsInspectionPolicies' call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesResponse.php new file mode 100644 index 000000000000..7d015115040e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListTlsInspectionPoliciesResponse + */ +class ListTlsInspectionPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of TlsInspectionPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policies = 1; + */ + private $tls_inspection_policies; + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy[] $tls_inspection_policies + * List of TlsInspectionPolicies resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of TlsInspectionPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policies = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy> + */ + public function getTlsInspectionPolicies() + { + return $this->tls_inspection_policies; + } + + /** + * List of TlsInspectionPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policies = 1; + * @param \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy[] $var + * @return $this + */ + public function setTlsInspectionPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy::class); + $this->tls_inspection_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * 'next_page_token' is included. To get the next set of results, call this + * method again using the value of 'next_page_token' as 'page_token'. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsRequest.php new file mode 100644 index 000000000000..ec6689148098 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListUrlListsRequest + */ +class ListUrlListsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the UrlLists should + * be listed, specified in the format + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of UrlLists to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListUrlListsResponse` + * Indicates that this is a continuation of a prior + * `ListUrlLists` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the UrlLists should + * be listed, specified in the format + * `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListUrlListsRequest + * + * @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 project and location from which the UrlLists should + * be listed, specified in the format + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Maximum number of UrlLists to return per call. + * @type string $page_token + * The value returned by the last `ListUrlListsResponse` + * Indicates that this is a continuation of a prior + * `ListUrlLists` call, and that the system + * should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the UrlLists should + * be listed, specified in the format + * `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 project and location from which the UrlLists should + * be listed, specified in the format + * `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; + } + + /** + * Maximum number of UrlLists to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of UrlLists to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListUrlListsResponse` + * Indicates that this is a continuation of a prior + * `ListUrlLists` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListUrlListsResponse` + * Indicates that this is a continuation of a prior + * `ListUrlLists` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsResponse.php new file mode 100644 index 000000000000..c50c6bdc6305 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsResponse.php @@ -0,0 +1,143 @@ +google.cloud.networksecurity.v1.ListUrlListsResponse + */ +class ListUrlListsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of UrlList resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.UrlList url_lists = 1; + */ + private $url_lists; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\UrlList[] $url_lists + * List of UrlList resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); + parent::__construct($data); + } + + /** + * List of UrlList resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.UrlList url_lists = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\UrlList> + */ + public function getUrlLists() + { + return $this->url_lists; + } + + /** + * List of UrlList resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.UrlList url_lists = 1; + * @param \Google\Cloud\NetworkSecurity\V1\UrlList[] $var + * @return $this + */ + public function setUrlLists($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\UrlList::class); + $this->url_lists = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment.php new file mode 100644 index 000000000000..fe22c310c4e9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment.php @@ -0,0 +1,426 @@ +google.cloud.networksecurity.v1.MirroringDeployment + */ +class MirroringDeployment extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/mirroringDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The regional forwarding rule that fronts the mirroring + * collectors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. See + * https://google.aip.dev/124. + * + * Generated from protobuf field string forwarding_rule = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $forwarding_rule = ''; + /** + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_deployment_group = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $mirroring_deployment_group = ''; + /** + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/mirroringDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $forwarding_rule + * Required. Immutable. The regional forwarding rule that fronts the mirroring + * collectors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. See + * https://google.aip.dev/124. + * @type string $mirroring_deployment_group + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * @type int $state + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * @type string $description + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/mirroringDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this deployment, for example: + * `projects/123456789/locations/us-central1-a/mirroringDeployments/my-dep`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The regional forwarding rule that fronts the mirroring + * collectors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. See + * https://google.aip.dev/124. + * + * Generated from protobuf field string forwarding_rule = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getForwardingRule() + { + return $this->forwarding_rule; + } + + /** + * Required. Immutable. The regional forwarding rule that fronts the mirroring + * collectors, for example: + * `projects/123456789/regions/us-central1/forwardingRules/my-rule`. See + * https://google.aip.dev/124. + * + * Generated from protobuf field string forwarding_rule = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setForwardingRule($var) + { + GPBUtil::checkString($var, True); + $this->forwarding_rule = $var; + + return $this; + } + + /** + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_deployment_group = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getMirroringDeploymentGroup() + { + return $this->mirroring_deployment_group; + } + + /** + * Required. Immutable. The deployment group that this deployment is a part + * of, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_deployment_group = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMirroringDeploymentGroup($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_deployment_group = $var; + + return $this; + } + + /** + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the deployment. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringDeployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. linking a new association to the parent group). + * See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description of the deployment. + * Used as additional context for the deployment. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment/State.php new file mode 100644 index 000000000000..e543cdd4ab4d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment/State.php @@ -0,0 +1,87 @@ +google.cloud.networksecurity.v1.MirroringDeployment.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The deployment is ready and in sync with the parent group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The deployment is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The deployment is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The deployment is out of sync with the parent group. + * In most cases, this is a result of a transient issue within the system + * (e.g. a delayed data-path config) and the system is expected to recover + * automatically. See the parent deployment group's state for more details. + * + * Generated from protobuf enum OUT_OF_SYNC = 4; + */ + const OUT_OF_SYNC = 4; + /** + * An attempt to delete the deployment has failed. This is a terminal state + * and the deployment is not expected to recover. The only permitted + * operation is to retry deleting the deployment. + * + * Generated from protobuf enum DELETE_FAILED = 5; + */ + const DELETE_FAILED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + self::DELETE_FAILED => 'DELETE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup.php new file mode 100644 index 000000000000..0e06d298c3b4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup.php @@ -0,0 +1,494 @@ +google.cloud.networksecurity.v1.MirroringDeploymentGroup + */ +class MirroringDeploymentGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. The list of endpoint groups that are connected to this + * resource. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup.ConnectedEndpointGroup connected_endpoint_groups = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $connected_endpoint_groups; + /** + * Output only. The list of Mirroring Deployments that belong to this group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup.Deployment nested_deployments = 10 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + private $nested_deployments; + /** + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $network + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\ConnectedEndpointGroup[] $connected_endpoint_groups + * Output only. The list of endpoint groups that are connected to this + * resource. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\Deployment[] $nested_deployments + * Output only. The list of Mirroring Deployments that belong to this group. + * @type int $state + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * @type string $description + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringLocation[] $locations + * Output only. The list of locations where the deployment group is present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this deployment group, for + * example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. Immutable. The network that will be used for all child + * deployments, for example: `projects/{project}/global/networks/{network}`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The list of endpoint groups that are connected to this + * resource. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup.ConnectedEndpointGroup connected_endpoint_groups = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\ConnectedEndpointGroup> + */ + public function getConnectedEndpointGroups() + { + return $this->connected_endpoint_groups; + } + + /** + * Output only. The list of endpoint groups that are connected to this + * resource. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup.ConnectedEndpointGroup connected_endpoint_groups = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\ConnectedEndpointGroup[] $var + * @return $this + */ + public function setConnectedEndpointGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\ConnectedEndpointGroup::class); + $this->connected_endpoint_groups = $arr; + + return $this; + } + + /** + * Output only. The list of Mirroring Deployments that belong to this group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup.Deployment nested_deployments = 10 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\Deployment> + * @deprecated + */ + public function getNestedDeployments() + { + if ($this->nested_deployments->count() !== 0) { + @trigger_error('nested_deployments is deprecated.', E_USER_DEPRECATED); + } + return $this->nested_deployments; + } + + /** + * Output only. The list of Mirroring Deployments that belong to this group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringDeploymentGroup.Deployment nested_deployments = 10 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\Deployment[] $var + * @return $this + * @deprecated + */ + public function setNestedDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\Deployment::class); + if ($arr->count() !== 0) { + @trigger_error('nested_deployments is deprecated.', E_USER_DEPRECATED); + } + $this->nested_deployments = $arr; + + return $this; + } + + /** + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the deployment group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new deployment to the group) See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description of the deployment group. + * Used as additional context for the deployment group. + * + * Generated from protobuf field string description = 9 [(.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 list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringLocation> + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringLocation[] $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringLocation::class); + $this->locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php new file mode 100644 index 000000000000..8db53e106d84 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php @@ -0,0 +1,75 @@ +google.cloud.networksecurity.v1.MirroringDeploymentGroup.ConnectedEndpointGroup + */ +class ConnectedEndpointGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connected endpoint group's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/Deployment.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/Deployment.php new file mode 100644 index 000000000000..dd44dea5ad01 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/Deployment.php @@ -0,0 +1,105 @@ +google.cloud.networksecurity.v1.MirroringDeploymentGroup.Deployment + */ +class Deployment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the Mirroring Deployment, in the format: + * `projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. Most recent known state of the deployment. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the Mirroring Deployment, in the format: + * `projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}`. + * @type int $state + * Output only. Most recent known state of the deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the Mirroring Deployment, in the format: + * `projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the Mirroring Deployment, in the format: + * `projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Most recent known state of the deployment. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Most recent known state of the deployment. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringDeployment\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/State.php new file mode 100644 index 000000000000..952d28fdb1b4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/State.php @@ -0,0 +1,75 @@ +google.cloud.networksecurity.v1.MirroringDeploymentGroup.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The deployment group is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The deployment group is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The deployment group is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The deployment group is being wiped out (project deleted). + * + * Generated from protobuf enum CLOSED = 4; + */ + const CLOSED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::CLOSED => 'CLOSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup.php new file mode 100644 index 000000000000..f7822adc2ea6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup.php @@ -0,0 +1,495 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroup + */ +class MirroringEndpointGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Immutable. The deployment group that this DIRECT endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_deployment_group = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $mirroring_deployment_group = ''; + /** + * Output only. List of details about the connected deployment groups to this + * endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup.ConnectedDeploymentGroup connected_deployment_groups = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $connected_deployment_groups; + /** + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Immutable. The type of the endpoint group. + * If left unspecified, defaults to DIRECT. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Output only. List of associations to this endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup.AssociationDetails associations = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $associations; + /** + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * + * Generated from protobuf field string description = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $mirroring_deployment_group + * Immutable. The deployment group that this DIRECT endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\ConnectedDeploymentGroup[] $connected_deployment_groups + * Output only. List of details about the connected deployment groups to this + * endpoint group. + * @type int $state + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * @type int $type + * Immutable. The type of the endpoint group. + * If left unspecified, defaults to DIRECT. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\AssociationDetails[] $associations + * Output only. List of associations to this endpoint group. + * @type string $description + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this endpoint group, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Immutable. The deployment group that this DIRECT endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_deployment_group = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getMirroringDeploymentGroup() + { + return $this->mirroring_deployment_group; + } + + /** + * Immutable. The deployment group that this DIRECT endpoint group is + * connected to, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_deployment_group = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMirroringDeploymentGroup($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_deployment_group = $var; + + return $this; + } + + /** + * Output only. List of details about the connected deployment groups to this + * endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup.ConnectedDeploymentGroup connected_deployment_groups = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\ConnectedDeploymentGroup> + */ + public function getConnectedDeploymentGroups() + { + return $this->connected_deployment_groups; + } + + /** + * Output only. List of details about the connected deployment groups to this + * endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup.ConnectedDeploymentGroup connected_deployment_groups = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\ConnectedDeploymentGroup[] $var + * @return $this + */ + public function setConnectedDeploymentGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\ConnectedDeploymentGroup::class); + $this->connected_deployment_groups = $arr; + + return $this; + } + + /** + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the endpoint group. + * See https://google.aip.dev/216. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This is part + * of the normal operation (e.g. adding a new association to the group). See + * https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Immutable. The type of the endpoint group. + * If left unspecified, defaults to DIRECT. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Immutable. The type of the endpoint group. + * If left unspecified, defaults to DIRECT. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. List of associations to this endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup.AssociationDetails associations = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\AssociationDetails> + */ + public function getAssociations() + { + return $this->associations; + } + + /** + * Output only. List of associations to this endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroup.AssociationDetails associations = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\AssociationDetails[] $var + * @return $this + */ + public function setAssociations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup\AssociationDetails::class); + $this->associations = $arr; + + return $this; + } + + /** + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * + * Generated from protobuf field string description = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description of the endpoint group. + * Used as additional context for the endpoint group. + * + * Generated from protobuf field string description = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/AssociationDetails.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/AssociationDetails.php new file mode 100644 index 000000000000..512360e867e5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/AssociationDetails.php @@ -0,0 +1,151 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroup.AssociationDetails + */ +class AssociationDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. Most recent known state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * @type string $network + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * @type int $state + * Output only. Most recent known state of the association. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connected association's resource name, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-ega`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. The associated network, for example: + * projects/123456789/global/networks/my-network. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. Most recent known state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Most recent known state of the association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php new file mode 100644 index 000000000000..62d3c563bd22 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroup.ConnectedDeploymentGroup + */ +class ConnectedDeploymentGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringLocation[] $locations + * Output only. The list of locations where the deployment group is present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connected deployment group's resource name, for example: + * `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringLocation> + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Output only. The list of locations where the deployment group is present. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringLocation[] $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringLocation::class); + $this->locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/State.php new file mode 100644 index 000000000000..d2a8abbf0f10 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/State.php @@ -0,0 +1,96 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroup.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The endpoint group is ready and in sync with the target deployment group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The deployment group backing this endpoint group has been force-deleted. + * This endpoint group cannot be used and mirroring is effectively disabled. + * + * Generated from protobuf enum CLOSED = 2; + */ + const CLOSED = 2; + /** + * The endpoint group is being created. + * + * Generated from protobuf enum CREATING = 3; + */ + const CREATING = 3; + /** + * The endpoint group is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The endpoint group is out of sync with the backing deployment group. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. See the associations field for details per network and + * location. + * + * Generated from protobuf enum OUT_OF_SYNC = 5; + */ + const OUT_OF_SYNC = 5; + /** + * An attempt to delete the endpoint group has failed. This is a terminal + * state and the endpoint group is not expected to recover. + * The only permitted operation is to retry deleting the endpoint group. + * + * Generated from protobuf enum DELETE_FAILED = 6; + */ + const DELETE_FAILED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CLOSED => 'CLOSED', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + self::DELETE_FAILED => 'DELETE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/Type.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/Type.php new file mode 100644 index 000000000000..73740a567b7f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/Type.php @@ -0,0 +1,54 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroup.Type + */ +class Type +{ + /** + * Not set. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * An endpoint group that sends packets to a single deployment group. + * + * Generated from protobuf enum DIRECT = 1; + */ + const DIRECT = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::DIRECT => 'DIRECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation.php new file mode 100644 index 000000000000..887966d836a0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation.php @@ -0,0 +1,475 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation + */ +class MirroringEndpointGroupAssociation extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Immutable. The endpoint group that this association is connected to, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_endpoint_group = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $mirroring_endpoint_group = ''; + /** + * Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails locations_details = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + private $locations_details; + /** + * Output only. Current state of the endpoint group association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * @type string $mirroring_endpoint_group + * Immutable. The endpoint group that this association is connected to, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * @type string $network + * Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation\LocationDetails[] $locations_details + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * @type int $state + * Output only. Current state of the endpoint group association. + * @type bool $reconciling + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringLocation[] $locations + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. The resource name of this endpoint group + * association, for example: + * `projects/123456789/locations/global/mirroringEndpointGroupAssociations/my-eg-association`. + * See https://google.aip.dev/122 for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was most recently updated. + * See https://google.aip.dev/148#timestamps. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key/value pairs that help to organize and filter + * resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Immutable. The endpoint group that this association is connected to, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_endpoint_group = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getMirroringEndpointGroup() + { + return $this->mirroring_endpoint_group; + } + + /** + * Immutable. The endpoint group that this association is connected to, for + * example: + * `projects/123456789/locations/global/mirroringEndpointGroups/my-eg`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string mirroring_endpoint_group = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMirroringEndpointGroup($var) + { + GPBUtil::checkString($var, True); + $this->mirroring_endpoint_group = $var; + + return $this; + } + + /** + * Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Immutable. The VPC network that is associated. for example: + * `projects/123456789/global/networks/my-network`. + * See https://google.aip.dev/124. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails locations_details = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation\LocationDetails> + * @deprecated + */ + public function getLocationsDetails() + { + if ($this->locations_details->count() !== 0) { + @trigger_error('locations_details is deprecated.', E_USER_DEPRECATED); + } + return $this->locations_details; + } + + /** + * Output only. The list of locations where the association is present. This + * information is retrieved from the linked endpoint group, and not configured + * as part of the association itself. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails locations_details = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation\LocationDetails[] $var + * @return $this + * @deprecated + */ + public function setLocationsDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation\LocationDetails::class); + if ($arr->count() !== 0) { + @trigger_error('locations_details is deprecated.', E_USER_DEPRECATED); + } + $this->locations_details = $arr; + + return $this; + } + + /** + * Output only. Current state of the endpoint group association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the endpoint group association. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. The current state of the resource does not match the user's + * intended state, and the system is working to reconcile them. This part of + * the normal operation (e.g. adding a new location to the target deployment + * group). See https://google.aip.dev/128. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\MirroringLocation> + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Output only. The list of locations where the association is configured. + * This information is retrieved from the linked endpoint group. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.MirroringLocation locations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringLocation[] $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\MirroringLocation::class); + $this->locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails.php new file mode 100644 index 000000000000..4f953208463f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails.php @@ -0,0 +1,102 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails + */ +class LocationDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * @type int $state + * Output only. The current state of the association in this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation\LocationDetails\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php new file mode 100644 index 000000000000..9f1d2ea823fb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php @@ -0,0 +1,64 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.LocationDetails.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The association is ready and in sync with the linked endpoint group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The association is out of sync with the linked endpoint group. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. + * + * Generated from protobuf enum OUT_OF_SYNC = 2; + */ + const OUT_OF_SYNC = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/State.php new file mode 100644 index 000000000000..443678aa1115 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/State.php @@ -0,0 +1,95 @@ +google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The association is ready and in sync with the linked endpoint group. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The association is being created. + * + * Generated from protobuf enum CREATING = 3; + */ + const CREATING = 3; + /** + * The association is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The association is disabled due to a breaking change in another resource. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + /** + * The association is out of sync with the linked endpoint group. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. Check the `locations_details` field for more details. + * + * Generated from protobuf enum OUT_OF_SYNC = 6; + */ + const OUT_OF_SYNC = 6; + /** + * An attempt to delete the association has failed. This is a terminal state + * and the association is not expected to be usable as some of its resources + * have been deleted. + * The only permitted operation is to retry deleting the association. + * + * Generated from protobuf enum DELETE_FAILED = 7; + */ + const DELETE_FAILED = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::CLOSED => 'CLOSED', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + self::DELETE_FAILED => 'DELETE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation.php new file mode 100644 index 000000000000..2d10b7ad9301 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation.php @@ -0,0 +1,101 @@ +google.cloud.networksecurity.v1.MirroringLocation + */ +class MirroringLocation extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringLocation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * @type int $state + * Output only. The current state of the association in this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The cloud location, e.g. "us-central1-a" or "asia-south1". + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringLocation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the association in this location. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringLocation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\MirroringLocation\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation/State.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation/State.php new file mode 100644 index 000000000000..5495b027ccec --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation/State.php @@ -0,0 +1,64 @@ +google.cloud.networksecurity.v1.MirroringLocation.State + */ +class State +{ + /** + * State not set (this is not a valid state). + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The resource is ready and in sync in the location. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The resource is out of sync in the location. + * In most cases, this is a result of a transient issue within the system + * (e.g. an inaccessible location) and the system is expected to recover + * automatically. + * + * Generated from protobuf enum OUT_OF_SYNC = 2; + */ + const OUT_OF_SYNC = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::OUT_OF_SYNC => 'OUT_OF_SYNC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php new file mode 100644 index 000000000000..79fda59f7239 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.networksecurity.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Protocol.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Protocol.php new file mode 100644 index 000000000000..0afe7cd9ebc1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Protocol.php @@ -0,0 +1,96 @@ +google.cloud.networksecurity.v1.Protocol + */ +class Protocol +{ + /** + * Protocol not specified. + * + * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; + */ + const PROTOCOL_UNSPECIFIED = 0; + /** + * SMTP protocol + * + * Generated from protobuf enum SMTP = 1; + */ + const SMTP = 1; + /** + * SMB protocol + * + * Generated from protobuf enum SMB = 2; + */ + const SMB = 2; + /** + * POP3 protocol + * + * Generated from protobuf enum POP3 = 3; + */ + const POP3 = 3; + /** + * IMAP protocol + * + * Generated from protobuf enum IMAP = 4; + */ + const IMAP = 4; + /** + * HTTP2 protocol + * + * Generated from protobuf enum HTTP2 = 5; + */ + const HTTP2 = 5; + /** + * HTTP protocol + * + * Generated from protobuf enum HTTP = 6; + */ + const HTTP = 6; + /** + * FTP protocol + * + * Generated from protobuf enum FTP = 7; + */ + const FTP = 7; + + private static $valueToName = [ + self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', + self::SMTP => 'SMTP', + self::SMB => 'SMB', + self::POP3 => 'POP3', + self::IMAP => 'IMAP', + self::HTTP2 => 'HTTP2', + self::HTTP => 'HTTP', + self::FTP => 'FTP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php new file mode 100644 index 000000000000..5cf747f2b0ad --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php @@ -0,0 +1,196 @@ +google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest + */ +class RemoveAddressGroupItemsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AddressGroup to remove items from. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $address_group = ''; + /** + * Required. List of items to remove. + * + * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $items; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $addressGroup Required. A name of the AddressGroup to remove items from. Must be in the + * format `projects|organization/*/locations/{location}/addressGroups/*`. Please see + * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. + * @param string[] $items Required. List of items to remove. + * + * @return \Google\Cloud\NetworkSecurity\V1\RemoveAddressGroupItemsRequest + * + * @experimental + */ + public static function build(string $addressGroup, array $items): self + { + return (new self()) + ->setAddressGroup($addressGroup) + ->setItems($items); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address_group + * Required. A name of the AddressGroup to remove items from. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * @type string[] $items + * Required. List of items to remove. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AddressGroup to remove items from. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAddressGroup() + { + return $this->address_group; + } + + /** + * Required. A name of the AddressGroup to remove items from. Must be in the + * format `projects|organization/{@*}locations/{location}/addressGroups/*`. + * + * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAddressGroup($var) + { + GPBUtil::checkString($var, True); + $this->address_group = $var; + + return $this; + } + + /** + * Required. List of items to remove. + * + * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Required. List of items to remove. + * + * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->items = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile.php new file mode 100644 index 000000000000..f0c75c44f6a0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile.php @@ -0,0 +1,457 @@ +google.cloud.networksecurity.v1.SecurityProfile + */ +class SecurityProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. Name of the SecurityProfile resource. It matches + * pattern + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. An optional description of the profile. Max length 512 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Resource creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last resource update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Immutable. The single ProfileType that the SecurityProfile resource + * configures. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile.ProfileType type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + protected $profile; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\ThreatPreventionProfile $threat_prevention_profile + * The threat prevention configuration for the SecurityProfile. + * @type \Google\Cloud\NetworkSecurity\V1\CustomMirroringProfile $custom_mirroring_profile + * The custom Packet Mirroring v2 configuration for the SecurityProfile. + * @type \Google\Cloud\NetworkSecurity\V1\CustomInterceptProfile $custom_intercept_profile + * The custom TPPI configuration for the SecurityProfile. + * @type \Google\Cloud\NetworkSecurity\V1\UrlFilteringProfile $url_filtering_profile + * The URL filtering configuration for the SecurityProfile. + * @type string $name + * Immutable. Identifier. Name of the SecurityProfile resource. It matches + * pattern + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile}`. + * @type string $description + * Optional. An optional description of the profile. Max length 512 + * characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Resource creation timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last resource update timestamp. + * @type string $etag + * Output only. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. + * @type int $type + * Immutable. The single ProfileType that the SecurityProfile resource + * configures. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroup::initOnce(); + parent::__construct($data); + } + + /** + * The threat prevention configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatPreventionProfile threat_prevention_profile = 7; + * @return \Google\Cloud\NetworkSecurity\V1\ThreatPreventionProfile|null + */ + public function getThreatPreventionProfile() + { + return $this->readOneof(7); + } + + public function hasThreatPreventionProfile() + { + return $this->hasOneof(7); + } + + /** + * The threat prevention configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatPreventionProfile threat_prevention_profile = 7; + * @param \Google\Cloud\NetworkSecurity\V1\ThreatPreventionProfile $var + * @return $this + */ + public function setThreatPreventionProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ThreatPreventionProfile::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The custom Packet Mirroring v2 configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CustomMirroringProfile custom_mirroring_profile = 9; + * @return \Google\Cloud\NetworkSecurity\V1\CustomMirroringProfile|null + */ + public function getCustomMirroringProfile() + { + return $this->readOneof(9); + } + + public function hasCustomMirroringProfile() + { + return $this->hasOneof(9); + } + + /** + * The custom Packet Mirroring v2 configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CustomMirroringProfile custom_mirroring_profile = 9; + * @param \Google\Cloud\NetworkSecurity\V1\CustomMirroringProfile $var + * @return $this + */ + public function setCustomMirroringProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CustomMirroringProfile::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * The custom TPPI configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CustomInterceptProfile custom_intercept_profile = 10; + * @return \Google\Cloud\NetworkSecurity\V1\CustomInterceptProfile|null + */ + public function getCustomInterceptProfile() + { + return $this->readOneof(10); + } + + public function hasCustomInterceptProfile() + { + return $this->hasOneof(10); + } + + /** + * The custom TPPI configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CustomInterceptProfile custom_intercept_profile = 10; + * @param \Google\Cloud\NetworkSecurity\V1\CustomInterceptProfile $var + * @return $this + */ + public function setCustomInterceptProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CustomInterceptProfile::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The URL filtering configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlFilteringProfile url_filtering_profile = 12; + * @return \Google\Cloud\NetworkSecurity\V1\UrlFilteringProfile|null + */ + public function getUrlFilteringProfile() + { + return $this->readOneof(12); + } + + public function hasUrlFilteringProfile() + { + return $this->hasOneof(12); + } + + /** + * The URL filtering configuration for the SecurityProfile. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlFilteringProfile url_filtering_profile = 12; + * @param \Google\Cloud\NetworkSecurity\V1\UrlFilteringProfile $var + * @return $this + */ + public function setUrlFilteringProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\UrlFilteringProfile::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Immutable. Identifier. Name of the SecurityProfile resource. It matches + * pattern + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. Name of the SecurityProfile resource. It matches + * pattern + * `projects|organizations/{@*}locations/{location}/securityProfiles/{security_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional description of the profile. Max length 512 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. An optional description of the profile. Max length 512 + * characters. + * + * Generated from protobuf field string description = 2 [(.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. Resource creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Resource creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last resource update timestamp. + * + * 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. Last resource update timestamp. + * + * 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. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Immutable. The single ProfileType that the SecurityProfile resource + * configures. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile.ProfileType type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Immutable. The single ProfileType that the SecurityProfile resource + * configures. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile.ProfileType type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\SecurityProfile\ProfileType::class); + $this->type = $var; + + return $this; + } + + /** + * @return string + */ + public function getProfile() + { + return $this->whichOneof("profile"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile/ProfileType.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile/ProfileType.php new file mode 100644 index 000000000000..3ff87fe081d4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile/ProfileType.php @@ -0,0 +1,75 @@ +google.cloud.networksecurity.v1.SecurityProfile.ProfileType + */ +class ProfileType +{ + /** + * Profile type not specified. + * + * Generated from protobuf enum PROFILE_TYPE_UNSPECIFIED = 0; + */ + const PROFILE_TYPE_UNSPECIFIED = 0; + /** + * Profile type for threat prevention. + * + * Generated from protobuf enum THREAT_PREVENTION = 1; + */ + const THREAT_PREVENTION = 1; + /** + * Profile type for packet mirroring v2 + * + * Generated from protobuf enum CUSTOM_MIRRORING = 2; + */ + const CUSTOM_MIRRORING = 2; + /** + * Profile type for TPPI. + * + * Generated from protobuf enum CUSTOM_INTERCEPT = 3; + */ + const CUSTOM_INTERCEPT = 3; + /** + * Profile type for URL filtering. + * + * Generated from protobuf enum URL_FILTERING = 5; + */ + const URL_FILTERING = 5; + + private static $valueToName = [ + self::PROFILE_TYPE_UNSPECIFIED => 'PROFILE_TYPE_UNSPECIFIED', + self::THREAT_PREVENTION => 'THREAT_PREVENTION', + self::CUSTOM_MIRRORING => 'CUSTOM_MIRRORING', + self::CUSTOM_INTERCEPT => 'CUSTOM_INTERCEPT', + self::URL_FILTERING => 'URL_FILTERING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfileGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfileGroup.php new file mode 100644 index 000000000000..aae55456f389 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfileGroup.php @@ -0,0 +1,468 @@ +google.cloud.networksecurity.v1.SecurityProfileGroup + */ +class SecurityProfileGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Identifier. Name of the SecurityProfileGroup resource. It + * matches pattern + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. An optional description of the profile group. Max length 2048 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Resource creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last resource update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * Output only. Identifier used by the data-path. Unique within {container, + * location}. + * + * Generated from protobuf field uint64 data_path_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_path_id = 0; + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Reference to a SecurityProfile with the ThreatPrevention + * configuration. + * + * Generated from protobuf field string threat_prevention_profile = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $threat_prevention_profile = ''; + /** + * Optional. Reference to a SecurityProfile with the CustomMirroring + * configuration. + * + * Generated from protobuf field string custom_mirroring_profile = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $custom_mirroring_profile = ''; + /** + * Optional. Reference to a SecurityProfile with the CustomIntercept + * configuration. + * + * Generated from protobuf field string custom_intercept_profile = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $custom_intercept_profile = ''; + /** + * Optional. Reference to a SecurityProfile with the UrlFiltering + * configuration. + * + * Generated from protobuf field string url_filtering_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $url_filtering_profile = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Identifier. Name of the SecurityProfileGroup resource. It + * matches pattern + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * @type string $description + * Optional. An optional description of the profile group. Max length 2048 + * characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Resource creation timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last resource update timestamp. + * @type string $etag + * Output only. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type int|string $data_path_id + * Output only. Identifier used by the data-path. Unique within {container, + * location}. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. + * @type string $threat_prevention_profile + * Optional. Reference to a SecurityProfile with the ThreatPrevention + * configuration. + * @type string $custom_mirroring_profile + * Optional. Reference to a SecurityProfile with the CustomMirroring + * configuration. + * @type string $custom_intercept_profile + * Optional. Reference to a SecurityProfile with the CustomIntercept + * configuration. + * @type string $url_filtering_profile + * Optional. Reference to a SecurityProfile with the UrlFiltering + * configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroup::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Identifier. Name of the SecurityProfileGroup resource. It + * matches pattern + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Identifier. Name of the SecurityProfileGroup resource. It + * matches pattern + * `projects|organizations/{@*}locations/{location}/securityProfileGroups/{security_profile_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional description of the profile group. Max length 2048 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. An optional description of the profile group. Max length 2048 + * characters. + * + * Generated from protobuf field string description = 2 [(.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. Resource creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Resource creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last resource update timestamp. + * + * 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. Last resource update timestamp. + * + * 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. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. Identifier used by the data-path. Unique within {container, + * location}. + * + * Generated from protobuf field uint64 data_path_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getDataPathId() + { + return $this->data_path_id; + } + + /** + * Output only. Identifier used by the data-path. Unique within {container, + * location}. + * + * Generated from protobuf field uint64 data_path_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDataPathId($var) + { + GPBUtil::checkUint64($var); + $this->data_path_id = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Reference to a SecurityProfile with the ThreatPrevention + * configuration. + * + * Generated from protobuf field string threat_prevention_profile = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getThreatPreventionProfile() + { + return $this->threat_prevention_profile; + } + + /** + * Optional. Reference to a SecurityProfile with the ThreatPrevention + * configuration. + * + * Generated from protobuf field string threat_prevention_profile = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setThreatPreventionProfile($var) + { + GPBUtil::checkString($var, True); + $this->threat_prevention_profile = $var; + + return $this; + } + + /** + * Optional. Reference to a SecurityProfile with the CustomMirroring + * configuration. + * + * Generated from protobuf field string custom_mirroring_profile = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCustomMirroringProfile() + { + return $this->custom_mirroring_profile; + } + + /** + * Optional. Reference to a SecurityProfile with the CustomMirroring + * configuration. + * + * Generated from protobuf field string custom_mirroring_profile = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCustomMirroringProfile($var) + { + GPBUtil::checkString($var, True); + $this->custom_mirroring_profile = $var; + + return $this; + } + + /** + * Optional. Reference to a SecurityProfile with the CustomIntercept + * configuration. + * + * Generated from protobuf field string custom_intercept_profile = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCustomInterceptProfile() + { + return $this->custom_intercept_profile; + } + + /** + * Optional. Reference to a SecurityProfile with the CustomIntercept + * configuration. + * + * Generated from protobuf field string custom_intercept_profile = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCustomInterceptProfile($var) + { + GPBUtil::checkString($var, True); + $this->custom_intercept_profile = $var; + + return $this; + } + + /** + * Optional. Reference to a SecurityProfile with the UrlFiltering + * configuration. + * + * Generated from protobuf field string url_filtering_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getUrlFilteringProfile() + { + return $this->url_filtering_profile; + } + + /** + * Optional. Reference to a SecurityProfile with the UrlFiltering + * configuration. + * + * Generated from protobuf field string url_filtering_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUrlFilteringProfile($var) + { + GPBUtil::checkString($var, True); + $this->url_filtering_profile = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php new file mode 100644 index 000000000000..86356418b237 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php @@ -0,0 +1,432 @@ +google.cloud.networksecurity.v1.ServerTlsPolicy + */ +class ServerTlsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Free-text description of the resource. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * + * Generated from protobuf field bool allow_open = 6; + */ + protected $allow_open = false; + /** + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; + */ + protected $server_certificate = null; + /** + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; + */ + protected $mtls_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` + * @type string $description + * Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of label tags associated with the resource. + * @type bool $allow_open + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $server_certificate + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $mtls_policy + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Free-text description of the resource. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Free-text description of the resource. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; + } + + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * + * Generated from protobuf field bool allow_open = 6; + * @return bool + */ + public function getAllowOpen() + { + return $this->allow_open; + } + + /** + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * + * Generated from protobuf field bool allow_open = 6; + * @param bool $var + * @return $this + */ + public function setAllowOpen($var) + { + GPBUtil::checkBool($var); + $this->allow_open = $var; + + return $this; + } + + /** + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null + */ + public function getServerCertificate() + { + return $this->server_certificate; + } + + public function hasServerCertificate() + { + return isset($this->server_certificate); + } + + public function clearServerCertificate() + { + unset($this->server_certificate); + } + + /** + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var + * @return $this + */ + public function setServerCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); + $this->server_certificate = $var; + + return $this; + } + + /** + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; + * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy|null + */ + public function getMtlsPolicy() + { + return $this->mtls_policy; + } + + public function hasMtlsPolicy() + { + return isset($this->mtls_policy); + } + + public function clearMtlsPolicy() + { + unset($this->mtls_policy); + } + + /** + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $var + * @return $this + */ + public function setMtlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy::class); + $this->mtls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php new file mode 100644 index 000000000000..cd12e01e6eff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy + */ +class MTLSPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; + */ + protected $client_validation_mode = 0; + /** + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; + */ + private $client_validation_ca; + /** + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. + * + * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { + */ + protected $client_validation_trust_config = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $client_validation_mode + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. + * @type \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $client_validation_ca + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * @type string $client_validation_trust_config + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; + * @return int + */ + public function getClientValidationMode() + { + return $this->client_validation_mode; + } + + /** + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; + * @param int $var + * @return $this + */ + public function setClientValidationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy\ClientValidationMode::class); + $this->client_validation_mode = $var; + + return $this; + } + + /** + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ValidationCA> + */ + public function getClientValidationCa() + { + return $this->client_validation_ca; + } + + /** + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; + * @param \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $var + * @return $this + */ + public function setClientValidationCa($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); + $this->client_validation_ca = $arr; + + return $this; + } + + /** + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. + * + * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getClientValidationTrustConfig() + { + return $this->client_validation_trust_config; + } + + /** + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. + * + * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setClientValidationTrustConfig($var) + { + GPBUtil::checkString($var, True); + $this->client_validation_trust_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php new file mode 100644 index 000000000000..a70ae8102c31 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php @@ -0,0 +1,70 @@ +google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode + */ +class ClientValidationMode +{ + /** + * Not allowed. + * + * Generated from protobuf enum CLIENT_VALIDATION_MODE_UNSPECIFIED = 0; + */ + const CLIENT_VALIDATION_MODE_UNSPECIFIED = 0; + /** + * Allow connection even if certificate chain validation + * of the client certificate failed or no client certificate was + * presented. The proof of possession of the private key is always checked + * if client certificate was presented. This mode requires the backend to + * implement processing of data extracted from a client certificate to + * authenticate the peer, or to reject connections if the client + * certificate fingerprint is missing. + * + * Generated from protobuf enum ALLOW_INVALID_OR_MISSING_CLIENT_CERT = 1; + */ + const ALLOW_INVALID_OR_MISSING_CLIENT_CERT = 1; + /** + * Require a client certificate and allow connection to the backend only + * if validation of the client certificate passed. + * If set, requires a reference to non-empty TrustConfig specified in + * `client_validation_trust_config`. + * + * Generated from protobuf enum REJECT_INVALID = 2; + */ + const REJECT_INVALID = 2; + + private static $valueToName = [ + self::CLIENT_VALIDATION_MODE_UNSPECIFIED => 'CLIENT_VALIDATION_MODE_UNSPECIFIED', + self::ALLOW_INVALID_OR_MISSING_CLIENT_CERT => 'ALLOW_INVALID_OR_MISSING_CLIENT_CERT', + self::REJECT_INVALID => 'REJECT_INVALID', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Severity.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Severity.php new file mode 100644 index 000000000000..3ced4cab7b94 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Severity.php @@ -0,0 +1,95 @@ +google.cloud.networksecurity.v1.Severity + */ +class Severity +{ + /** + * Severity level not specified. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Suspicious events that do not pose an immediate threat, but that are + * reported to call attention to deeper problems that could possibly exist. + * + * Generated from protobuf enum INFORMATIONAL = 1; + */ + const INFORMATIONAL = 1; + /** + * Warning-level threats that have very little impact on an organization's + * infrastructure. They usually require local or physical system access and + * may often result in victim privacy issues and information leakage. + * + * Generated from protobuf enum LOW = 2; + */ + const LOW = 2; + /** + * Minor threats in which impact is minimized, that do not compromise the + * target or exploits that require an attacker to reside on the same local + * network as the victim, affect only non-standard configurations or obscure + * applications, or provide very limited access. + * + * Generated from protobuf enum MEDIUM = 3; + */ + const MEDIUM = 3; + /** + * Threats that have the ability to become critical but have mitigating + * factors; for example, they may be difficult to exploit, do not result in + * elevated privileges, or do not have a large victim pool. + * + * Generated from protobuf enum HIGH = 4; + */ + const HIGH = 4; + /** + * Serious threats, such as those that affect default installations of widely + * deployed software, result in root compromise of servers, and the exploit + * code is widely available to attackers. The attacker usually does not need + * any special authentication credentials or knowledge about the individual + * victims and the target does not need to be manipulated into performing any + * special functions. + * + * Generated from protobuf enum CRITICAL = 5; + */ + const CRITICAL = 5; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::INFORMATIONAL => 'INFORMATIONAL', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + self::CRITICAL => 'CRITICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SeverityOverride.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SeverityOverride.php new file mode 100644 index 000000000000..c6e7aecbd680 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SeverityOverride.php @@ -0,0 +1,101 @@ +google.cloud.networksecurity.v1.SeverityOverride + */ +class SeverityOverride extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Severity level to match. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.Severity severity = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $severity = 0; + /** + * Required. Threat action override. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $severity + * Required. Severity level to match. + * @type int $action + * Required. Threat action override. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupThreatprevention::initOnce(); + parent::__construct($data); + } + + /** + * Required. Severity level to match. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.Severity severity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Required. Severity level to match. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.Severity severity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Required. Threat action override. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. Threat action override. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\ThreatAction::class); + $this->action = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatAction.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatAction.php new file mode 100644 index 000000000000..a0a8f1be21f0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatAction.php @@ -0,0 +1,77 @@ +google.cloud.networksecurity.v1.ThreatAction + */ +class ThreatAction +{ + /** + * Threat action not specified. + * + * Generated from protobuf enum THREAT_ACTION_UNSPECIFIED = 0; + */ + const THREAT_ACTION_UNSPECIFIED = 0; + /** + * The default action (as specified by the vendor) is taken. + * + * Generated from protobuf enum DEFAULT_ACTION = 4; + */ + const DEFAULT_ACTION = 4; + /** + * The packet matching this rule will be allowed to transmit. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * The packet matching this rule will be allowed to transmit, but a threat_log + * entry will be sent to the consumer project. + * + * Generated from protobuf enum ALERT = 2; + */ + const ALERT = 2; + /** + * The packet matching this rule will be dropped, and a threat_log entry will + * be sent to the consumer project. + * + * Generated from protobuf enum DENY = 3; + */ + const DENY = 3; + + private static $valueToName = [ + self::THREAT_ACTION_UNSPECIFIED => 'THREAT_ACTION_UNSPECIFIED', + self::DEFAULT_ACTION => 'DEFAULT_ACTION', + self::ALLOW => 'ALLOW', + self::ALERT => 'ALERT', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatOverride.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatOverride.php new file mode 100644 index 000000000000..4d65ff0dd103 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatOverride.php @@ -0,0 +1,139 @@ +google.cloud.networksecurity.v1.ThreatOverride + */ +class ThreatOverride extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Vendor-specific ID of a threat to override. + * + * Generated from protobuf field string threat_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $threat_id = ''; + /** + * Output only. Type of the threat (read only). + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatType type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $threat_id + * Required. Vendor-specific ID of a threat to override. + * @type int $type + * Output only. Type of the threat (read only). + * @type int $action + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupThreatprevention::initOnce(); + parent::__construct($data); + } + + /** + * Required. Vendor-specific ID of a threat to override. + * + * Generated from protobuf field string threat_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getThreatId() + { + return $this->threat_id; + } + + /** + * Required. Vendor-specific ID of a threat to override. + * + * Generated from protobuf field string threat_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setThreatId($var) + { + GPBUtil::checkString($var, True); + $this->threat_id = $var; + + return $this; + } + + /** + * Output only. Type of the threat (read only). + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatType type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Type of the threat (read only). + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatType type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\ThreatType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. Threat action override. For some threat types, only a subset of + * actions applies. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ThreatAction action = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\ThreatAction::class); + $this->action = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatPreventionProfile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatPreventionProfile.php new file mode 100644 index 000000000000..469478197bb7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatPreventionProfile.php @@ -0,0 +1,144 @@ +google.cloud.networksecurity.v1.ThreatPreventionProfile + */ +class ThreatPreventionProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Configuration for overriding threats actions by severity match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SeverityOverride severity_overrides = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $severity_overrides; + /** + * Optional. Configuration for overriding threats actions by threat_id match. + * If a threat is matched both by configuration provided in severity_overrides + * and threat_overrides, the threat_overrides action is applied. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ThreatOverride threat_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $threat_overrides; + /** + * Optional. Configuration for overriding antivirus actions per protocol. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AntivirusOverride antivirus_overrides = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $antivirus_overrides; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\SeverityOverride[] $severity_overrides + * Optional. Configuration for overriding threats actions by severity match. + * @type \Google\Cloud\NetworkSecurity\V1\ThreatOverride[] $threat_overrides + * Optional. Configuration for overriding threats actions by threat_id match. + * If a threat is matched both by configuration provided in severity_overrides + * and threat_overrides, the threat_overrides action is applied. + * @type \Google\Cloud\NetworkSecurity\V1\AntivirusOverride[] $antivirus_overrides + * Optional. Configuration for overriding antivirus actions per protocol. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupThreatprevention::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Configuration for overriding threats actions by severity match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SeverityOverride severity_overrides = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\SeverityOverride> + */ + public function getSeverityOverrides() + { + return $this->severity_overrides; + } + + /** + * Optional. Configuration for overriding threats actions by severity match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.SeverityOverride severity_overrides = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\SeverityOverride[] $var + * @return $this + */ + public function setSeverityOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\SeverityOverride::class); + $this->severity_overrides = $arr; + + return $this; + } + + /** + * Optional. Configuration for overriding threats actions by threat_id match. + * If a threat is matched both by configuration provided in severity_overrides + * and threat_overrides, the threat_overrides action is applied. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ThreatOverride threat_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ThreatOverride> + */ + public function getThreatOverrides() + { + return $this->threat_overrides; + } + + /** + * Optional. Configuration for overriding threats actions by threat_id match. + * If a threat is matched both by configuration provided in severity_overrides + * and threat_overrides, the threat_overrides action is applied. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ThreatOverride threat_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\ThreatOverride[] $var + * @return $this + */ + public function setThreatOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ThreatOverride::class); + $this->threat_overrides = $arr; + + return $this; + } + + /** + * Optional. Configuration for overriding antivirus actions per protocol. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AntivirusOverride antivirus_overrides = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AntivirusOverride> + */ + public function getAntivirusOverrides() + { + return $this->antivirus_overrides; + } + + /** + * Optional. Configuration for overriding antivirus actions per protocol. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AntivirusOverride antivirus_overrides = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AntivirusOverride[] $var + * @return $this + */ + public function setAntivirusOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AntivirusOverride::class); + $this->antivirus_overrides = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatType.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatType.php new file mode 100644 index 000000000000..76fcbfb17e97 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatType.php @@ -0,0 +1,88 @@ +google.cloud.networksecurity.v1.ThreatType + */ +class ThreatType +{ + /** + * Type of threat not specified. + * + * Generated from protobuf enum THREAT_TYPE_UNSPECIFIED = 0; + */ + const THREAT_TYPE_UNSPECIFIED = 0; + /** + * Type of threat is not derivable from threat ID. An override will be + * created for all types. Firewall will ignore overridden signature ID's + * that don't exist in the specific type. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Threats related to system flaws that an attacker might otherwise attempt + * to exploit. + * + * Generated from protobuf enum VULNERABILITY = 2; + */ + const VULNERABILITY = 2; + /** + * Threats related to viruses and malware found in executables and file + * types. + * + * Generated from protobuf enum ANTIVIRUS = 3; + */ + const ANTIVIRUS = 3; + /** + * Threats related to command-and-control (C2) activity, where spyware on an + * infected client is collecting data without the user's consent and/or + * communicating with a remote attacker. + * + * Generated from protobuf enum SPYWARE = 4; + */ + const SPYWARE = 4; + /** + * Threats related to DNS. + * + * Generated from protobuf enum DNS = 5; + */ + const DNS = 5; + + private static $valueToName = [ + self::THREAT_TYPE_UNSPECIFIED => 'THREAT_TYPE_UNSPECIFIED', + self::UNKNOWN => 'UNKNOWN', + self::VULNERABILITY => 'VULNERABILITY', + self::ANTIVIRUS => 'ANTIVIRUS', + self::SPYWARE => 'SPYWARE', + self::DNS => 'DNS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy.php new file mode 100644 index 000000000000..42c3db65e500 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy.php @@ -0,0 +1,536 @@ +google.cloud.networksecurity.v1.TlsInspectionPolicy + */ +class TlsInspectionPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} + * tls_inspection_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. A CA pool resource used to issue interception certificates. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * + * Generated from protobuf field string ca_pool = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $ca_pool = ''; + /** + * Optional. A TrustConfig resource used when making a connection to the TLS + * server. This is a relative resource path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". This + * is necessary to intercept TLS connections to servers with certificates + * signed by a private CA or self-signed certificates. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field string trust_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $trust_config = ''; + /** + * Optional. If FALSE (the default), use our default set of public CAs in + * addition to any CAs specified in trust_config. These public CAs are + * currently based on the Mozilla Root Program and are subject to change over + * time. If TRUE, do not accept our default set of public CAs. Only CAs + * specified in trust_config will be accepted. This defaults to FALSE (use + * public CAs in addition to trust_config) for backwards compatibility, but + * trusting public root CAs is *not recommended* unless the traffic in + * question is outbound to public web servers. When possible, prefer setting + * this to "false" and explicitly specifying trusted CAs and certificates in a + * TrustConfig. Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field optional bool exclude_public_ca_set = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $exclude_public_ca_set = null; + /** + * Optional. Minimum TLS version that the firewall should use when negotiating + * connections with both clients and servers. If this is not set, then the + * default value is to allow the broadest set of clients and servers (TLS 1.0 + * or higher). Setting this to more restrictive values may improve security, + * but may also prevent the firewall from connecting to some clients or + * servers. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy.TlsVersion min_tls_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_tls_version = 0; + /** + * Optional. The selected Profile. If this is not set, then the default value + * is to allow the broadest set of clients and servers ("PROFILE_COMPATIBLE"). + * Setting this to more restrictive values may improve security, but may also + * prevent the TLS inspection proxy from connecting to some clients or + * servers. Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy.Profile tls_feature_profile = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tls_feature_profile = 0; + /** + * Optional. List of custom TLS cipher suites selected. + * This field is valid only if the selected tls_feature_profile is CUSTOM. + * The [compute.SslPoliciesService.ListAvailableFeatures][] method returns the + * set of features that can be specified in this list. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field repeated string custom_tls_features = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $custom_tls_features; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} + * tls_inspection_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * @type string $description + * Optional. Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $ca_pool + * Required. A CA pool resource used to issue interception certificates. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * @type string $trust_config + * Optional. A TrustConfig resource used when making a connection to the TLS + * server. This is a relative resource path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". This + * is necessary to intercept TLS connections to servers with certificates + * signed by a private CA or self-signed certificates. + * Note that Secure Web Proxy does not yet honor this field. + * @type bool $exclude_public_ca_set + * Optional. If FALSE (the default), use our default set of public CAs in + * addition to any CAs specified in trust_config. These public CAs are + * currently based on the Mozilla Root Program and are subject to change over + * time. If TRUE, do not accept our default set of public CAs. Only CAs + * specified in trust_config will be accepted. This defaults to FALSE (use + * public CAs in addition to trust_config) for backwards compatibility, but + * trusting public root CAs is *not recommended* unless the traffic in + * question is outbound to public web servers. When possible, prefer setting + * this to "false" and explicitly specifying trusted CAs and certificates in a + * TrustConfig. Note that Secure Web Proxy does not yet honor this field. + * @type int $min_tls_version + * Optional. Minimum TLS version that the firewall should use when negotiating + * connections with both clients and servers. If this is not set, then the + * default value is to allow the broadest set of clients and servers (TLS 1.0 + * or higher). Setting this to more restrictive values may improve security, + * but may also prevent the firewall from connecting to some clients or + * servers. + * Note that Secure Web Proxy does not yet honor this field. + * @type int $tls_feature_profile + * Optional. The selected Profile. If this is not set, then the default value + * is to allow the broadest set of clients and servers ("PROFILE_COMPATIBLE"). + * Setting this to more restrictive values may improve security, but may also + * prevent the TLS inspection proxy from connecting to some clients or + * servers. Note that Secure Web Proxy does not yet honor this field. + * @type string[] $custom_tls_features + * Optional. List of custom TLS cipher suites selected. + * This field is valid only if the selected tls_feature_profile is CUSTOM. + * The [compute.SslPoliciesService.ListAvailableFeatures][] method returns the + * set of features that can be specified in this list. + * Note that Secure Web Proxy does not yet honor this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} + * tls_inspection_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. Name is of the form + * projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} + * tls_inspection_policy should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; + } + + /** + * Required. A CA pool resource used to issue interception certificates. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * + * Generated from protobuf field string ca_pool = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCaPool() + { + return $this->ca_pool; + } + + /** + * Required. A CA pool resource used to issue interception certificates. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * + * Generated from protobuf field string ca_pool = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCaPool($var) + { + GPBUtil::checkString($var, True); + $this->ca_pool = $var; + + return $this; + } + + /** + * Optional. A TrustConfig resource used when making a connection to the TLS + * server. This is a relative resource path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". This + * is necessary to intercept TLS connections to servers with certificates + * signed by a private CA or self-signed certificates. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field string trust_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTrustConfig() + { + return $this->trust_config; + } + + /** + * Optional. A TrustConfig resource used when making a connection to the TLS + * server. This is a relative resource path following the form + * "projects/{project}/locations/{location}/trustConfigs/{trust_config}". This + * is necessary to intercept TLS connections to servers with certificates + * signed by a private CA or self-signed certificates. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field string trust_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTrustConfig($var) + { + GPBUtil::checkString($var, True); + $this->trust_config = $var; + + return $this; + } + + /** + * Optional. If FALSE (the default), use our default set of public CAs in + * addition to any CAs specified in trust_config. These public CAs are + * currently based on the Mozilla Root Program and are subject to change over + * time. If TRUE, do not accept our default set of public CAs. Only CAs + * specified in trust_config will be accepted. This defaults to FALSE (use + * public CAs in addition to trust_config) for backwards compatibility, but + * trusting public root CAs is *not recommended* unless the traffic in + * question is outbound to public web servers. When possible, prefer setting + * this to "false" and explicitly specifying trusted CAs and certificates in a + * TrustConfig. Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field optional bool exclude_public_ca_set = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getExcludePublicCaSet() + { + return isset($this->exclude_public_ca_set) ? $this->exclude_public_ca_set : false; + } + + public function hasExcludePublicCaSet() + { + return isset($this->exclude_public_ca_set); + } + + public function clearExcludePublicCaSet() + { + unset($this->exclude_public_ca_set); + } + + /** + * Optional. If FALSE (the default), use our default set of public CAs in + * addition to any CAs specified in trust_config. These public CAs are + * currently based on the Mozilla Root Program and are subject to change over + * time. If TRUE, do not accept our default set of public CAs. Only CAs + * specified in trust_config will be accepted. This defaults to FALSE (use + * public CAs in addition to trust_config) for backwards compatibility, but + * trusting public root CAs is *not recommended* unless the traffic in + * question is outbound to public web servers. When possible, prefer setting + * this to "false" and explicitly specifying trusted CAs and certificates in a + * TrustConfig. Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field optional bool exclude_public_ca_set = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setExcludePublicCaSet($var) + { + GPBUtil::checkBool($var); + $this->exclude_public_ca_set = $var; + + return $this; + } + + /** + * Optional. Minimum TLS version that the firewall should use when negotiating + * connections with both clients and servers. If this is not set, then the + * default value is to allow the broadest set of clients and servers (TLS 1.0 + * or higher). Setting this to more restrictive values may improve security, + * but may also prevent the firewall from connecting to some clients or + * servers. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy.TlsVersion min_tls_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinTlsVersion() + { + return $this->min_tls_version; + } + + /** + * Optional. Minimum TLS version that the firewall should use when negotiating + * connections with both clients and servers. If this is not set, then the + * default value is to allow the broadest set of clients and servers (TLS 1.0 + * or higher). Setting this to more restrictive values may improve security, + * but may also prevent the firewall from connecting to some clients or + * servers. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy.TlsVersion min_tls_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinTlsVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy\TlsVersion::class); + $this->min_tls_version = $var; + + return $this; + } + + /** + * Optional. The selected Profile. If this is not set, then the default value + * is to allow the broadest set of clients and servers ("PROFILE_COMPATIBLE"). + * Setting this to more restrictive values may improve security, but may also + * prevent the TLS inspection proxy from connecting to some clients or + * servers. Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy.Profile tls_feature_profile = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTlsFeatureProfile() + { + return $this->tls_feature_profile; + } + + /** + * Optional. The selected Profile. If this is not set, then the default value + * is to allow the broadest set of clients and servers ("PROFILE_COMPATIBLE"). + * Setting this to more restrictive values may improve security, but may also + * prevent the TLS inspection proxy from connecting to some clients or + * servers. Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy.Profile tls_feature_profile = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTlsFeatureProfile($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy\Profile::class); + $this->tls_feature_profile = $var; + + return $this; + } + + /** + * Optional. List of custom TLS cipher suites selected. + * This field is valid only if the selected tls_feature_profile is CUSTOM. + * The [compute.SslPoliciesService.ListAvailableFeatures][] method returns the + * set of features that can be specified in this list. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field repeated string custom_tls_features = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getCustomTlsFeatures() + { + return $this->custom_tls_features; + } + + /** + * Optional. List of custom TLS cipher suites selected. + * This field is valid only if the selected tls_feature_profile is CUSTOM. + * The [compute.SslPoliciesService.ListAvailableFeatures][] method returns the + * set of features that can be specified in this list. + * Note that Secure Web Proxy does not yet honor this field. + * + * Generated from protobuf field repeated string custom_tls_features = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setCustomTlsFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->custom_tls_features = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/Profile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/Profile.php new file mode 100644 index 000000000000..400cdcf71ff1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/Profile.php @@ -0,0 +1,83 @@ +google.cloud.networksecurity.v1.TlsInspectionPolicy.Profile + */ +class Profile +{ + /** + * Indicates no profile was specified. + * + * Generated from protobuf enum PROFILE_UNSPECIFIED = 0; + */ + const PROFILE_UNSPECIFIED = 0; + /** + * Compatible profile. Allows the broadest set of clients, even those + * which support only out-of-date SSL features to negotiate with the TLS + * inspection proxy. + * + * Generated from protobuf enum PROFILE_COMPATIBLE = 1; + */ + const PROFILE_COMPATIBLE = 1; + /** + * Modern profile. Supports a wide set of SSL features, allowing modern + * clients to negotiate SSL with the TLS inspection proxy. + * + * Generated from protobuf enum PROFILE_MODERN = 2; + */ + const PROFILE_MODERN = 2; + /** + * Restricted profile. Supports a reduced set of SSL features, intended to + * meet stricter compliance requirements. + * + * Generated from protobuf enum PROFILE_RESTRICTED = 3; + */ + const PROFILE_RESTRICTED = 3; + /** + * Custom profile. Allow only the set of allowed SSL features specified in + * the custom_features field of SslPolicy. + * + * Generated from protobuf enum PROFILE_CUSTOM = 4; + */ + const PROFILE_CUSTOM = 4; + + private static $valueToName = [ + self::PROFILE_UNSPECIFIED => 'PROFILE_UNSPECIFIED', + self::PROFILE_COMPATIBLE => 'PROFILE_COMPATIBLE', + self::PROFILE_MODERN => 'PROFILE_MODERN', + self::PROFILE_RESTRICTED => 'PROFILE_RESTRICTED', + self::PROFILE_CUSTOM => 'PROFILE_CUSTOM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/TlsVersion.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/TlsVersion.php new file mode 100644 index 000000000000..4d9cad914fa4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/TlsVersion.php @@ -0,0 +1,76 @@ +google.cloud.networksecurity.v1.TlsInspectionPolicy.TlsVersion + */ +class TlsVersion +{ + /** + * Indicates no TLS version was specified. + * + * Generated from protobuf enum TLS_VERSION_UNSPECIFIED = 0; + */ + const TLS_VERSION_UNSPECIFIED = 0; + /** + * TLS 1.0 + * + * Generated from protobuf enum TLS_1_0 = 1; + */ + const TLS_1_0 = 1; + /** + * TLS 1.1 + * + * Generated from protobuf enum TLS_1_1 = 2; + */ + const TLS_1_1 = 2; + /** + * TLS 1.2 + * + * Generated from protobuf enum TLS_1_2 = 3; + */ + const TLS_1_2 = 3; + /** + * TLS 1.3 + * + * Generated from protobuf enum TLS_1_3 = 4; + */ + const TLS_1_3 = 4; + + private static $valueToName = [ + self::TLS_VERSION_UNSPECIFIED => 'TLS_VERSION_UNSPECIFIED', + self::TLS_1_0 => 'TLS_1_0', + self::TLS_1_1 => 'TLS_1_1', + self::TLS_1_2 => 'TLS_1_2', + self::TLS_1_3 => 'TLS_1_3', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php new file mode 100644 index 000000000000..27927f3a44c0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php @@ -0,0 +1,230 @@ +google.cloud.networksecurity.v1.UpdateAddressGroupRequest + */ +class UpdateAddressGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AddressGroup 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated AddressGroup resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $address_group = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup Required. Updated AddressGroup resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * AddressGroup 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\NetworkSecurity\V1\UpdateAddressGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAddressGroup($addressGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * AddressGroup 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\NetworkSecurity\V1\AddressGroup $address_group + * Required. Updated AddressGroup resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AddressGroup 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AddressGroup 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) = OPTIONAL]; + * @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. Updated AddressGroup resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AddressGroup|null + */ + public function getAddressGroup() + { + return $this->address_group; + } + + public function hasAddressGroup() + { + return isset($this->address_group); + } + + public function clearAddressGroup() + { + unset($this->address_group); + } + + /** + * Required. Updated AddressGroup resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $var + * @return $this + */ + public function setAddressGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AddressGroup::class); + $this->address_group = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..dde4bdd14e15 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php @@ -0,0 +1,156 @@ +google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest + */ +class UpdateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated AuthorizationPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. Updated AuthorizationPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy 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\NetworkSecurity\V1\UpdateAuthorizationPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAuthorizationPolicy($authorizationPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy 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\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy + * Required. Updated AuthorizationPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy 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) = OPTIONAL]; + * @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. Updated AuthorizationPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null + */ + public function getAuthorizationPolicy() + { + return $this->authorization_policy; + } + + public function hasAuthorizationPolicy() + { + return isset($this->authorization_policy); + } + + public function clearAuthorizationPolicy() + { + unset($this->authorization_policy); + } + + /** + * Required. Updated AuthorizationPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var + * @return $this + */ + public function setAuthorizationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); + $this->authorization_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthzPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthzPolicyRequest.php new file mode 100644 index 000000000000..833cb1d6650a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthzPolicyRequest.php @@ -0,0 +1,230 @@ +google.cloud.networksecurity.v1.UpdateAuthzPolicyRequest + */ +class UpdateAuthzPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Used to specify the fields to be overwritten in the + * `AuthzPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. `AuthzPolicy` resource being updated. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy authz_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authz_policy = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy $authzPolicy Required. `AuthzPolicy` resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Used to specify the fields to be overwritten in the + * `AuthzPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateAuthzPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\AuthzPolicy $authzPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAuthzPolicy($authzPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Used to specify the fields to be overwritten in the + * `AuthzPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * @type \Google\Cloud\NetworkSecurity\V1\AuthzPolicy $authz_policy + * Required. `AuthzPolicy` resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Used to specify the fields to be overwritten in the + * `AuthzPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are 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. Used to specify the fields to be overwritten in the + * `AuthzPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are 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. `AuthzPolicy` resource being updated. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy authz_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthzPolicy|null + */ + public function getAuthzPolicy() + { + return $this->authz_policy; + } + + public function hasAuthzPolicy() + { + return isset($this->authz_policy); + } + + public function clearAuthzPolicy() + { + unset($this->authz_policy); + } + + /** + * Required. `AuthzPolicy` resource being updated. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthzPolicy authz_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthzPolicy $var + * @return $this + */ + public function setAuthzPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthzPolicy::class); + $this->authz_policy = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateBackendAuthenticationConfigRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateBackendAuthenticationConfigRequest.php new file mode 100644 index 000000000000..a1dbe419b6fd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateBackendAuthenticationConfigRequest.php @@ -0,0 +1,161 @@ +google.cloud.networksecurity.v1.UpdateBackendAuthenticationConfigRequest + */ +class UpdateBackendAuthenticationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * BackendAuthenticationConfig 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated BackendAuthenticationConfig resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backend_authentication_config = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig $backendAuthenticationConfig Required. Updated BackendAuthenticationConfig resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * BackendAuthenticationConfig 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\NetworkSecurity\V1\UpdateBackendAuthenticationConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig $backendAuthenticationConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackendAuthenticationConfig($backendAuthenticationConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * BackendAuthenticationConfig 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\NetworkSecurity\V1\BackendAuthenticationConfig $backend_authentication_config + * Required. Updated BackendAuthenticationConfig resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * BackendAuthenticationConfig 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * BackendAuthenticationConfig 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) = OPTIONAL]; + * @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. Updated BackendAuthenticationConfig resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig|null + */ + public function getBackendAuthenticationConfig() + { + return $this->backend_authentication_config; + } + + public function hasBackendAuthenticationConfig() + { + return isset($this->backend_authentication_config); + } + + public function clearBackendAuthenticationConfig() + { + unset($this->backend_authentication_config); + } + + /** + * Required. Updated BackendAuthenticationConfig resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.BackendAuthenticationConfig backend_authentication_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig $var + * @return $this + */ + public function setBackendAuthenticationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig::class); + $this->backend_authentication_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php new file mode 100644 index 000000000000..018c9a68ac43 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php @@ -0,0 +1,161 @@ +google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest + */ +class UpdateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated ClientTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_tls_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. Updated ClientTlsPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy 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\NetworkSecurity\V1\UpdateClientTlsPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setClientTlsPolicy($clientTlsPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy 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\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy + * Required. Updated ClientTlsPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy 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) = OPTIONAL]; + * @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. Updated ClientTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null + */ + public function getClientTlsPolicy() + { + return $this->client_tls_policy; + } + + public function hasClientTlsPolicy() + { + return isset($this->client_tls_policy); + } + + public function clearClientTlsPolicy() + { + unset($this->client_tls_policy); + } + + /** + * Required. Updated ClientTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var + * @return $this + */ + public function setClientTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); + $this->client_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateDnsThreatDetectorRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateDnsThreatDetectorRequest.php new file mode 100644 index 000000000000..1b53dec4cdbd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateDnsThreatDetectorRequest.php @@ -0,0 +1,156 @@ +google.cloud.networksecurity.v1.UpdateDnsThreatDetectorRequest + */ +class UpdateDnsThreatDetectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The field mask is used to specify the fields to be overwritten in + * the DnsThreatDetector 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 mask is not provided then + * all fields present in the request will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The DnsThreatDetector resource being updated. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detector = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns_threat_detector = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $dnsThreatDetector Required. The DnsThreatDetector resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The field mask is used to specify the fields to be overwritten in + * the DnsThreatDetector 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 mask is not provided then + * all fields present in the request will be overwritten. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateDnsThreatDetectorRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $dnsThreatDetector, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDnsThreatDetector($dnsThreatDetector) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The field mask is used to specify the fields to be overwritten in + * the DnsThreatDetector 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 mask is not provided then + * all fields present in the request will be overwritten. + * @type \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $dns_threat_detector + * Required. The DnsThreatDetector resource being updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\DnsThreatDetector::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The field mask is used to specify the fields to be overwritten in + * the DnsThreatDetector 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 mask is not provided then + * all fields present in the request will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The field mask is used to specify the fields to be overwritten in + * the DnsThreatDetector 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 mask is not provided then + * all fields present in the request will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 DnsThreatDetector resource being updated. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector|null + */ + public function getDnsThreatDetector() + { + return $this->dns_threat_detector; + } + + public function hasDnsThreatDetector() + { + return isset($this->dns_threat_detector); + } + + public function clearDnsThreatDetector() + { + unset($this->dns_threat_detector); + } + + /** + * Required. The DnsThreatDetector resource being updated. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.DnsThreatDetector dns_threat_detector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector $var + * @return $this + */ + public function setDnsThreatDetector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\DnsThreatDetector::class); + $this->dns_threat_detector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointAssociationRequest.php new file mode 100644 index 000000000000..5bd1e9c90a32 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointAssociationRequest.php @@ -0,0 +1,230 @@ +google.cloud.networksecurity.v1.UpdateFirewallEndpointAssociationRequest + */ +class UpdateFirewallEndpointAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Association 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 resource being updated + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_association = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_endpoint_association = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation $firewallEndpointAssociation Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Association 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\NetworkSecurity\V1\UpdateFirewallEndpointAssociationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation $firewallEndpointAssociation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setFirewallEndpointAssociation($firewallEndpointAssociation) + ->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 + * Association 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\NetworkSecurity\V1\FirewallEndpointAssociation $firewall_endpoint_association + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Association 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 + * Association 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 resource being updated + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_association = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation|null + */ + public function getFirewallEndpointAssociation() + { + return $this->firewall_endpoint_association; + } + + public function hasFirewallEndpointAssociation() + { + return isset($this->firewall_endpoint_association); + } + + public function clearFirewallEndpointAssociation() + { + unset($this->firewall_endpoint_association); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpointAssociation firewall_endpoint_association = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation $var + * @return $this + */ + public function setFirewallEndpointAssociation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation::class); + $this->firewall_endpoint_association = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointRequest.php new file mode 100644 index 000000000000..d71971990ffd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointRequest.php @@ -0,0 +1,230 @@ +google.cloud.networksecurity.v1.UpdateFirewallEndpointRequest + */ +class UpdateFirewallEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Endpoint 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 resource being updated + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_endpoint = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint $firewallEndpoint Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Endpoint 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\NetworkSecurity\V1\UpdateFirewallEndpointRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\FirewallEndpoint $firewallEndpoint, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setFirewallEndpoint($firewallEndpoint) + ->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 + * Endpoint 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\NetworkSecurity\V1\FirewallEndpoint $firewall_endpoint + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\FirewallActivation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Endpoint 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 + * Endpoint 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 resource being updated + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint|null + */ + public function getFirewallEndpoint() + { + return $this->firewall_endpoint; + } + + public function hasFirewallEndpoint() + { + return isset($this->firewall_endpoint); + } + + public function clearFirewallEndpoint() + { + unset($this->firewall_endpoint); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.networksecurity.v1.FirewallEndpoint firewall_endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint $var + * @return $this + */ + public function setFirewallEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\FirewallEndpoint::class); + $this->firewall_endpoint = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRequest.php new file mode 100644 index 000000000000..903cef1bc162 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRequest.php @@ -0,0 +1,156 @@ +google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRequest + */ +class UpdateGatewaySecurityPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated GatewaySecurityPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_security_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy $gatewaySecurityPolicy Required. Updated GatewaySecurityPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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\NetworkSecurity\V1\UpdateGatewaySecurityPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy $gatewaySecurityPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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\NetworkSecurity\V1\GatewaySecurityPolicy $gateway_security_policy + * Required. Updated GatewaySecurityPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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) = OPTIONAL]; + * @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. Updated GatewaySecurityPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy|null + */ + public function getGatewaySecurityPolicy() + { + return $this->gateway_security_policy; + } + + public function hasGatewaySecurityPolicy() + { + return isset($this->gateway_security_policy); + } + + public function clearGatewaySecurityPolicy() + { + unset($this->gateway_security_policy); + } + + /** + * Required. Updated GatewaySecurityPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicy gateway_security_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy $var + * @return $this + */ + public function setGatewaySecurityPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy::class); + $this->gateway_security_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRuleRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRuleRequest.php new file mode 100644 index 000000000000..33d4e19c66fa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRuleRequest.php @@ -0,0 +1,156 @@ +google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRuleRequest + */ +class UpdateGatewaySecurityPolicyRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated GatewaySecurityPolicyRule resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_security_policy_rule = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule $gatewaySecurityPolicyRule Required. Updated GatewaySecurityPolicyRule resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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\NetworkSecurity\V1\UpdateGatewaySecurityPolicyRuleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule $gatewaySecurityPolicyRule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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\NetworkSecurity\V1\GatewaySecurityPolicyRule $gateway_security_policy_rule + * Required. Updated GatewaySecurityPolicyRule resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GatewaySecurityPolicy 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) = OPTIONAL]; + * @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. Updated GatewaySecurityPolicyRule resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule|null + */ + public function getGatewaySecurityPolicyRule() + { + return $this->gateway_security_policy_rule; + } + + public function hasGatewaySecurityPolicyRule() + { + return isset($this->gateway_security_policy_rule); + } + + public function clearGatewaySecurityPolicyRule() + { + unset($this->gateway_security_policy_rule); + } + + /** + * Required. Updated GatewaySecurityPolicyRule resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule gateway_security_policy_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule $var + * @return $this + */ + public function setGatewaySecurityPolicyRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule::class); + $this->gateway_security_policy_rule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentGroupRequest.php new file mode 100644 index 000000000000..0d69508546d9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentGroupRequest.php @@ -0,0 +1,198 @@ +google.cloud.networksecurity.v1.UpdateInterceptDeploymentGroupRequest + */ +class UpdateInterceptDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `intercept_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The deployment group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_deployment_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $interceptDeploymentGroup Required. The deployment group to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `intercept_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $interceptDeploymentGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInterceptDeploymentGroup($interceptDeploymentGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `intercept_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $intercept_deployment_group + * Required. The deployment group to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `intercept_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `intercept_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 deployment group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup|null + */ + public function getInterceptDeploymentGroup() + { + return $this->intercept_deployment_group; + } + + public function hasInterceptDeploymentGroup() + { + return isset($this->intercept_deployment_group); + } + + public function clearInterceptDeploymentGroup() + { + unset($this->intercept_deployment_group); + } + + /** + * Required. The deployment group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeploymentGroup intercept_deployment_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup $var + * @return $this + */ + public function setInterceptDeploymentGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup::class); + $this->intercept_deployment_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentRequest.php new file mode 100644 index 000000000000..18770dabd864 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentRequest.php @@ -0,0 +1,193 @@ +google.cloud.networksecurity.v1.UpdateInterceptDeploymentRequest + */ +class UpdateInterceptDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `intercept_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The deployment to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_deployment = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeployment $interceptDeployment Required. The deployment to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `intercept_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\InterceptDeployment $interceptDeployment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInterceptDeployment($interceptDeployment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `intercept_deployment.description`). + * See https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptDeployment $intercept_deployment + * Required. The deployment to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `intercept_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `intercept_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 deployment to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptDeployment|null + */ + public function getInterceptDeployment() + { + return $this->intercept_deployment; + } + + public function hasInterceptDeployment() + { + return isset($this->intercept_deployment); + } + + public function clearInterceptDeployment() + { + unset($this->intercept_deployment); + } + + /** + * Required. The deployment to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptDeployment intercept_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptDeployment $var + * @return $this + */ + public function setInterceptDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptDeployment::class); + $this->intercept_deployment = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..371dd5aab129 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupAssociationRequest.php @@ -0,0 +1,198 @@ +google.cloud.networksecurity.v1.UpdateInterceptEndpointGroupAssociationRequest + */ +class UpdateInterceptEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `intercept_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The association to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_association = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_endpoint_group_association = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $interceptEndpointGroupAssociation Required. The association to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `intercept_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupAssociationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $interceptEndpointGroupAssociation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `intercept_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $intercept_endpoint_group_association + * Required. The association to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `intercept_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `intercept_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 association to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_association = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation|null + */ + public function getInterceptEndpointGroupAssociation() + { + return $this->intercept_endpoint_group_association; + } + + public function hasInterceptEndpointGroupAssociation() + { + return isset($this->intercept_endpoint_group_association); + } + + public function clearInterceptEndpointGroupAssociation() + { + unset($this->intercept_endpoint_group_association); + } + + /** + * Required. The association to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroupAssociation intercept_endpoint_group_association = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation $var + * @return $this + */ + public function setInterceptEndpointGroupAssociation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation::class); + $this->intercept_endpoint_group_association = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupRequest.php new file mode 100644 index 000000000000..78a3790761ff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupRequest.php @@ -0,0 +1,193 @@ +google.cloud.networksecurity.v1.UpdateInterceptEndpointGroupRequest + */ +class UpdateInterceptEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `intercept_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The endpoint group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intercept_endpoint_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $interceptEndpointGroup Required. The endpoint group to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `intercept_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $interceptEndpointGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInterceptEndpointGroup($interceptEndpointGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `intercept_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $intercept_endpoint_group + * Required. The endpoint group to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Intercept::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `intercept_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `intercept_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 endpoint group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup|null + */ + public function getInterceptEndpointGroup() + { + return $this->intercept_endpoint_group; + } + + public function hasInterceptEndpointGroup() + { + return isset($this->intercept_endpoint_group); + } + + public function clearInterceptEndpointGroup() + { + unset($this->intercept_endpoint_group); + } + + /** + * Required. The endpoint group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.InterceptEndpointGroup intercept_endpoint_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup $var + * @return $this + */ + public function setInterceptEndpointGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup::class); + $this->intercept_endpoint_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentGroupRequest.php new file mode 100644 index 000000000000..71c416ad0ef0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentGroupRequest.php @@ -0,0 +1,198 @@ +google.cloud.networksecurity.v1.UpdateMirroringDeploymentGroupRequest + */ +class UpdateMirroringDeploymentGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `mirroring_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The deployment group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_deployment_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $mirroringDeploymentGroup Required. The deployment group to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `mirroring_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateMirroringDeploymentGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $mirroringDeploymentGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `mirroring_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $mirroring_deployment_group + * Required. The deployment group to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `mirroring_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment group + * (e.g. `description`; *not* + * `mirroring_deployment_group.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 deployment group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup|null + */ + public function getMirroringDeploymentGroup() + { + return $this->mirroring_deployment_group; + } + + public function hasMirroringDeploymentGroup() + { + return isset($this->mirroring_deployment_group); + } + + public function clearMirroringDeploymentGroup() + { + unset($this->mirroring_deployment_group); + } + + /** + * Required. The deployment group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeploymentGroup mirroring_deployment_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup $var + * @return $this + */ + public function setMirroringDeploymentGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup::class); + $this->mirroring_deployment_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentRequest.php new file mode 100644 index 000000000000..6f021a77d0b3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentRequest.php @@ -0,0 +1,193 @@ +google.cloud.networksecurity.v1.UpdateMirroringDeploymentRequest + */ +class UpdateMirroringDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `mirroring_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The deployment to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_deployment = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeployment $mirroringDeployment Required. The deployment to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `mirroring_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateMirroringDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\MirroringDeployment $mirroringDeployment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMirroringDeployment($mirroringDeployment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `mirroring_deployment.description`). + * See https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringDeployment $mirroring_deployment + * Required. The deployment to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `mirroring_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the deployment + * (e.g. `description`; *not* `mirroring_deployment.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 deployment to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringDeployment|null + */ + public function getMirroringDeployment() + { + return $this->mirroring_deployment; + } + + public function hasMirroringDeployment() + { + return isset($this->mirroring_deployment); + } + + public function clearMirroringDeployment() + { + unset($this->mirroring_deployment); + } + + /** + * Required. The deployment to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringDeployment mirroring_deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringDeployment $var + * @return $this + */ + public function setMirroringDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringDeployment::class); + $this->mirroring_deployment = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupAssociationRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupAssociationRequest.php new file mode 100644 index 000000000000..6b72bcddce65 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupAssociationRequest.php @@ -0,0 +1,198 @@ +google.cloud.networksecurity.v1.UpdateMirroringEndpointGroupAssociationRequest + */ +class UpdateMirroringEndpointGroupAssociationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `mirroring_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The association to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_association = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_endpoint_group_association = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $mirroringEndpointGroupAssociation Required. The association to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `mirroring_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateMirroringEndpointGroupAssociationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $mirroringEndpointGroupAssociation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `mirroring_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $mirroring_endpoint_group_association + * Required. The association to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `mirroring_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the association + * (e.g. `description`; *not* + * `mirroring_endpoint_group_association.description`). See + * https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 association to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_association = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation|null + */ + public function getMirroringEndpointGroupAssociation() + { + return $this->mirroring_endpoint_group_association; + } + + public function hasMirroringEndpointGroupAssociation() + { + return isset($this->mirroring_endpoint_group_association); + } + + public function clearMirroringEndpointGroupAssociation() + { + unset($this->mirroring_endpoint_group_association); + } + + /** + * Required. The association to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroupAssociation mirroring_endpoint_group_association = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation $var + * @return $this + */ + public function setMirroringEndpointGroupAssociation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation::class); + $this->mirroring_endpoint_group_association = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupRequest.php new file mode 100644 index 000000000000..846f2df08eba --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupRequest.php @@ -0,0 +1,193 @@ +google.cloud.networksecurity.v1.UpdateMirroringEndpointGroupRequest + */ +class UpdateMirroringEndpointGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `mirroring_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The endpoint group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mirroring_endpoint_group = null; + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $mirroringEndpointGroup Required. The endpoint group to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `mirroring_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateMirroringEndpointGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $mirroringEndpointGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMirroringEndpointGroup($mirroringEndpointGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `mirroring_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * @type \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $mirroring_endpoint_group + * Required. The endpoint group to update. + * @type string $request_id + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Mirroring::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `mirroring_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * Fields are specified relative to the endpoint group + * (e.g. `description`; *not* `mirroring_endpoint_group.description`). + * See https://google.aip.dev/161 for more details. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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 endpoint group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup|null + */ + public function getMirroringEndpointGroup() + { + return $this->mirroring_endpoint_group; + } + + public function hasMirroringEndpointGroup() + { + return isset($this->mirroring_endpoint_group); + } + + public function clearMirroringEndpointGroup() + { + unset($this->mirroring_endpoint_group); + } + + /** + * Required. The endpoint group to update. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.MirroringEndpointGroup mirroring_endpoint_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup $var + * @return $this + */ + public function setMirroringEndpointGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup::class); + $this->mirroring_endpoint_group = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. Must be a UUID4. + * This request is only idempotent if a `request_id` is provided. + * See https://google.aip.dev/155 for more details. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileGroupRequest.php new file mode 100644 index 000000000000..ba791921e213 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileGroupRequest.php @@ -0,0 +1,151 @@ +google.cloud.networksecurity.v1.UpdateSecurityProfileGroupRequest + */ +class UpdateSecurityProfileGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * SecurityProfileGroup 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Updated SecurityProfileGroup resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_profile_group = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $securityProfileGroup Required. Updated SecurityProfileGroup resource. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * SecurityProfileGroup 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. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateSecurityProfileGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $securityProfileGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSecurityProfileGroup($securityProfileGroup) + ->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 + * SecurityProfileGroup 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. + * @type \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $security_profile_group + * Required. Updated SecurityProfileGroup resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * SecurityProfileGroup 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. + * + * 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 + * SecurityProfileGroup 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. + * + * 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. Updated SecurityProfileGroup resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup|null + */ + public function getSecurityProfileGroup() + { + return $this->security_profile_group; + } + + public function hasSecurityProfileGroup() + { + return isset($this->security_profile_group); + } + + public function clearSecurityProfileGroup() + { + unset($this->security_profile_group); + } + + /** + * Required. Updated SecurityProfileGroup resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfileGroup security_profile_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup $var + * @return $this + */ + public function setSecurityProfileGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup::class); + $this->security_profile_group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileRequest.php new file mode 100644 index 000000000000..83ae9d94e16a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileRequest.php @@ -0,0 +1,151 @@ +google.cloud.networksecurity.v1.UpdateSecurityProfileRequest + */ +class UpdateSecurityProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * SecurityProfile 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Updated SecurityProfile resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile security_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_profile = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfile $securityProfile Required. Updated SecurityProfile resource. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * SecurityProfile 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. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateSecurityProfileRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\SecurityProfile $securityProfile, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSecurityProfile($securityProfile) + ->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 + * SecurityProfile 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. + * @type \Google\Cloud\NetworkSecurity\V1\SecurityProfile $security_profile + * Required. Updated SecurityProfile resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * SecurityProfile 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. + * + * 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 + * SecurityProfile 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. + * + * 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. Updated SecurityProfile resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile security_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\SecurityProfile|null + */ + public function getSecurityProfile() + { + return $this->security_profile; + } + + public function hasSecurityProfile() + { + return isset($this->security_profile); + } + + public function clearSecurityProfile() + { + unset($this->security_profile); + } + + /** + * Required. Updated SecurityProfile resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.SecurityProfile security_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\SecurityProfile $var + * @return $this + */ + public function setSecurityProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\SecurityProfile::class); + $this->security_profile = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php new file mode 100644 index 000000000000..9aea684ac0ca --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php @@ -0,0 +1,161 @@ +google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest + */ +class UpdateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated ServerTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $server_tls_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. Updated ServerTlsPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy 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\NetworkSecurity\V1\UpdateServerTlsPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setServerTlsPolicy($serverTlsPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy 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\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy + * Required. Updated ServerTlsPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy 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) = OPTIONAL]; + * @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. Updated ServerTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null + */ + public function getServerTlsPolicy() + { + return $this->server_tls_policy; + } + + public function hasServerTlsPolicy() + { + return isset($this->server_tls_policy); + } + + public function clearServerTlsPolicy() + { + unset($this->server_tls_policy); + } + + /** + * Required. Updated ServerTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var + * @return $this + */ + public function setServerTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); + $this->server_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateTlsInspectionPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateTlsInspectionPolicyRequest.php new file mode 100644 index 000000000000..f650fa08e7bd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateTlsInspectionPolicyRequest.php @@ -0,0 +1,156 @@ +google.cloud.networksecurity.v1.UpdateTlsInspectionPolicyRequest + */ +class UpdateTlsInspectionPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsInspectionPolicy 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated TlsInspectionPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tls_inspection_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy $tlsInspectionPolicy Required. Updated TlsInspectionPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * TlsInspectionPolicy 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\NetworkSecurity\V1\UpdateTlsInspectionPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy $tlsInspectionPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTlsInspectionPolicy($tlsInspectionPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsInspectionPolicy 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\NetworkSecurity\V1\TlsInspectionPolicy $tls_inspection_policy + * Required. Updated TlsInspectionPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsInspectionPolicy 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsInspectionPolicy 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) = OPTIONAL]; + * @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. Updated TlsInspectionPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy|null + */ + public function getTlsInspectionPolicy() + { + return $this->tls_inspection_policy; + } + + public function hasTlsInspectionPolicy() + { + return isset($this->tls_inspection_policy); + } + + public function clearTlsInspectionPolicy() + { + unset($this->tls_inspection_policy); + } + + /** + * Required. Updated TlsInspectionPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.TlsInspectionPolicy tls_inspection_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy $var + * @return $this + */ + public function setTlsInspectionPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy::class); + $this->tls_inspection_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateUrlListRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateUrlListRequest.php new file mode 100644 index 000000000000..1378b0764e05 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateUrlListRequest.php @@ -0,0 +1,161 @@ +google.cloud.networksecurity.v1.UpdateUrlListRequest + */ +class UpdateUrlListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * UrlList 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) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated UrlList resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlList url_list = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url_list = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\UrlList $urlList Required. Updated UrlList resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * UrlList 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\NetworkSecurity\V1\UpdateUrlListRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\UrlList $urlList, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setUrlList($urlList) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * UrlList 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\NetworkSecurity\V1\UrlList $url_list + * Required. Updated UrlList resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * UrlList 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) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * UrlList 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) = OPTIONAL]; + * @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. Updated UrlList resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlList url_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\UrlList|null + */ + public function getUrlList() + { + return $this->url_list; + } + + public function hasUrlList() + { + return isset($this->url_list); + } + + public function clearUrlList() + { + unset($this->url_list); + } + + /** + * Required. Updated UrlList resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlList url_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\UrlList $var + * @return $this + */ + public function setUrlList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\UrlList::class); + $this->url_list = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter.php new file mode 100644 index 000000000000..7a8f9c77f5c3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter.php @@ -0,0 +1,157 @@ +google.cloud.networksecurity.v1.UrlFilter + */ +class UrlFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The action taken when this filter is applied. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filtering_action = 0; + /** + * Required. The list of strings that a URL must match with for this filter to + * be applied. + * + * Generated from protobuf field repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $urls; + /** + * Required. The priority of this filter within the URL Filtering Profile. + * Lower integers indicate higher priorities. The priority of a filter must be + * unique within a URL Filtering Profile. + * + * Generated from protobuf field optional int32 priority = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $priority = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $filtering_action + * Required. The action taken when this filter is applied. + * @type string[] $urls + * Required. The list of strings that a URL must match with for this filter to + * be applied. + * @type int $priority + * Required. The priority of this filter within the URL Filtering Profile. + * Lower integers indicate higher priorities. The priority of a filter must be + * unique within a URL Filtering Profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupUrlfiltering::initOnce(); + parent::__construct($data); + } + + /** + * Required. The action taken when this filter is applied. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getFilteringAction() + { + return $this->filtering_action; + } + + /** + * Required. The action taken when this filter is applied. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setFilteringAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\UrlFilter\UrlFilteringAction::class); + $this->filtering_action = $var; + + return $this; + } + + /** + * Required. The list of strings that a URL must match with for this filter to + * be applied. + * + * Generated from protobuf field repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Required. The list of strings that a URL must match with for this filter to + * be applied. + * + * Generated from protobuf field repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->urls = $arr; + + return $this; + } + + /** + * Required. The priority of this filter within the URL Filtering Profile. + * Lower integers indicate higher priorities. The priority of a filter must be + * unique within a URL Filtering Profile. + * + * Generated from protobuf field optional int32 priority = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPriority() + { + return isset($this->priority) ? $this->priority : 0; + } + + public function hasPriority() + { + return isset($this->priority); + } + + public function clearPriority() + { + unset($this->priority); + } + + /** + * Required. The priority of this filter within the URL Filtering Profile. + * Lower integers indicate higher priorities. The priority of a filter must be + * unique within a URL Filtering Profile. + * + * Generated from protobuf field optional int32 priority = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter/UrlFilteringAction.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter/UrlFilteringAction.php new file mode 100644 index 000000000000..312337b58fd0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter/UrlFilteringAction.php @@ -0,0 +1,61 @@ +google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction + */ +class UrlFilteringAction +{ + /** + * Filtering action not specified. + * + * Generated from protobuf enum URL_FILTERING_ACTION_UNSPECIFIED = 0; + */ + const URL_FILTERING_ACTION_UNSPECIFIED = 0; + /** + * The connection matching this filter will be allowed to transmit. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * The connection matching this filter will be dropped. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + + private static $valueToName = [ + self::URL_FILTERING_ACTION_UNSPECIFIED => 'URL_FILTERING_ACTION_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilteringProfile.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilteringProfile.php new file mode 100644 index 000000000000..e963d982fa0a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilteringProfile.php @@ -0,0 +1,71 @@ +google.cloud.networksecurity.v1.UrlFilteringProfile + */ +class UrlFilteringProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of filtering configs in which each config defines an + * action to take for some URL match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.UrlFilter url_filters = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $url_filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\UrlFilter[] $url_filters + * Optional. The list of filtering configs in which each config defines an + * action to take for some URL match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\SecurityProfileGroupUrlfiltering::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of filtering configs in which each config defines an + * action to take for some URL match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.UrlFilter url_filters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\UrlFilter> + */ + public function getUrlFilters() + { + return $this->url_filters; + } + + /** + * Optional. The list of filtering configs in which each config defines an + * action to take for some URL match. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.UrlFilter url_filters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\UrlFilter[] $var + * @return $this + */ + public function setUrlFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\UrlFilter::class); + $this->url_filters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlList.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlList.php new file mode 100644 index 000000000000..227b545c69aa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlList.php @@ -0,0 +1,240 @@ +google.cloud.networksecurity.v1.UrlList + */ +class UrlList extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource provided by the user. + * Name is of the form + * projects/{project}/locations/{location}/urlLists/{url_list} + * url_list should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Time when the security policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time when the security policy was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. FQDNs and URLs. + * + * Generated from protobuf field repeated string values = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource provided by the user. + * Name is of the form + * projects/{project}/locations/{location}/urlLists/{url_list} + * url_list should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the security policy was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when the security policy was updated. + * @type string $description + * Optional. Free-text description of the resource. + * @type string[] $values + * Required. FQDNs and URLs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource provided by the user. + * Name is of the form + * projects/{project}/locations/{location}/urlLists/{url_list} + * url_list should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource provided by the user. + * Name is of the form + * projects/{project}/locations/{location}/urlLists/{url_list} + * url_list should match the + * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Time when the security policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when the security policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when the security policy was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Time when the security policy was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Free-text description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. FQDNs and URLs. + * + * Generated from protobuf field repeated string values = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Required. FQDNs and URLs. + * + * Generated from protobuf field repeated string values = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php new file mode 100644 index 000000000000..6c49d9ac333b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php @@ -0,0 +1,118 @@ +google.cloud.networksecurity.v1.ValidationCA + */ +class ValidationCA extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint + * gRPC specific configuration to access the gRPC server to + * obtain the CA certificate. + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the CA certificate. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null + */ + public function getGrpcEndpoint() + { + return $this->readOneof(2); + } + + public function hasGrpcEndpoint() + { + return $this->hasOneof(2); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the CA certificate. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var + * @return $this + */ + public function setGrpcEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null + */ + public function getCertificateProviderInstance() + { + return $this->readOneof(3); + } + + public function hasCertificateProviderInstance() + { + return $this->hasOneof(3); + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var + * @return $this + */ + public function setCertificateProviderInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php new file mode 100644 index 000000000000..83082acb337d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php @@ -0,0 +1,92 @@ +setAddressGroup($formattedAddressGroup) + ->setItems($items); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $addressGroupServiceClient->addAddressGroupItems($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + $itemsElement = '[ITEMS]'; + + add_address_group_items_sample($formattedAddressGroup, $itemsElement); +} +// [END networksecurity_v1_generated_AddressGroupService_AddAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php new file mode 100644 index 000000000000..697aed95e183 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php @@ -0,0 +1,98 @@ +setAddressGroup($formattedAddressGroup) + ->setSourceAddressGroup($formattedSourceAddressGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $addressGroupServiceClient->cloneAddressGroupItems($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + $formattedSourceAddressGroup = AddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + clone_address_group_items_sample($formattedAddressGroup, $formattedSourceAddressGroup); +} +// [END networksecurity_v1_generated_AddressGroupService_CloneAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php new file mode 100644 index 000000000000..168d1257db0c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php @@ -0,0 +1,118 @@ +`. + * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * @param int $addressGroupCapacity Capacity of the Address Group + */ +function create_address_group_sample( + string $formattedParent, + string $addressGroupId, + string $addressGroupName, + int $addressGroupType, + int $addressGroupCapacity +): void { + // Create a client. + $addressGroupServiceClient = new AddressGroupServiceClient(); + + // Prepare the request message. + $addressGroup = (new AddressGroup()) + ->setName($addressGroupName) + ->setType($addressGroupType) + ->setCapacity($addressGroupCapacity); + $request = (new CreateAddressGroupRequest()) + ->setParent($formattedParent) + ->setAddressGroupId($addressGroupId) + ->setAddressGroup($addressGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $addressGroupServiceClient->createAddressGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AddressGroupServiceClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + $addressGroupId = '[ADDRESS_GROUP_ID]'; + $addressGroupName = '[NAME]'; + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroupCapacity = 0; + + create_address_group_sample( + $formattedParent, + $addressGroupId, + $addressGroupName, + $addressGroupType, + $addressGroupCapacity + ); +} +// [END networksecurity_v1_generated_AddressGroupService_CreateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php new file mode 100644 index 000000000000..7b56975dcf8f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $addressGroupServiceClient->deleteAddressGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + delete_address_group_sample($formattedName); +} +// [END networksecurity_v1_generated_AddressGroupService_DeleteAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php new file mode 100644 index 000000000000..2256dc9823af --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AddressGroup $response */ + $response = $addressGroupServiceClient->getAddressGroup($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 = AddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + get_address_group_sample($formattedName); +} +// [END networksecurity_v1_generated_AddressGroupService_GetAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..918db6a58796 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $addressGroupServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_AddressGroupService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_location.php new file mode 100644 index 000000000000..450fe9ad499c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/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 networksecurity_v1_generated_AddressGroupService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php new file mode 100644 index 000000000000..74bbe0237069 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php @@ -0,0 +1,81 @@ +setAddressGroup($formattedAddressGroup); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $addressGroupServiceClient->listAddressGroupReferences($request); + + /** @var AddressGroupReference $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 +{ + $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + list_address_group_references_sample($formattedAddressGroup); +} +// [END networksecurity_v1_generated_AddressGroupService_ListAddressGroupReferences_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php new file mode 100644 index 000000000000..ea0888361f98 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $addressGroupServiceClient->listAddressGroups($request); + + /** @var AddressGroup $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 = AddressGroupServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_address_groups_sample($formattedParent); +} +// [END networksecurity_v1_generated_AddressGroupService_ListAddressGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php new file mode 100644 index 000000000000..8b1deb894989 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_AddressGroupService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php new file mode 100644 index 000000000000..638828c9d5fb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php @@ -0,0 +1,94 @@ +setAddressGroup($formattedAddressGroup) + ->setItems($items); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $addressGroupServiceClient->removeAddressGroupItems($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + $itemsElement = '[ITEMS]'; + + remove_address_group_items_sample($formattedAddressGroup, $itemsElement); +} +// [END networksecurity_v1_generated_AddressGroupService_RemoveAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..778908faa212 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $addressGroupServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_AddressGroupService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..d36029a10719 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $addressGroupServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_AddressGroupService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php new file mode 100644 index 000000000000..61efc9f308ac --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php @@ -0,0 +1,96 @@ +`. + * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * @param int $addressGroupCapacity Capacity of the Address Group + */ +function update_address_group_sample( + string $addressGroupName, + int $addressGroupType, + int $addressGroupCapacity +): void { + // Create a client. + $addressGroupServiceClient = new AddressGroupServiceClient(); + + // Prepare the request message. + $addressGroup = (new AddressGroup()) + ->setName($addressGroupName) + ->setType($addressGroupType) + ->setCapacity($addressGroupCapacity); + $request = (new UpdateAddressGroupRequest()) + ->setAddressGroup($addressGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $addressGroupServiceClient->updateAddressGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $addressGroupName = '[NAME]'; + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroupCapacity = 0; + + update_address_group_sample($addressGroupName, $addressGroupType, $addressGroupCapacity); +} +// [END networksecurity_v1_generated_AddressGroupService_UpdateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php new file mode 100644 index 000000000000..1e97d7072f16 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php @@ -0,0 +1,79 @@ +setProvider($dnsThreatDetectorProvider); + $request = (new CreateDnsThreatDetectorRequest()) + ->setParent($formattedParent) + ->setDnsThreatDetector($dnsThreatDetector); + + // Call the API and handle any network failures. + try { + /** @var DnsThreatDetector $response */ + $response = $dnsThreatDetectorServiceClient->createDnsThreatDetector($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 = DnsThreatDetectorServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; + + create_dns_threat_detector_sample($formattedParent, $dnsThreatDetectorProvider); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_CreateDnsThreatDetector_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php new file mode 100644 index 000000000000..49b94a9af911 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dnsThreatDetectorServiceClient->deleteDnsThreatDetector($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 = DnsThreatDetectorServiceClient::dnsThreatDetectorName( + '[PROJECT]', + '[LOCATION]', + '[DNS_THREAT_DETECTOR]' + ); + + delete_dns_threat_detector_sample($formattedName); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_DeleteDnsThreatDetector_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php new file mode 100644 index 000000000000..d5ee1f61b496 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DnsThreatDetector $response */ + $response = $dnsThreatDetectorServiceClient->getDnsThreatDetector($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 = DnsThreatDetectorServiceClient::dnsThreatDetectorName( + '[PROJECT]', + '[LOCATION]', + '[DNS_THREAT_DETECTOR]' + ); + + get_dns_threat_detector_sample($formattedName); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_GetDnsThreatDetector_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..17dc8620a3c3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dnsThreatDetectorServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_location.php new file mode 100644 index 000000000000..3307776cd354 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/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 networksecurity_v1_generated_DnsThreatDetectorService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php new file mode 100644 index 000000000000..dc35df33860e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dnsThreatDetectorServiceClient->listDnsThreatDetectors($request); + + /** @var DnsThreatDetector $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 = DnsThreatDetectorServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_dns_threat_detectors_sample($formattedParent); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_ListDnsThreatDetectors_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_locations.php new file mode 100644 index 000000000000..f170f60959f1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_DnsThreatDetectorService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..c910e25738b3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dnsThreatDetectorServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..a29d6ab859bf --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $dnsThreatDetectorServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php new file mode 100644 index 000000000000..3bba603fe7a9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php @@ -0,0 +1,73 @@ +setProvider($dnsThreatDetectorProvider); + $request = (new UpdateDnsThreatDetectorRequest()) + ->setDnsThreatDetector($dnsThreatDetector); + + // Call the API and handle any network failures. + try { + /** @var DnsThreatDetector $response */ + $response = $dnsThreatDetectorServiceClient->updateDnsThreatDetector($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 +{ + $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; + + update_dns_threat_detector_sample($dnsThreatDetectorProvider); +} +// [END networksecurity_v1_generated_DnsThreatDetectorService_UpdateDnsThreatDetector_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint.php new file mode 100644 index 000000000000..08bece1b8138 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setFirewallEndpointId($firewallEndpointId) + ->setFirewallEndpoint($firewallEndpoint); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firewallActivationClient->createFirewallEndpoint($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var FirewallEndpoint $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirewallActivationClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + $firewallEndpointId = '[FIREWALL_ENDPOINT_ID]'; + + create_firewall_endpoint_sample($formattedParent, $firewallEndpointId); +} +// [END networksecurity_v1_generated_FirewallActivation_CreateFirewallEndpoint_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php new file mode 100644 index 000000000000..2ea45f7d9069 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php @@ -0,0 +1,98 @@ +setNetwork($firewallEndpointAssociationNetwork) + ->setFirewallEndpoint($firewallEndpointAssociationFirewallEndpoint); + $request = (new CreateFirewallEndpointAssociationRequest()) + ->setParent($formattedParent) + ->setFirewallEndpointAssociation($firewallEndpointAssociation); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firewallActivationClient->createFirewallEndpointAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var FirewallEndpointAssociation $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirewallActivationClient::locationName('[PROJECT]', '[LOCATION]'); + $firewallEndpointAssociationNetwork = '[NETWORK]'; + $firewallEndpointAssociationFirewallEndpoint = '[FIREWALL_ENDPOINT]'; + + create_firewall_endpoint_association_sample( + $formattedParent, + $firewallEndpointAssociationNetwork, + $firewallEndpointAssociationFirewallEndpoint + ); +} +// [END networksecurity_v1_generated_FirewallActivation_CreateFirewallEndpointAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php new file mode 100644 index 000000000000..9bc3fe28d474 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firewallActivationClient->deleteFirewallEndpoint($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirewallActivationClient::firewallEndpointName( + '[ORGANIZATION]', + '[LOCATION]', + '[FIREWALL_ENDPOINT]' + ); + + delete_firewall_endpoint_sample($formattedName); +} +// [END networksecurity_v1_generated_FirewallActivation_DeleteFirewallEndpoint_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php new file mode 100644 index 000000000000..0178dc8d6bea --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firewallActivationClient->deleteFirewallEndpointAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirewallActivationClient::firewallEndpointAssociationName( + '[PROJECT]', + '[LOCATION]', + '[FIREWALL_ENDPOINT_ASSOCIATION]' + ); + + delete_firewall_endpoint_association_sample($formattedName); +} +// [END networksecurity_v1_generated_FirewallActivation_DeleteFirewallEndpointAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint.php new file mode 100644 index 000000000000..253f80d9799c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FirewallEndpoint $response */ + $response = $firewallActivationClient->getFirewallEndpoint($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 = FirewallActivationClient::firewallEndpointName( + '[ORGANIZATION]', + '[LOCATION]', + '[FIREWALL_ENDPOINT]' + ); + + get_firewall_endpoint_sample($formattedName); +} +// [END networksecurity_v1_generated_FirewallActivation_GetFirewallEndpoint_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php new file mode 100644 index 000000000000..5370a1486fef --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FirewallEndpointAssociation $response */ + $response = $firewallActivationClient->getFirewallEndpointAssociation($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 = FirewallActivationClient::firewallEndpointAssociationName( + '[PROJECT]', + '[LOCATION]', + '[FIREWALL_ENDPOINT_ASSOCIATION]' + ); + + get_firewall_endpoint_association_sample($formattedName); +} +// [END networksecurity_v1_generated_FirewallActivation_GetFirewallEndpointAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_iam_policy.php new file mode 100644 index 000000000000..a1bc5b6d662c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $firewallActivationClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_FirewallActivation_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_location.php new file mode 100644 index 000000000000..741c5a495d59 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/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 networksecurity_v1_generated_FirewallActivation_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php new file mode 100644 index 000000000000..2ad1036aadff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firewallActivationClient->listFirewallEndpointAssociations($request); + + /** @var FirewallEndpointAssociation $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 = FirewallActivationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_firewall_endpoint_associations_sample($formattedParent); +} +// [END networksecurity_v1_generated_FirewallActivation_ListFirewallEndpointAssociations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoints.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoints.php new file mode 100644 index 000000000000..30aacb039128 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoints.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firewallActivationClient->listFirewallEndpoints($request); + + /** @var FirewallEndpoint $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 = FirewallActivationClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_firewall_endpoints_sample($formattedParent); +} +// [END networksecurity_v1_generated_FirewallActivation_ListFirewallEndpoints_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_locations.php new file mode 100644 index 000000000000..10e1f8e1ef47 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_FirewallActivation_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/set_iam_policy.php new file mode 100644 index 000000000000..a87a0d5fb218 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $firewallActivationClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_FirewallActivation_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/test_iam_permissions.php new file mode 100644 index 000000000000..8988d7f5569d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $firewallActivationClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_FirewallActivation_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint.php new file mode 100644 index 000000000000..0477671f0b01 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setFirewallEndpoint($firewallEndpoint); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firewallActivationClient->updateFirewallEndpoint($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var FirewallEndpoint $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networksecurity_v1_generated_FirewallActivation_UpdateFirewallEndpoint_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php new file mode 100644 index 000000000000..3d3387cf5b8f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php @@ -0,0 +1,95 @@ +setNetwork($firewallEndpointAssociationNetwork) + ->setFirewallEndpoint($firewallEndpointAssociationFirewallEndpoint); + $request = (new UpdateFirewallEndpointAssociationRequest()) + ->setUpdateMask($updateMask) + ->setFirewallEndpointAssociation($firewallEndpointAssociation); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firewallActivationClient->updateFirewallEndpointAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var FirewallEndpointAssociation $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $firewallEndpointAssociationNetwork = '[NETWORK]'; + $firewallEndpointAssociationFirewallEndpoint = '[FIREWALL_ENDPOINT]'; + + update_firewall_endpoint_association_sample( + $firewallEndpointAssociationNetwork, + $firewallEndpointAssociationFirewallEndpoint + ); +} +// [END networksecurity_v1_generated_FirewallActivation_UpdateFirewallEndpointAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment.php new file mode 100644 index 000000000000..31343e800932 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment.php @@ -0,0 +1,121 @@ +setForwardingRule($formattedInterceptDeploymentForwardingRule) + ->setInterceptDeploymentGroup($formattedInterceptDeploymentInterceptDeploymentGroup); + $request = (new CreateInterceptDeploymentRequest()) + ->setParent($formattedParent) + ->setInterceptDeploymentId($interceptDeploymentId) + ->setInterceptDeployment($interceptDeployment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->createInterceptDeployment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptDeployment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + $interceptDeploymentId = '[INTERCEPT_DEPLOYMENT_ID]'; + $formattedInterceptDeploymentForwardingRule = InterceptClient::forwardingRuleName( + '[PROJECT]', + '[FORWARDING_RULE]' + ); + $formattedInterceptDeploymentInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + + create_intercept_deployment_sample( + $formattedParent, + $interceptDeploymentId, + $formattedInterceptDeploymentForwardingRule, + $formattedInterceptDeploymentInterceptDeploymentGroup + ); +} +// [END networksecurity_v1_generated_Intercept_CreateInterceptDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment_group.php new file mode 100644 index 000000000000..a689fb39ccb2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment_group.php @@ -0,0 +1,104 @@ +setNetwork($formattedInterceptDeploymentGroupNetwork); + $request = (new CreateInterceptDeploymentGroupRequest()) + ->setParent($formattedParent) + ->setInterceptDeploymentGroupId($interceptDeploymentGroupId) + ->setInterceptDeploymentGroup($interceptDeploymentGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->createInterceptDeploymentGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptDeploymentGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + $interceptDeploymentGroupId = '[INTERCEPT_DEPLOYMENT_GROUP_ID]'; + $formattedInterceptDeploymentGroupNetwork = InterceptClient::networkName('[PROJECT]', '[NETWORK]'); + + create_intercept_deployment_group_sample( + $formattedParent, + $interceptDeploymentGroupId, + $formattedInterceptDeploymentGroupNetwork + ); +} +// [END networksecurity_v1_generated_Intercept_CreateInterceptDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group.php new file mode 100644 index 000000000000..0cd9015e4ac7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group.php @@ -0,0 +1,109 @@ +setInterceptDeploymentGroup($formattedInterceptEndpointGroupInterceptDeploymentGroup); + $request = (new CreateInterceptEndpointGroupRequest()) + ->setParent($formattedParent) + ->setInterceptEndpointGroupId($interceptEndpointGroupId) + ->setInterceptEndpointGroup($interceptEndpointGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->createInterceptEndpointGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptEndpointGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + $interceptEndpointGroupId = '[INTERCEPT_ENDPOINT_GROUP_ID]'; + $formattedInterceptEndpointGroupInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + + create_intercept_endpoint_group_sample( + $formattedParent, + $interceptEndpointGroupId, + $formattedInterceptEndpointGroupInterceptDeploymentGroup + ); +} +// [END networksecurity_v1_generated_Intercept_CreateInterceptEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php new file mode 100644 index 000000000000..ab44ed238060 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php @@ -0,0 +1,114 @@ +setInterceptEndpointGroup($formattedInterceptEndpointGroupAssociationInterceptEndpointGroup) + ->setNetwork($formattedInterceptEndpointGroupAssociationNetwork); + $request = (new CreateInterceptEndpointGroupAssociationRequest()) + ->setParent($formattedParent) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->createInterceptEndpointGroupAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptEndpointGroupAssociation $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup = InterceptClient::interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $formattedInterceptEndpointGroupAssociationNetwork = InterceptClient::networkName( + '[PROJECT]', + '[NETWORK]' + ); + + create_intercept_endpoint_group_association_sample( + $formattedParent, + $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup, + $formattedInterceptEndpointGroupAssociationNetwork + ); +} +// [END networksecurity_v1_generated_Intercept_CreateInterceptEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment.php new file mode 100644 index 000000000000..01412855a5e2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->deleteInterceptDeployment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InterceptClient::interceptDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT]' + ); + + delete_intercept_deployment_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_DeleteInterceptDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment_group.php new file mode 100644 index 000000000000..a57de7781806 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment_group.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->deleteInterceptDeploymentGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InterceptClient::interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + + delete_intercept_deployment_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_DeleteInterceptDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group.php new file mode 100644 index 000000000000..08258a7f702d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->deleteInterceptEndpointGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InterceptClient::interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + + delete_intercept_endpoint_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_DeleteInterceptEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php new file mode 100644 index 000000000000..3b9e94c49372 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->deleteInterceptEndpointGroupAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InterceptClient::interceptEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]' + ); + + delete_intercept_endpoint_group_association_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_DeleteInterceptEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_iam_policy.php new file mode 100644 index 000000000000..eca79cd0cded --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $interceptClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_Intercept_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment.php new file mode 100644 index 000000000000..1bbcbf8da8a5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var InterceptDeployment $response */ + $response = $interceptClient->getInterceptDeployment($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 = InterceptClient::interceptDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT]' + ); + + get_intercept_deployment_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_GetInterceptDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment_group.php new file mode 100644 index 000000000000..50d74166c808 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment_group.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var InterceptDeploymentGroup $response */ + $response = $interceptClient->getInterceptDeploymentGroup($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 = InterceptClient::interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + + get_intercept_deployment_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_GetInterceptDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group.php new file mode 100644 index 000000000000..095e37d3d88d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var InterceptEndpointGroup $response */ + $response = $interceptClient->getInterceptEndpointGroup($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 = InterceptClient::interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + + get_intercept_endpoint_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_GetInterceptEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php new file mode 100644 index 000000000000..fdbd9f441011 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var InterceptEndpointGroupAssociation $response */ + $response = $interceptClient->getInterceptEndpointGroupAssociation($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 = InterceptClient::interceptEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]' + ); + + get_intercept_endpoint_group_association_sample($formattedName); +} +// [END networksecurity_v1_generated_Intercept_GetInterceptEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_location.php new file mode 100644 index 000000000000..2324212cf789 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/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 networksecurity_v1_generated_Intercept_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployment_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployment_groups.php new file mode 100644 index 000000000000..7fe6fab2222d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployment_groups.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $interceptClient->listInterceptDeploymentGroups($request); + + /** @var InterceptDeploymentGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + + list_intercept_deployment_groups_sample($formattedParent); +} +// [END networksecurity_v1_generated_Intercept_ListInterceptDeploymentGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployments.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployments.php new file mode 100644 index 000000000000..38a228ff9f18 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployments.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $interceptClient->listInterceptDeployments($request); + + /** @var InterceptDeployment $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + + list_intercept_deployments_sample($formattedParent); +} +// [END networksecurity_v1_generated_Intercept_ListInterceptDeployments_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php new file mode 100644 index 000000000000..ece33f663026 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $interceptClient->listInterceptEndpointGroupAssociations($request); + + /** @var InterceptEndpointGroupAssociation $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + + list_intercept_endpoint_group_associations_sample($formattedParent); +} +// [END networksecurity_v1_generated_Intercept_ListInterceptEndpointGroupAssociations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_groups.php new file mode 100644 index 000000000000..aa1da8bee6dd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_groups.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $interceptClient->listInterceptEndpointGroups($request); + + /** @var InterceptEndpointGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]'); + + list_intercept_endpoint_groups_sample($formattedParent); +} +// [END networksecurity_v1_generated_Intercept_ListInterceptEndpointGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_locations.php new file mode 100644 index 000000000000..83a5bf31675b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_Intercept_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/set_iam_policy.php new file mode 100644 index 000000000000..ed7537968414 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $interceptClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_Intercept_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/test_iam_permissions.php new file mode 100644 index 000000000000..fdf2580097d0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $interceptClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_Intercept_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment.php new file mode 100644 index 000000000000..ef2c13110f21 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment.php @@ -0,0 +1,108 @@ +setForwardingRule($formattedInterceptDeploymentForwardingRule) + ->setInterceptDeploymentGroup($formattedInterceptDeploymentInterceptDeploymentGroup); + $request = (new UpdateInterceptDeploymentRequest()) + ->setInterceptDeployment($interceptDeployment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->updateInterceptDeployment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptDeployment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedInterceptDeploymentForwardingRule = InterceptClient::forwardingRuleName( + '[PROJECT]', + '[FORWARDING_RULE]' + ); + $formattedInterceptDeploymentInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + + update_intercept_deployment_sample( + $formattedInterceptDeploymentForwardingRule, + $formattedInterceptDeploymentInterceptDeploymentGroup + ); +} +// [END networksecurity_v1_generated_Intercept_UpdateInterceptDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment_group.php new file mode 100644 index 000000000000..0f8e4fba76f7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment_group.php @@ -0,0 +1,89 @@ +setNetwork($formattedInterceptDeploymentGroupNetwork); + $request = (new UpdateInterceptDeploymentGroupRequest()) + ->setInterceptDeploymentGroup($interceptDeploymentGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->updateInterceptDeploymentGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptDeploymentGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedInterceptDeploymentGroupNetwork = InterceptClient::networkName('[PROJECT]', '[NETWORK]'); + + update_intercept_deployment_group_sample($formattedInterceptDeploymentGroupNetwork); +} +// [END networksecurity_v1_generated_Intercept_UpdateInterceptDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group.php new file mode 100644 index 000000000000..fd876d5dd46d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group.php @@ -0,0 +1,94 @@ +setInterceptDeploymentGroup($formattedInterceptEndpointGroupInterceptDeploymentGroup); + $request = (new UpdateInterceptEndpointGroupRequest()) + ->setInterceptEndpointGroup($interceptEndpointGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->updateInterceptEndpointGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptEndpointGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedInterceptEndpointGroupInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + + update_intercept_endpoint_group_sample($formattedInterceptEndpointGroupInterceptDeploymentGroup); +} +// [END networksecurity_v1_generated_Intercept_UpdateInterceptEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php new file mode 100644 index 000000000000..7fec8f2dd4a1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php @@ -0,0 +1,107 @@ +setInterceptEndpointGroup($formattedInterceptEndpointGroupAssociationInterceptEndpointGroup) + ->setNetwork($formattedInterceptEndpointGroupAssociationNetwork); + $request = (new UpdateInterceptEndpointGroupAssociationRequest()) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $interceptClient->updateInterceptEndpointGroupAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var InterceptEndpointGroupAssociation $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup = InterceptClient::interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $formattedInterceptEndpointGroupAssociationNetwork = InterceptClient::networkName( + '[PROJECT]', + '[NETWORK]' + ); + + update_intercept_endpoint_group_association_sample( + $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup, + $formattedInterceptEndpointGroupAssociationNetwork + ); +} +// [END networksecurity_v1_generated_Intercept_UpdateInterceptEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment.php new file mode 100644 index 000000000000..386239902a65 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment.php @@ -0,0 +1,121 @@ +setForwardingRule($formattedMirroringDeploymentForwardingRule) + ->setMirroringDeploymentGroup($formattedMirroringDeploymentMirroringDeploymentGroup); + $request = (new CreateMirroringDeploymentRequest()) + ->setParent($formattedParent) + ->setMirroringDeploymentId($mirroringDeploymentId) + ->setMirroringDeployment($mirroringDeployment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->createMirroringDeployment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringDeployment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + $mirroringDeploymentId = '[MIRRORING_DEPLOYMENT_ID]'; + $formattedMirroringDeploymentForwardingRule = MirroringClient::forwardingRuleName( + '[PROJECT]', + '[FORWARDING_RULE]' + ); + $formattedMirroringDeploymentMirroringDeploymentGroup = MirroringClient::mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + + create_mirroring_deployment_sample( + $formattedParent, + $mirroringDeploymentId, + $formattedMirroringDeploymentForwardingRule, + $formattedMirroringDeploymentMirroringDeploymentGroup + ); +} +// [END networksecurity_v1_generated_Mirroring_CreateMirroringDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment_group.php new file mode 100644 index 000000000000..c9f216ba91ed --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment_group.php @@ -0,0 +1,104 @@ +setNetwork($formattedMirroringDeploymentGroupNetwork); + $request = (new CreateMirroringDeploymentGroupRequest()) + ->setParent($formattedParent) + ->setMirroringDeploymentGroupId($mirroringDeploymentGroupId) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->createMirroringDeploymentGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringDeploymentGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + $mirroringDeploymentGroupId = '[MIRRORING_DEPLOYMENT_GROUP_ID]'; + $formattedMirroringDeploymentGroupNetwork = MirroringClient::networkName('[PROJECT]', '[NETWORK]'); + + create_mirroring_deployment_group_sample( + $formattedParent, + $mirroringDeploymentGroupId, + $formattedMirroringDeploymentGroupNetwork + ); +} +// [END networksecurity_v1_generated_Mirroring_CreateMirroringDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group.php new file mode 100644 index 000000000000..59b18b4f398a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setMirroringEndpointGroupId($mirroringEndpointGroupId) + ->setMirroringEndpointGroup($mirroringEndpointGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->createMirroringEndpointGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringEndpointGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + $mirroringEndpointGroupId = '[MIRRORING_ENDPOINT_GROUP_ID]'; + + create_mirroring_endpoint_group_sample($formattedParent, $mirroringEndpointGroupId); +} +// [END networksecurity_v1_generated_Mirroring_CreateMirroringEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php new file mode 100644 index 000000000000..460a9981ab49 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->createMirroringEndpointGroupAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringEndpointGroupAssociation $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + + create_mirroring_endpoint_group_association_sample($formattedParent); +} +// [END networksecurity_v1_generated_Mirroring_CreateMirroringEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment.php new file mode 100644 index 000000000000..662e11f286af --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->deleteMirroringDeployment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MirroringClient::mirroringDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT]' + ); + + delete_mirroring_deployment_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_DeleteMirroringDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment_group.php new file mode 100644 index 000000000000..95ca474441ad --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment_group.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->deleteMirroringDeploymentGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MirroringClient::mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + + delete_mirroring_deployment_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_DeleteMirroringDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php new file mode 100644 index 000000000000..984a61743fa7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->deleteMirroringEndpointGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MirroringClient::mirroringEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP]' + ); + + delete_mirroring_endpoint_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_DeleteMirroringEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php new file mode 100644 index 000000000000..a3cb1b2f6db7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->deleteMirroringEndpointGroupAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MirroringClient::mirroringEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]' + ); + + delete_mirroring_endpoint_group_association_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_DeleteMirroringEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_iam_policy.php new file mode 100644 index 000000000000..82d25bd1e4bf --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $mirroringClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_Mirroring_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_location.php new file mode 100644 index 000000000000..37171d712eff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/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 networksecurity_v1_generated_Mirroring_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment.php new file mode 100644 index 000000000000..0a04eebdaab8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MirroringDeployment $response */ + $response = $mirroringClient->getMirroringDeployment($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 = MirroringClient::mirroringDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT]' + ); + + get_mirroring_deployment_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_GetMirroringDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment_group.php new file mode 100644 index 000000000000..bd7aa1e25238 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment_group.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MirroringDeploymentGroup $response */ + $response = $mirroringClient->getMirroringDeploymentGroup($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 = MirroringClient::mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + + get_mirroring_deployment_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_GetMirroringDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group.php new file mode 100644 index 000000000000..060294e66747 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MirroringEndpointGroup $response */ + $response = $mirroringClient->getMirroringEndpointGroup($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 = MirroringClient::mirroringEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP]' + ); + + get_mirroring_endpoint_group_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_GetMirroringEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php new file mode 100644 index 000000000000..a1cf2868da6d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MirroringEndpointGroupAssociation $response */ + $response = $mirroringClient->getMirroringEndpointGroupAssociation($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 = MirroringClient::mirroringEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]' + ); + + get_mirroring_endpoint_group_association_sample($formattedName); +} +// [END networksecurity_v1_generated_Mirroring_GetMirroringEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_locations.php new file mode 100644 index 000000000000..cbc3100e74de --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_Mirroring_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployment_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployment_groups.php new file mode 100644 index 000000000000..0a997da0d3b7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployment_groups.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $mirroringClient->listMirroringDeploymentGroups($request); + + /** @var MirroringDeploymentGroup $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + + list_mirroring_deployment_groups_sample($formattedParent); +} +// [END networksecurity_v1_generated_Mirroring_ListMirroringDeploymentGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployments.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployments.php new file mode 100644 index 000000000000..671a6a552d0b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployments.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $mirroringClient->listMirroringDeployments($request); + + /** @var MirroringDeployment $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + + list_mirroring_deployments_sample($formattedParent); +} +// [END networksecurity_v1_generated_Mirroring_ListMirroringDeployments_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php new file mode 100644 index 000000000000..16a9bacb92c1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $mirroringClient->listMirroringEndpointGroupAssociations($request); + + /** @var MirroringEndpointGroupAssociation $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + + list_mirroring_endpoint_group_associations_sample($formattedParent); +} +// [END networksecurity_v1_generated_Mirroring_ListMirroringEndpointGroupAssociations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php new file mode 100644 index 000000000000..04ab4618ccb5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $mirroringClient->listMirroringEndpointGroups($request); + + /** @var MirroringEndpointGroup $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]'); + + list_mirroring_endpoint_groups_sample($formattedParent); +} +// [END networksecurity_v1_generated_Mirroring_ListMirroringEndpointGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/set_iam_policy.php new file mode 100644 index 000000000000..f649c939d3a2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $mirroringClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_Mirroring_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/test_iam_permissions.php new file mode 100644 index 000000000000..6be9ed536c7c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $mirroringClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_Mirroring_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment.php new file mode 100644 index 000000000000..b208ac33246a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment.php @@ -0,0 +1,108 @@ +setForwardingRule($formattedMirroringDeploymentForwardingRule) + ->setMirroringDeploymentGroup($formattedMirroringDeploymentMirroringDeploymentGroup); + $request = (new UpdateMirroringDeploymentRequest()) + ->setMirroringDeployment($mirroringDeployment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->updateMirroringDeployment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringDeployment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMirroringDeploymentForwardingRule = MirroringClient::forwardingRuleName( + '[PROJECT]', + '[FORWARDING_RULE]' + ); + $formattedMirroringDeploymentMirroringDeploymentGroup = MirroringClient::mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + + update_mirroring_deployment_sample( + $formattedMirroringDeploymentForwardingRule, + $formattedMirroringDeploymentMirroringDeploymentGroup + ); +} +// [END networksecurity_v1_generated_Mirroring_UpdateMirroringDeployment_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment_group.php new file mode 100644 index 000000000000..1f0000097064 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment_group.php @@ -0,0 +1,89 @@ +setNetwork($formattedMirroringDeploymentGroupNetwork); + $request = (new UpdateMirroringDeploymentGroupRequest()) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->updateMirroringDeploymentGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringDeploymentGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMirroringDeploymentGroupNetwork = MirroringClient::networkName('[PROJECT]', '[NETWORK]'); + + update_mirroring_deployment_group_sample($formattedMirroringDeploymentGroupNetwork); +} +// [END networksecurity_v1_generated_Mirroring_UpdateMirroringDeploymentGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group.php new file mode 100644 index 000000000000..14bd11739263 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group.php @@ -0,0 +1,72 @@ +setMirroringEndpointGroup($mirroringEndpointGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->updateMirroringEndpointGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringEndpointGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networksecurity_v1_generated_Mirroring_UpdateMirroringEndpointGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php new file mode 100644 index 000000000000..3f4a98a2c8b8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php @@ -0,0 +1,72 @@ +setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $mirroringClient->updateMirroringEndpointGroupAssociation($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MirroringEndpointGroupAssociation $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networksecurity_v1_generated_Mirroring_UpdateMirroringEndpointGroupAssociation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php new file mode 100644 index 000000000000..679959632868 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php @@ -0,0 +1,110 @@ +`. + * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + */ +function create_authorization_policy_sample( + string $formattedParent, + string $authorizationPolicyId, + string $authorizationPolicyName, + int $authorizationPolicyAction +): void { + // Create a client. + $networkSecurityClient = new NetworkSecurityClient(); + + // Prepare the request message. + $authorizationPolicy = (new AuthorizationPolicy()) + ->setName($authorizationPolicyName) + ->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createAuthorizationPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthorizationPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = '[AUTHORIZATION_POLICY_ID]'; + $authorizationPolicyName = '[NAME]'; + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + + create_authorization_policy_sample( + $formattedParent, + $authorizationPolicyId, + $authorizationPolicyName, + $authorizationPolicyAction + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authz_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authz_policy.php new file mode 100644 index 000000000000..2e096c51c8f2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authz_policy.php @@ -0,0 +1,140 @@ +setResources($authzPolicyTargetResources); + $authzPolicy = (new AuthzPolicy()) + ->setName($authzPolicyName) + ->setTarget($authzPolicyTarget) + ->setAction($authzPolicyAction); + $request = (new CreateAuthzPolicyRequest()) + ->setParent($formattedParent) + ->setAuthzPolicyId($authzPolicyId) + ->setAuthzPolicy($authzPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createAuthzPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthzPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $authzPolicyId = '[AUTHZ_POLICY_ID]'; + $authzPolicyName = '[NAME]'; + $authzPolicyTargetResourcesElement = '[RESOURCES]'; + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + + create_authz_policy_sample( + $formattedParent, + $authzPolicyId, + $authzPolicyName, + $authzPolicyTargetResourcesElement, + $authzPolicyAction + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateAuthzPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php new file mode 100644 index 000000000000..4f82c8f49369 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php @@ -0,0 +1,104 @@ +setName($backendAuthenticationConfigName); + $request = (new CreateBackendAuthenticationConfigRequest()) + ->setParent($formattedParent) + ->setBackendAuthenticationConfigId($backendAuthenticationConfigId) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createBackendAuthenticationConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackendAuthenticationConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $backendAuthenticationConfigId = '[BACKEND_AUTHENTICATION_CONFIG_ID]'; + $backendAuthenticationConfigName = '[NAME]'; + + create_backend_authentication_config_sample( + $formattedParent, + $backendAuthenticationConfigId, + $backendAuthenticationConfigName + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateBackendAuthenticationConfig_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php new file mode 100644 index 000000000000..c4a6d03e99c2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php @@ -0,0 +1,99 @@ +setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createClientTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ClientTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = '[CLIENT_TLS_POLICY_ID]'; + $clientTlsPolicyName = '[NAME]'; + + create_client_tls_policy_sample($formattedParent, $clientTlsPolicyId, $clientTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php new file mode 100644 index 000000000000..ebed055413a8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php @@ -0,0 +1,105 @@ +setName($gatewaySecurityPolicyName); + $request = (new CreateGatewaySecurityPolicyRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createGatewaySecurityPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GatewaySecurityPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $gatewaySecurityPolicyId = '[GATEWAY_SECURITY_POLICY_ID]'; + $gatewaySecurityPolicyName = '[NAME]'; + + create_gateway_security_policy_sample( + $formattedParent, + $gatewaySecurityPolicyId, + $gatewaySecurityPolicyName + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateGatewaySecurityPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php new file mode 100644 index 000000000000..67d75b727a55 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php @@ -0,0 +1,124 @@ +setBasicProfile($gatewaySecurityPolicyRuleBasicProfile) + ->setName($gatewaySecurityPolicyRuleName) + ->setEnabled($gatewaySecurityPolicyRuleEnabled) + ->setPriority($gatewaySecurityPolicyRulePriority) + ->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $request = (new CreateGatewaySecurityPolicyRuleRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createGatewaySecurityPolicyRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GatewaySecurityPolicyRule $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRuleName = '[NAME]'; + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRulePriority = 0; + $gatewaySecurityPolicyRuleSessionMatcher = '[SESSION_MATCHER]'; + + create_gateway_security_policy_rule_sample( + $formattedParent, + $gatewaySecurityPolicyRuleBasicProfile, + $gatewaySecurityPolicyRuleName, + $gatewaySecurityPolicyRuleEnabled, + $gatewaySecurityPolicyRulePriority, + $gatewaySecurityPolicyRuleSessionMatcher + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateGatewaySecurityPolicyRule_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php new file mode 100644 index 000000000000..d2189dfc78c3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php @@ -0,0 +1,99 @@ +setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createServerTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ServerTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = '[SERVER_TLS_POLICY_ID]'; + $serverTlsPolicyName = '[NAME]'; + + create_server_tls_policy_sample($formattedParent, $serverTlsPolicyId, $serverTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php new file mode 100644 index 000000000000..6269f8dfa231 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php @@ -0,0 +1,117 @@ +setName($tlsInspectionPolicyName) + ->setCaPool($formattedTlsInspectionPolicyCaPool); + $request = (new CreateTlsInspectionPolicyRequest()) + ->setParent($formattedParent) + ->setTlsInspectionPolicyId($tlsInspectionPolicyId) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createTlsInspectionPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TlsInspectionPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $tlsInspectionPolicyId = '[TLS_INSPECTION_POLICY_ID]'; + $tlsInspectionPolicyName = '[NAME]'; + $formattedTlsInspectionPolicyCaPool = NetworkSecurityClient::caPoolName( + '[PROJECT]', + '[LOCATION]', + '[CA_POOL]' + ); + + create_tls_inspection_policy_sample( + $formattedParent, + $tlsInspectionPolicyId, + $tlsInspectionPolicyName, + $formattedTlsInspectionPolicyCaPool + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateTlsInspectionPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_url_list.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_url_list.php new file mode 100644 index 000000000000..30a86aa5e6ec --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_url_list.php @@ -0,0 +1,106 @@ +setName($urlListName) + ->setValues($urlListValues); + $request = (new CreateUrlListRequest()) + ->setParent($formattedParent) + ->setUrlListId($urlListId) + ->setUrlList($urlList); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createUrlList($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UrlList $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $urlListId = '[URL_LIST_ID]'; + $urlListName = '[NAME]'; + $urlListValuesElement = '[VALUES]'; + + create_url_list_sample($formattedParent, $urlListId, $urlListName, $urlListValuesElement); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateUrlList_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php new file mode 100644 index 000000000000..8801a43568ac --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteAuthorizationPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::authorizationPolicyName( + '[PROJECT]', + '[LOCATION]', + '[AUTHORIZATION_POLICY]' + ); + + delete_authorization_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authz_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authz_policy.php new file mode 100644 index 000000000000..b3d143fcb376 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authz_policy.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteAuthzPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::authzPolicyName( + '[PROJECT]', + '[LOCATION]', + '[AUTHZ_POLICY]' + ); + + delete_authz_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteAuthzPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php new file mode 100644 index 000000000000..b5114c8e942d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteBackendAuthenticationConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::backendAuthenticationConfigName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_AUTHENTICATION_CONFIG]' + ); + + delete_backend_authentication_config_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteBackendAuthenticationConfig_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php new file mode 100644 index 000000000000..2be57169e316 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteClientTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::clientTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_TLS_POLICY]' + ); + + delete_client_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php new file mode 100644 index 000000000000..6cca76daace1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteGatewaySecurityPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + + delete_gateway_security_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteGatewaySecurityPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php new file mode 100644 index 000000000000..0066a6470f16 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteGatewaySecurityPolicyRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::gatewaySecurityPolicyRuleName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]', + '[RULE]' + ); + + delete_gateway_security_policy_rule_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteGatewaySecurityPolicyRule_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php new file mode 100644 index 000000000000..1afa5fd7f39f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteServerTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::serverTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[SERVER_TLS_POLICY]' + ); + + delete_server_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php new file mode 100644 index 000000000000..05561cccb103 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteTlsInspectionPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::tlsInspectionPolicyName( + '[PROJECT]', + '[LOCATION]', + '[TLS_INSPECTION_POLICY]' + ); + + delete_tls_inspection_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteTlsInspectionPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_url_list.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_url_list.php new file mode 100644 index 000000000000..d521100b81ca --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_url_list.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteUrlList($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + + delete_url_list_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteUrlList_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php new file mode 100644 index 000000000000..7d539e8047c5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AuthorizationPolicy $response */ + $response = $networkSecurityClient->getAuthorizationPolicy($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 = NetworkSecurityClient::authorizationPolicyName( + '[PROJECT]', + '[LOCATION]', + '[AUTHORIZATION_POLICY]' + ); + + get_authorization_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authz_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authz_policy.php new file mode 100644 index 000000000000..df909acd8119 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authz_policy.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AuthzPolicy $response */ + $response = $networkSecurityClient->getAuthzPolicy($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 = NetworkSecurityClient::authzPolicyName( + '[PROJECT]', + '[LOCATION]', + '[AUTHZ_POLICY]' + ); + + get_authz_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetAuthzPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php new file mode 100644 index 000000000000..b4a0e3aaf0ea --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackendAuthenticationConfig $response */ + $response = $networkSecurityClient->getBackendAuthenticationConfig($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 = NetworkSecurityClient::backendAuthenticationConfigName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_AUTHENTICATION_CONFIG]' + ); + + get_backend_authentication_config_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetBackendAuthenticationConfig_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php new file mode 100644 index 000000000000..2f7cfcbdcbc1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ClientTlsPolicy $response */ + $response = $networkSecurityClient->getClientTlsPolicy($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 = NetworkSecurityClient::clientTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_TLS_POLICY]' + ); + + get_client_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php new file mode 100644 index 000000000000..3d1495f16847 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GatewaySecurityPolicy $response */ + $response = $networkSecurityClient->getGatewaySecurityPolicy($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 = NetworkSecurityClient::gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + + get_gateway_security_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetGatewaySecurityPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php new file mode 100644 index 000000000000..78ae0c6e6c4e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GatewaySecurityPolicyRule $response */ + $response = $networkSecurityClient->getGatewaySecurityPolicyRule($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 = NetworkSecurityClient::gatewaySecurityPolicyRuleName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]', + '[RULE]' + ); + + get_gateway_security_policy_rule_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetGatewaySecurityPolicyRule_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php new file mode 100644 index 000000000000..7049b35fdac9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $networkSecurityClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php new file mode 100644 index 000000000000..a3429c396259 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/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 networksecurity_v1_generated_NetworkSecurity_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php new file mode 100644 index 000000000000..eefa66443aa6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ServerTlsPolicy $response */ + $response = $networkSecurityClient->getServerTlsPolicy($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 = NetworkSecurityClient::serverTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[SERVER_TLS_POLICY]' + ); + + get_server_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php new file mode 100644 index 000000000000..36df75b116e1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TlsInspectionPolicy $response */ + $response = $networkSecurityClient->getTlsInspectionPolicy($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 = NetworkSecurityClient::tlsInspectionPolicyName( + '[PROJECT]', + '[LOCATION]', + '[TLS_INSPECTION_POLICY]' + ); + + get_tls_inspection_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetTlsInspectionPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_url_list.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_url_list.php new file mode 100644 index 000000000000..18b193febe9b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_url_list.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UrlList $response */ + $response = $networkSecurityClient->getUrlList($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 = NetworkSecurityClient::urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + + get_url_list_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetUrlList_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php new file mode 100644 index 000000000000..48ae214f3c81 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listAuthorizationPolicies($request); + + /** @var AuthorizationPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_authorization_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authz_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authz_policies.php new file mode 100644 index 000000000000..3c8fd2b697d3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authz_policies.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listAuthzPolicies($request); + + /** @var AuthzPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_authz_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListAuthzPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php new file mode 100644 index 000000000000..947cff215883 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listBackendAuthenticationConfigs($request); + + /** @var BackendAuthenticationConfig $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backend_authentication_configs_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListBackendAuthenticationConfigs_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php new file mode 100644 index 000000000000..33a55f02e8be --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listClientTlsPolicies($request); + + /** @var ClientTlsPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_client_tls_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php new file mode 100644 index 000000000000..a62a8b256f9a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listGatewaySecurityPolicies($request); + + /** @var GatewaySecurityPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_gateway_security_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListGatewaySecurityPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php new file mode 100644 index 000000000000..49dac8399a81 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listGatewaySecurityPolicyRules($request); + + /** @var GatewaySecurityPolicyRule $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 = NetworkSecurityClient::gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + + list_gateway_security_policy_rules_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListGatewaySecurityPolicyRules_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php new file mode 100644 index 000000000000..2d171b1dab0d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_NetworkSecurity_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php new file mode 100644 index 000000000000..79bcfe106f06 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listServerTlsPolicies($request); + + /** @var ServerTlsPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_server_tls_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php new file mode 100644 index 000000000000..6af6864bcf4e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listTlsInspectionPolicies($request); + + /** @var TlsInspectionPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_tls_inspection_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListTlsInspectionPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_url_lists.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_url_lists.php new file mode 100644 index 000000000000..ec6d30ccd0ff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_url_lists.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listUrlLists($request); + + /** @var UrlList $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_url_lists_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListUrlLists_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php new file mode 100644 index 000000000000..aa8f191e96a6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $networkSecurityClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_NetworkSecurity_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php new file mode 100644 index 000000000000..84e504281093 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $networkSecurityClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_NetworkSecurity_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php new file mode 100644 index 000000000000..9178cbcd741b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php @@ -0,0 +1,92 @@ +`. + * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + */ +function update_authorization_policy_sample( + string $authorizationPolicyName, + int $authorizationPolicyAction +): void { + // Create a client. + $networkSecurityClient = new NetworkSecurityClient(); + + // Prepare the request message. + $authorizationPolicy = (new AuthorizationPolicy()) + ->setName($authorizationPolicyName) + ->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest()) + ->setAuthorizationPolicy($authorizationPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateAuthorizationPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthorizationPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $authorizationPolicyName = '[NAME]'; + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + + update_authorization_policy_sample($authorizationPolicyName, $authorizationPolicyAction); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authz_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authz_policy.php new file mode 100644 index 000000000000..03dc16842a38 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authz_policy.php @@ -0,0 +1,131 @@ +setResources($authzPolicyTargetResources); + $authzPolicy = (new AuthzPolicy()) + ->setName($authzPolicyName) + ->setTarget($authzPolicyTarget) + ->setAction($authzPolicyAction); + $request = (new UpdateAuthzPolicyRequest()) + ->setUpdateMask($updateMask) + ->setAuthzPolicy($authzPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateAuthzPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthzPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $authzPolicyName = '[NAME]'; + $authzPolicyTargetResourcesElement = '[RESOURCES]'; + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + + update_authz_policy_sample( + $authzPolicyName, + $authzPolicyTargetResourcesElement, + $authzPolicyAction + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateAuthzPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php new file mode 100644 index 000000000000..b2407f7bf658 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php @@ -0,0 +1,88 @@ +setName($backendAuthenticationConfigName); + $request = (new UpdateBackendAuthenticationConfigRequest()) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateBackendAuthenticationConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackendAuthenticationConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $backendAuthenticationConfigName = '[NAME]'; + + update_backend_authentication_config_sample($backendAuthenticationConfigName); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateBackendAuthenticationConfig_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php new file mode 100644 index 000000000000..1287fd2f5a00 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php @@ -0,0 +1,85 @@ +setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest()) + ->setClientTlsPolicy($clientTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateClientTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ClientTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $clientTlsPolicyName = '[NAME]'; + + update_client_tls_policy_sample($clientTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php new file mode 100644 index 000000000000..1c9284d98c46 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php @@ -0,0 +1,87 @@ +setName($gatewaySecurityPolicyName); + $request = (new UpdateGatewaySecurityPolicyRequest()) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateGatewaySecurityPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GatewaySecurityPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $gatewaySecurityPolicyName = '[NAME]'; + + update_gateway_security_policy_sample($gatewaySecurityPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateGatewaySecurityPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php new file mode 100644 index 000000000000..9c1d9ee08883 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php @@ -0,0 +1,112 @@ +setBasicProfile($gatewaySecurityPolicyRuleBasicProfile) + ->setName($gatewaySecurityPolicyRuleName) + ->setEnabled($gatewaySecurityPolicyRuleEnabled) + ->setPriority($gatewaySecurityPolicyRulePriority) + ->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $request = (new UpdateGatewaySecurityPolicyRuleRequest()) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateGatewaySecurityPolicyRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GatewaySecurityPolicyRule $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRuleName = '[NAME]'; + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRulePriority = 0; + $gatewaySecurityPolicyRuleSessionMatcher = '[SESSION_MATCHER]'; + + update_gateway_security_policy_rule_sample( + $gatewaySecurityPolicyRuleBasicProfile, + $gatewaySecurityPolicyRuleName, + $gatewaySecurityPolicyRuleEnabled, + $gatewaySecurityPolicyRulePriority, + $gatewaySecurityPolicyRuleSessionMatcher + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateGatewaySecurityPolicyRule_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php new file mode 100644 index 000000000000..29d59c208301 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php @@ -0,0 +1,85 @@ +setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest()) + ->setServerTlsPolicy($serverTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateServerTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ServerTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $serverTlsPolicyName = '[NAME]'; + + update_server_tls_policy_sample($serverTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php new file mode 100644 index 000000000000..eb333f967515 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php @@ -0,0 +1,99 @@ +setName($tlsInspectionPolicyName) + ->setCaPool($formattedTlsInspectionPolicyCaPool); + $request = (new UpdateTlsInspectionPolicyRequest()) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateTlsInspectionPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TlsInspectionPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $tlsInspectionPolicyName = '[NAME]'; + $formattedTlsInspectionPolicyCaPool = NetworkSecurityClient::caPoolName( + '[PROJECT]', + '[LOCATION]', + '[CA_POOL]' + ); + + update_tls_inspection_policy_sample($tlsInspectionPolicyName, $formattedTlsInspectionPolicyCaPool); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateTlsInspectionPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_url_list.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_url_list.php new file mode 100644 index 000000000000..2b30bf315aff --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_url_list.php @@ -0,0 +1,92 @@ +setName($urlListName) + ->setValues($urlListValues); + $request = (new UpdateUrlListRequest()) + ->setUrlList($urlList); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateUrlList($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UrlList $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $urlListName = '[NAME]'; + $urlListValuesElement = '[VALUES]'; + + update_url_list_sample($urlListName, $urlListValuesElement); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateUrlList_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php new file mode 100644 index 000000000000..eddea234e226 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php @@ -0,0 +1,92 @@ +setAddressGroup($formattedAddressGroup) + ->setItems($items); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationAddressGroupServiceClient->addAddressGroupItems($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + $itemsElement = '[ITEMS]'; + + add_address_group_items_sample($formattedAddressGroup, $itemsElement); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_AddAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php new file mode 100644 index 000000000000..6867c0791256 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php @@ -0,0 +1,98 @@ +setAddressGroup($formattedAddressGroup) + ->setSourceAddressGroup($formattedSourceAddressGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationAddressGroupServiceClient->cloneAddressGroupItems($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + $formattedSourceAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + clone_address_group_items_sample($formattedAddressGroup, $formattedSourceAddressGroup); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_CloneAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php new file mode 100644 index 000000000000..eee22d30a2d8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php @@ -0,0 +1,118 @@ +`. + * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * @param int $addressGroupCapacity Capacity of the Address Group + */ +function create_address_group_sample( + string $formattedParent, + string $addressGroupId, + string $addressGroupName, + int $addressGroupType, + int $addressGroupCapacity +): void { + // Create a client. + $organizationAddressGroupServiceClient = new OrganizationAddressGroupServiceClient(); + + // Prepare the request message. + $addressGroup = (new AddressGroup()) + ->setName($addressGroupName) + ->setType($addressGroupType) + ->setCapacity($addressGroupCapacity); + $request = (new CreateAddressGroupRequest()) + ->setParent($formattedParent) + ->setAddressGroupId($addressGroupId) + ->setAddressGroup($addressGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationAddressGroupServiceClient->createAddressGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrganizationAddressGroupServiceClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + $addressGroupId = '[ADDRESS_GROUP_ID]'; + $addressGroupName = '[NAME]'; + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroupCapacity = 0; + + create_address_group_sample( + $formattedParent, + $addressGroupId, + $addressGroupName, + $addressGroupType, + $addressGroupCapacity + ); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_CreateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php new file mode 100644 index 000000000000..4c5889bf65e0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationAddressGroupServiceClient->deleteAddressGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrganizationAddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + delete_address_group_sample($formattedName); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_DeleteAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php new file mode 100644 index 000000000000..acb3d1d1b7e9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AddressGroup $response */ + $response = $organizationAddressGroupServiceClient->getAddressGroup($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 = OrganizationAddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + get_address_group_sample($formattedName); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_GetAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..bd7bc0b26a08 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $organizationAddressGroupServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_location.php new file mode 100644 index 000000000000..9095fd4a1feb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/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 networksecurity_v1_generated_OrganizationAddressGroupService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php new file mode 100644 index 000000000000..e5aae2a20c3b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php @@ -0,0 +1,81 @@ +setAddressGroup($formattedAddressGroup); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $organizationAddressGroupServiceClient->listAddressGroupReferences($request); + + /** @var AddressGroupReference $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 +{ + $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + + list_address_group_references_sample($formattedAddressGroup); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_ListAddressGroupReferences_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php new file mode 100644 index 000000000000..d393c1b1fdc9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $organizationAddressGroupServiceClient->listAddressGroups($request); + + /** @var AddressGroup $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 = OrganizationAddressGroupServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_address_groups_sample($formattedParent); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_ListAddressGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php new file mode 100644 index 000000000000..c3a3c3d70ae6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_OrganizationAddressGroupService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php new file mode 100644 index 000000000000..715a48bf0108 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php @@ -0,0 +1,94 @@ +setAddressGroup($formattedAddressGroup) + ->setItems($items); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationAddressGroupServiceClient->removeAddressGroupItems($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( + '[PROJECT]', + '[LOCATION]', + '[ADDRESS_GROUP]' + ); + $itemsElement = '[ITEMS]'; + + remove_address_group_items_sample($formattedAddressGroup, $itemsElement); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_RemoveAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..f8a5e58a787c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $organizationAddressGroupServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..c20e1910cebf --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $organizationAddressGroupServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php new file mode 100644 index 000000000000..b259ccb545d6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php @@ -0,0 +1,96 @@ +`. + * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or + * "IPV6". + * @param int $addressGroupCapacity Capacity of the Address Group + */ +function update_address_group_sample( + string $addressGroupName, + int $addressGroupType, + int $addressGroupCapacity +): void { + // Create a client. + $organizationAddressGroupServiceClient = new OrganizationAddressGroupServiceClient(); + + // Prepare the request message. + $addressGroup = (new AddressGroup()) + ->setName($addressGroupName) + ->setType($addressGroupType) + ->setCapacity($addressGroupCapacity); + $request = (new UpdateAddressGroupRequest()) + ->setAddressGroup($addressGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationAddressGroupServiceClient->updateAddressGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddressGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $addressGroupName = '[NAME]'; + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroupCapacity = 0; + + update_address_group_sample($addressGroupName, $addressGroupType, $addressGroupCapacity); +} +// [END networksecurity_v1_generated_OrganizationAddressGroupService_UpdateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php new file mode 100644 index 000000000000..55fe4aa40c9d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setSecurityProfileId($securityProfileId) + ->setSecurityProfile($securityProfile); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->createSecurityProfile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SecurityProfile $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrganizationSecurityProfileGroupServiceClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + $securityProfileId = '[SECURITY_PROFILE_ID]'; + + create_security_profile_sample($formattedParent, $securityProfileId); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_CreateSecurityProfile_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php new file mode 100644 index 000000000000..e2f9e9c176fa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php @@ -0,0 +1,97 @@ +setParent($formattedParent) + ->setSecurityProfileGroupId($securityProfileGroupId) + ->setSecurityProfileGroup($securityProfileGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->createSecurityProfileGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SecurityProfileGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrganizationSecurityProfileGroupServiceClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + $securityProfileGroupId = '[SECURITY_PROFILE_GROUP_ID]'; + + create_security_profile_group_sample($formattedParent, $securityProfileGroupId); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_CreateSecurityProfileGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php new file mode 100644 index 000000000000..4ac692d94be8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->deleteSecurityProfile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrganizationSecurityProfileGroupServiceClient::securityProfileName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE]' + ); + + delete_security_profile_sample($formattedName); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_DeleteSecurityProfile_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php new file mode 100644 index 000000000000..1687b36503d0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->deleteSecurityProfileGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrganizationSecurityProfileGroupServiceClient::securityProfileGroupName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE_GROUP]' + ); + + delete_security_profile_group_sample($formattedName); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_DeleteSecurityProfileGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..954d603b4e76 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $organizationSecurityProfileGroupServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php new file mode 100644 index 000000000000..e0f327b3fb5a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/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 networksecurity_v1_generated_OrganizationSecurityProfileGroupService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php new file mode 100644 index 000000000000..f63cc81cb80b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SecurityProfile $response */ + $response = $organizationSecurityProfileGroupServiceClient->getSecurityProfile($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 = OrganizationSecurityProfileGroupServiceClient::securityProfileName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE]' + ); + + get_security_profile_sample($formattedName); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_GetSecurityProfile_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php new file mode 100644 index 000000000000..fab5b49cc467 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SecurityProfileGroup $response */ + $response = $organizationSecurityProfileGroupServiceClient->getSecurityProfileGroup($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 = OrganizationSecurityProfileGroupServiceClient::securityProfileGroupName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE_GROUP]' + ); + + get_security_profile_group_sample($formattedName); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_GetSecurityProfileGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php new file mode 100644 index 000000000000..adbfa01e0294 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php @@ -0,0 +1,78 @@ +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 networksecurity_v1_generated_OrganizationSecurityProfileGroupService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php new file mode 100644 index 000000000000..fd1730b10b6f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->listSecurityProfileGroups($request); + + /** @var SecurityProfileGroup $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 = OrganizationSecurityProfileGroupServiceClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_security_profile_groups_sample($formattedParent); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_ListSecurityProfileGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php new file mode 100644 index 000000000000..615bbab8d961 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->listSecurityProfiles($request); + + /** @var SecurityProfile $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 = OrganizationSecurityProfileGroupServiceClient::organizationLocationName( + '[ORGANIZATION]', + '[LOCATION]' + ); + + list_security_profiles_sample($formattedParent); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_ListSecurityProfiles_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..ad423d1d7517 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $organizationSecurityProfileGroupServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..97ad50f04622 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php new file mode 100644 index 000000000000..3b9617951103 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setSecurityProfile($securityProfile); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->updateSecurityProfile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SecurityProfile $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_UpdateSecurityProfile_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php new file mode 100644 index 000000000000..a0266692ccb6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setSecurityProfileGroup($securityProfileGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $organizationSecurityProfileGroupServiceClient->updateSecurityProfileGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SecurityProfileGroup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networksecurity_v1_generated_OrganizationSecurityProfileGroupService_UpdateSecurityProfileGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php new file mode 100644 index 000000000000..5f8442b61eb4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php @@ -0,0 +1,791 @@ + addAddressGroupItemsAsync(AddAddressGroupItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface cloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAddressGroupAsync(CreateAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAddressGroupAsync(DeleteAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAddressGroupAsync(GetAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAddressGroupReferencesAsync(ListAddressGroupReferencesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAddressGroupsAsync(ListAddressGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeAddressGroupItemsAsync(RemoveAddressGroupItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAddressGroupAsync(UpdateAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class AddressGroupServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.AddressGroupService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/address_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/address_group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/address_group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/address_group_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * address_group resource. + * + * @param string $project + * @param string $location + * @param string $addressGroup + * + * @return string The formatted address_group resource. + */ + public static function addressGroupName(string $project, string $location, string $addressGroup): string + { + return self::getPathTemplate('addressGroup')->render([ + 'project' => $project, + 'location' => $location, + 'address_group' => $addressGroup, + ]); + } + + /** + * 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_address_group resource. + * + * @param string $organization + * @param string $location + * @param string $addressGroup + * + * @return string The formatted organization_location_address_group resource. + */ + public static function organizationLocationAddressGroupName(string $organization, string $location, string $addressGroup): string + { + return self::getPathTemplate('organizationLocationAddressGroup')->render([ + 'organization' => $organization, + 'location' => $location, + 'address_group' => $addressGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_address_group resource. + * + * @param string $project + * @param string $location + * @param string $addressGroup + * + * @return string The formatted project_location_address_group resource. + */ + public static function projectLocationAddressGroupName(string $project, string $location, string $addressGroup): string + { + return self::getPathTemplate('projectLocationAddressGroup')->render([ + 'project' => $project, + 'location' => $location, + 'address_group' => $addressGroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - addressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} + * - location: projects/{project}/locations/{location} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationAddressGroup: organizations/{organization}/locations/{location}/addressGroups/{address_group} + * - projectLocationAddressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\NetworkSecurity\V1\AddressGroupServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AddressGroupServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds items to an address group. + * + * The async variant is + * {@see AddressGroupServiceClient::addAddressGroupItemsAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/add_address_group_items.php + * + * @param AddAddressGroupItemsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function addAddressGroupItems(AddAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AddAddressGroupItems', $request, $callOptions)->wait(); + } + + /** + * Clones items from one address group to another. + * + * The async variant is + * {@see AddressGroupServiceClient::cloneAddressGroupItemsAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/clone_address_group_items.php + * + * @param CloneAddressGroupItemsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cloneAddressGroupItems(CloneAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CloneAddressGroupItems', $request, $callOptions)->wait(); + } + + /** + * Creates a new address group in a given project and location. + * + * The async variant is {@see AddressGroupServiceClient::createAddressGroupAsync()} + * . + * + * @example samples/V1/AddressGroupServiceClient/create_address_group.php + * + * @param CreateAddressGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAddressGroup(CreateAddressGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes a single address group. + * + * The async variant is {@see AddressGroupServiceClient::deleteAddressGroupAsync()} + * . + * + * @example samples/V1/AddressGroupServiceClient/delete_address_group.php + * + * @param DeleteAddressGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAddressGroup(DeleteAddressGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single address group. + * + * The async variant is {@see AddressGroupServiceClient::getAddressGroupAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/get_address_group.php + * + * @param GetAddressGroupRequest $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 AddressGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAddressGroup(GetAddressGroupRequest $request, array $callOptions = []): AddressGroup + { + return $this->startApiCall('GetAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Lists references of an address group. + * + * The async variant is + * {@see AddressGroupServiceClient::listAddressGroupReferencesAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/list_address_group_references.php + * + * @param ListAddressGroupReferencesRequest $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 listAddressGroupReferences(ListAddressGroupReferencesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAddressGroupReferences', $request, $callOptions); + } + + /** + * Lists address groups in a given project and location. + * + * The async variant is {@see AddressGroupServiceClient::listAddressGroupsAsync()} + * . + * + * @example samples/V1/AddressGroupServiceClient/list_address_groups.php + * + * @param ListAddressGroupsRequest $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 listAddressGroups(ListAddressGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAddressGroups', $request, $callOptions); + } + + /** + * Removes items from an address group. + * + * The async variant is + * {@see AddressGroupServiceClient::removeAddressGroupItemsAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/remove_address_group_items.php + * + * @param RemoveAddressGroupItemsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeAddressGroupItems(RemoveAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RemoveAddressGroupItems', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single address group. + * + * The async variant is {@see AddressGroupServiceClient::updateAddressGroupAsync()} + * . + * + * @example samples/V1/AddressGroupServiceClient/update_address_group.php + * + * @param UpdateAddressGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAddressGroup(UpdateAddressGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AddressGroupServiceClient::getLocationAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see AddressGroupServiceClient::listLocationsAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see AddressGroupServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see AddressGroupServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/AddressGroupServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see AddressGroupServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/AddressGroupServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/DnsThreatDetectorServiceClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/DnsThreatDetectorServiceClient.php new file mode 100644 index 000000000000..bb27439d6ffc --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/DnsThreatDetectorServiceClient.php @@ -0,0 +1,581 @@ + createDnsThreatDetectorAsync(CreateDnsThreatDetectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDnsThreatDetectorAsync(DeleteDnsThreatDetectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDnsThreatDetectorAsync(GetDnsThreatDetectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDnsThreatDetectorsAsync(ListDnsThreatDetectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDnsThreatDetectorAsync(UpdateDnsThreatDetectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class DnsThreatDetectorServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.DnsThreatDetectorService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/dns_threat_detector_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/dns_threat_detector_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/dns_threat_detector_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/dns_threat_detector_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dns_threat_detector resource. + * + * @param string $project + * @param string $location + * @param string $dnsThreatDetector + * + * @return string The formatted dns_threat_detector resource. + */ + public static function dnsThreatDetectorName(string $project, string $location, string $dnsThreatDetector): string + { + return self::getPathTemplate('dnsThreatDetector')->render([ + 'project' => $project, + 'location' => $location, + 'dns_threat_detector' => $dnsThreatDetector, + ]); + } + + /** + * 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 network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dnsThreatDetector: projects/{project}/locations/{location}/dnsThreatDetectors/{dns_threat_detector} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\NetworkSecurity\V1\DnsThreatDetectorServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DnsThreatDetectorServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** 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 new DnsThreatDetector in a given project and location. + * + * The async variant is + * {@see DnsThreatDetectorServiceClient::createDnsThreatDetectorAsync()} . + * + * @example samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php + * + * @param CreateDnsThreatDetectorRequest $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 DnsThreatDetector + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDnsThreatDetector(CreateDnsThreatDetectorRequest $request, array $callOptions = []): DnsThreatDetector + { + return $this->startApiCall('CreateDnsThreatDetector', $request, $callOptions)->wait(); + } + + /** + * Deletes a single DnsThreatDetector. + * + * The async variant is + * {@see DnsThreatDetectorServiceClient::deleteDnsThreatDetectorAsync()} . + * + * @example samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php + * + * @param DeleteDnsThreatDetectorRequest $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 deleteDnsThreatDetector(DeleteDnsThreatDetectorRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDnsThreatDetector', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a single DnsThreatDetector. + * + * The async variant is + * {@see DnsThreatDetectorServiceClient::getDnsThreatDetectorAsync()} . + * + * @example samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php + * + * @param GetDnsThreatDetectorRequest $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 DnsThreatDetector + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDnsThreatDetector(GetDnsThreatDetectorRequest $request, array $callOptions = []): DnsThreatDetector + { + return $this->startApiCall('GetDnsThreatDetector', $request, $callOptions)->wait(); + } + + /** + * Lists DnsThreatDetectors in a given project and location. + * + * The async variant is + * {@see DnsThreatDetectorServiceClient::listDnsThreatDetectorsAsync()} . + * + * @example samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php + * + * @param ListDnsThreatDetectorsRequest $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 listDnsThreatDetectors(ListDnsThreatDetectorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDnsThreatDetectors', $request, $callOptions); + } + + /** + * Updates a single DnsThreatDetector. + * + * The async variant is + * {@see DnsThreatDetectorServiceClient::updateDnsThreatDetectorAsync()} . + * + * @example samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php + * + * @param UpdateDnsThreatDetectorRequest $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 DnsThreatDetector + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDnsThreatDetector(UpdateDnsThreatDetectorRequest $request, array $callOptions = []): DnsThreatDetector + { + return $this->startApiCall('UpdateDnsThreatDetector', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DnsThreatDetectorServiceClient::getLocationAsync()} . + * + * @example samples/V1/DnsThreatDetectorServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see DnsThreatDetectorServiceClient::listLocationsAsync()} + * . + * + * @example samples/V1/DnsThreatDetectorServiceClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see DnsThreatDetectorServiceClient::getIamPolicyAsync()} + * . + * + * @example samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see DnsThreatDetectorServiceClient::setIamPolicyAsync()} + * . + * + * @example samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is + * {@see DnsThreatDetectorServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/FirewallActivationClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/FirewallActivationClient.php new file mode 100644 index 000000000000..33d819fdd7ca --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/FirewallActivationClient.php @@ -0,0 +1,878 @@ + createFirewallEndpointAsync(CreateFirewallEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface createFirewallEndpointAssociationAsync(CreateFirewallEndpointAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFirewallEndpointAsync(DeleteFirewallEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFirewallEndpointAssociationAsync(DeleteFirewallEndpointAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFirewallEndpointAsync(GetFirewallEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFirewallEndpointAssociationAsync(GetFirewallEndpointAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFirewallEndpointAssociationsAsync(ListFirewallEndpointAssociationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFirewallEndpointsAsync(ListFirewallEndpointsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFirewallEndpointAsync(UpdateFirewallEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFirewallEndpointAssociationAsync(UpdateFirewallEndpointAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class FirewallActivationClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.FirewallActivation'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/firewall_activation_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/firewall_activation_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/firewall_activation_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/firewall_activation_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * firewall_endpoint resource. + * + * @param string $organization + * @param string $location + * @param string $firewallEndpoint + * + * @return string The formatted firewall_endpoint resource. + */ + public static function firewallEndpointName(string $organization, string $location, string $firewallEndpoint): string + { + return self::getPathTemplate('firewallEndpoint')->render([ + 'organization' => $organization, + 'location' => $location, + 'firewall_endpoint' => $firewallEndpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * firewall_endpoint_association resource. + * + * @param string $project + * @param string $location + * @param string $firewallEndpointAssociation + * + * @return string The formatted firewall_endpoint_association resource. + */ + public static function firewallEndpointAssociationName(string $project, string $location, string $firewallEndpointAssociation): string + { + return self::getPathTemplate('firewallEndpointAssociation')->render([ + 'project' => $project, + 'location' => $location, + 'firewall_endpoint_association' => $firewallEndpointAssociation, + ]); + } + + /** + * 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 network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * 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_firewall_endpoint resource. + * + * @param string $organization + * @param string $location + * @param string $firewallEndpoint + * + * @return string The formatted organization_location_firewall_endpoint resource. + */ + public static function organizationLocationFirewallEndpointName(string $organization, string $location, string $firewallEndpoint): string + { + return self::getPathTemplate('organizationLocationFirewallEndpoint')->render([ + 'organization' => $organization, + 'location' => $location, + 'firewall_endpoint' => $firewallEndpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_firewall_endpoint resource. + * + * @param string $project + * @param string $location + * @param string $firewallEndpoint + * + * @return string The formatted project_location_firewall_endpoint resource. + */ + public static function projectLocationFirewallEndpointName(string $project, string $location, string $firewallEndpoint): string + { + return self::getPathTemplate('projectLocationFirewallEndpoint')->render([ + 'project' => $project, + 'location' => $location, + 'firewall_endpoint' => $firewallEndpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tls_inspection_policy resource. + * + * @param string $project + * @param string $location + * @param string $tlsInspectionPolicy + * + * @return string The formatted tls_inspection_policy resource. + */ + public static function tlsInspectionPolicyName(string $project, string $location, string $tlsInspectionPolicy): string + { + return self::getPathTemplate('tlsInspectionPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'tls_inspection_policy' => $tlsInspectionPolicy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - firewallEndpoint: organizations/{organization}/locations/{location}/firewallEndpoints/{firewall_endpoint} + * - firewallEndpointAssociation: projects/{project}/locations/{location}/firewallEndpointAssociations/{firewall_endpoint_association} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationFirewallEndpoint: organizations/{organization}/locations/{location}/firewallEndpoints/{firewall_endpoint} + * - projectLocationFirewallEndpoint: projects/{project}/locations/{location}/firewallEndpoints/{firewall_endpoint} + * - tlsInspectionPolicy: projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\NetworkSecurity\V1\FirewallActivationClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FirewallActivationClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new FirewallEndpoint in a given organization and location. + * + * The async variant is + * {@see FirewallActivationClient::createFirewallEndpointAsync()} . + * + * @example samples/V1/FirewallActivationClient/create_firewall_endpoint.php + * + * @param CreateFirewallEndpointRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFirewallEndpoint(CreateFirewallEndpointRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateFirewallEndpoint', $request, $callOptions)->wait(); + } + + /** + * Creates a new FirewallEndpointAssociation in a given project and location. + * + * The async variant is + * {@see FirewallActivationClient::createFirewallEndpointAssociationAsync()} . + * + * @example samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php + * + * @param CreateFirewallEndpointAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFirewallEndpointAssociation(CreateFirewallEndpointAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateFirewallEndpointAssociation', $request, $callOptions)->wait(); + } + + /** + * Deletes a single org Endpoint. + * + * The async variant is + * {@see FirewallActivationClient::deleteFirewallEndpointAsync()} . + * + * @example samples/V1/FirewallActivationClient/delete_firewall_endpoint.php + * + * @param DeleteFirewallEndpointRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFirewallEndpoint(DeleteFirewallEndpointRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteFirewallEndpoint', $request, $callOptions)->wait(); + } + + /** + * Deletes a single FirewallEndpointAssociation. + * + * The async variant is + * {@see FirewallActivationClient::deleteFirewallEndpointAssociationAsync()} . + * + * @example samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php + * + * @param DeleteFirewallEndpointAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFirewallEndpointAssociation(DeleteFirewallEndpointAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteFirewallEndpointAssociation', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single org Endpoint. + * + * The async variant is {@see FirewallActivationClient::getFirewallEndpointAsync()} + * . + * + * @example samples/V1/FirewallActivationClient/get_firewall_endpoint.php + * + * @param GetFirewallEndpointRequest $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 FirewallEndpoint + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFirewallEndpoint(GetFirewallEndpointRequest $request, array $callOptions = []): FirewallEndpoint + { + return $this->startApiCall('GetFirewallEndpoint', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single FirewallEndpointAssociation. + * + * The async variant is + * {@see FirewallActivationClient::getFirewallEndpointAssociationAsync()} . + * + * @example samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php + * + * @param GetFirewallEndpointAssociationRequest $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 FirewallEndpointAssociation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFirewallEndpointAssociation(GetFirewallEndpointAssociationRequest $request, array $callOptions = []): FirewallEndpointAssociation + { + return $this->startApiCall('GetFirewallEndpointAssociation', $request, $callOptions)->wait(); + } + + /** + * Lists Associations in a given project and location. + * + * The async variant is + * {@see FirewallActivationClient::listFirewallEndpointAssociationsAsync()} . + * + * @example samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php + * + * @param ListFirewallEndpointAssociationsRequest $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 listFirewallEndpointAssociations(ListFirewallEndpointAssociationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFirewallEndpointAssociations', $request, $callOptions); + } + + /** + * Lists FirewallEndpoints in a given organization and location. + * + * The async variant is + * {@see FirewallActivationClient::listFirewallEndpointsAsync()} . + * + * @example samples/V1/FirewallActivationClient/list_firewall_endpoints.php + * + * @param ListFirewallEndpointsRequest $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 listFirewallEndpoints(ListFirewallEndpointsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFirewallEndpoints', $request, $callOptions); + } + + /** + * Update a single org Endpoint. + * + * The async variant is + * {@see FirewallActivationClient::updateFirewallEndpointAsync()} . + * + * @example samples/V1/FirewallActivationClient/update_firewall_endpoint.php + * + * @param UpdateFirewallEndpointRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFirewallEndpoint(UpdateFirewallEndpointRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateFirewallEndpoint', $request, $callOptions)->wait(); + } + + /** + * Update a single FirewallEndpointAssociation. + * + * The async variant is + * {@see FirewallActivationClient::updateFirewallEndpointAssociationAsync()} . + * + * @example samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php + * + * @param UpdateFirewallEndpointAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFirewallEndpointAssociation(UpdateFirewallEndpointAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateFirewallEndpointAssociation', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see FirewallActivationClient::getLocationAsync()} . + * + * @example samples/V1/FirewallActivationClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see FirewallActivationClient::listLocationsAsync()} . + * + * @example samples/V1/FirewallActivationClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see FirewallActivationClient::getIamPolicyAsync()} . + * + * @example samples/V1/FirewallActivationClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see FirewallActivationClient::setIamPolicyAsync()} . + * + * @example samples/V1/FirewallActivationClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see FirewallActivationClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/FirewallActivationClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/InterceptClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/InterceptClient.php new file mode 100644 index 000000000000..6bf3eb069cfa --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/InterceptClient.php @@ -0,0 +1,1164 @@ + createInterceptDeploymentAsync(CreateInterceptDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInterceptDeploymentGroupAsync(CreateInterceptDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInterceptEndpointGroupAsync(CreateInterceptEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInterceptEndpointGroupAssociationAsync(CreateInterceptEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInterceptDeploymentAsync(DeleteInterceptDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInterceptDeploymentGroupAsync(DeleteInterceptDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInterceptEndpointGroupAsync(DeleteInterceptEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInterceptEndpointGroupAssociationAsync(DeleteInterceptEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInterceptDeploymentAsync(GetInterceptDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInterceptDeploymentGroupAsync(GetInterceptDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInterceptEndpointGroupAsync(GetInterceptEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInterceptEndpointGroupAssociationAsync(GetInterceptEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInterceptDeploymentGroupsAsync(ListInterceptDeploymentGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInterceptDeploymentsAsync(ListInterceptDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInterceptEndpointGroupAssociationsAsync(ListInterceptEndpointGroupAssociationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInterceptEndpointGroupsAsync(ListInterceptEndpointGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInterceptDeploymentAsync(UpdateInterceptDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInterceptDeploymentGroupAsync(UpdateInterceptDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInterceptEndpointGroupAsync(UpdateInterceptEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInterceptEndpointGroupAssociationAsync(UpdateInterceptEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class InterceptClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.Intercept'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/intercept_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/intercept_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/intercept_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/intercept_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * forwarding_rule resource. + * + * @param string $project + * @param string $forwardingRule + * + * @return string The formatted forwarding_rule resource. + */ + public static function forwardingRuleName(string $project, string $forwardingRule): string + { + return self::getPathTemplate('forwardingRule')->render([ + 'project' => $project, + 'forwarding_rule' => $forwardingRule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * intercept_deployment resource. + * + * @param string $project + * @param string $location + * @param string $interceptDeployment + * + * @return string The formatted intercept_deployment resource. + */ + public static function interceptDeploymentName(string $project, string $location, string $interceptDeployment): string + { + return self::getPathTemplate('interceptDeployment')->render([ + 'project' => $project, + 'location' => $location, + 'intercept_deployment' => $interceptDeployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * intercept_deployment_group resource. + * + * @param string $project + * @param string $location + * @param string $interceptDeploymentGroup + * + * @return string The formatted intercept_deployment_group resource. + */ + public static function interceptDeploymentGroupName(string $project, string $location, string $interceptDeploymentGroup): string + { + return self::getPathTemplate('interceptDeploymentGroup')->render([ + 'project' => $project, + 'location' => $location, + 'intercept_deployment_group' => $interceptDeploymentGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * intercept_endpoint_group resource. + * + * @param string $project + * @param string $location + * @param string $interceptEndpointGroup + * + * @return string The formatted intercept_endpoint_group resource. + */ + public static function interceptEndpointGroupName(string $project, string $location, string $interceptEndpointGroup): string + { + return self::getPathTemplate('interceptEndpointGroup')->render([ + 'project' => $project, + 'location' => $location, + 'intercept_endpoint_group' => $interceptEndpointGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * intercept_endpoint_group_association resource. + * + * @param string $project + * @param string $location + * @param string $interceptEndpointGroupAssociation + * + * @return string The formatted intercept_endpoint_group_association resource. + */ + public static function interceptEndpointGroupAssociationName(string $project, string $location, string $interceptEndpointGroupAssociation): string + { + return self::getPathTemplate('interceptEndpointGroupAssociation')->render([ + 'project' => $project, + 'location' => $location, + 'intercept_endpoint_group_association' => $interceptEndpointGroupAssociation, + ]); + } + + /** + * 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 network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - forwardingRule: projects/{project}/global/forwardingRules/{forwarding_rule} + * - interceptDeployment: projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment} + * - interceptDeploymentGroup: projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group} + * - interceptEndpointGroup: projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group} + * - interceptEndpointGroupAssociation: projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\NetworkSecurity\V1\InterceptClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new InterceptClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a deployment in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is {@see InterceptClient::createInterceptDeploymentAsync()} . + * + * @example samples/V1/InterceptClient/create_intercept_deployment.php + * + * @param CreateInterceptDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInterceptDeployment(CreateInterceptDeploymentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInterceptDeployment', $request, $callOptions)->wait(); + } + + /** + * Creates a deployment group in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is + * {@see InterceptClient::createInterceptDeploymentGroupAsync()} . + * + * @example samples/V1/InterceptClient/create_intercept_deployment_group.php + * + * @param CreateInterceptDeploymentGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInterceptDeploymentGroup(CreateInterceptDeploymentGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInterceptDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Creates an endpoint group in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is {@see InterceptClient::createInterceptEndpointGroupAsync()} + * . + * + * @example samples/V1/InterceptClient/create_intercept_endpoint_group.php + * + * @param CreateInterceptEndpointGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInterceptEndpointGroup(CreateInterceptEndpointGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInterceptEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Creates an association in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is + * {@see InterceptClient::createInterceptEndpointGroupAssociationAsync()} . + * + * @example samples/V1/InterceptClient/create_intercept_endpoint_group_association.php + * + * @param CreateInterceptEndpointGroupAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInterceptEndpointGroupAssociation(CreateInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Deletes a deployment. + * See https://google.aip.dev/135. + * + * The async variant is {@see InterceptClient::deleteInterceptDeploymentAsync()} . + * + * @example samples/V1/InterceptClient/delete_intercept_deployment.php + * + * @param DeleteInterceptDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInterceptDeployment(DeleteInterceptDeploymentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInterceptDeployment', $request, $callOptions)->wait(); + } + + /** + * Deletes a deployment group. + * See https://google.aip.dev/135. + * + * The async variant is + * {@see InterceptClient::deleteInterceptDeploymentGroupAsync()} . + * + * @example samples/V1/InterceptClient/delete_intercept_deployment_group.php + * + * @param DeleteInterceptDeploymentGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInterceptDeploymentGroup(DeleteInterceptDeploymentGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInterceptDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes an endpoint group. + * See https://google.aip.dev/135. + * + * The async variant is {@see InterceptClient::deleteInterceptEndpointGroupAsync()} + * . + * + * @example samples/V1/InterceptClient/delete_intercept_endpoint_group.php + * + * @param DeleteInterceptEndpointGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInterceptEndpointGroup(DeleteInterceptEndpointGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInterceptEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes an association. + * See https://google.aip.dev/135. + * + * The async variant is + * {@see InterceptClient::deleteInterceptEndpointGroupAssociationAsync()} . + * + * @example samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php + * + * @param DeleteInterceptEndpointGroupAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInterceptEndpointGroupAssociation(DeleteInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Gets a specific deployment. + * See https://google.aip.dev/131. + * + * The async variant is {@see InterceptClient::getInterceptDeploymentAsync()} . + * + * @example samples/V1/InterceptClient/get_intercept_deployment.php + * + * @param GetInterceptDeploymentRequest $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 InterceptDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInterceptDeployment(GetInterceptDeploymentRequest $request, array $callOptions = []): InterceptDeployment + { + return $this->startApiCall('GetInterceptDeployment', $request, $callOptions)->wait(); + } + + /** + * Gets a specific deployment group. + * See https://google.aip.dev/131. + * + * The async variant is {@see InterceptClient::getInterceptDeploymentGroupAsync()} + * . + * + * @example samples/V1/InterceptClient/get_intercept_deployment_group.php + * + * @param GetInterceptDeploymentGroupRequest $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 InterceptDeploymentGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInterceptDeploymentGroup(GetInterceptDeploymentGroupRequest $request, array $callOptions = []): InterceptDeploymentGroup + { + return $this->startApiCall('GetInterceptDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Gets a specific endpoint group. + * See https://google.aip.dev/131. + * + * The async variant is {@see InterceptClient::getInterceptEndpointGroupAsync()} . + * + * @example samples/V1/InterceptClient/get_intercept_endpoint_group.php + * + * @param GetInterceptEndpointGroupRequest $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 InterceptEndpointGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInterceptEndpointGroup(GetInterceptEndpointGroupRequest $request, array $callOptions = []): InterceptEndpointGroup + { + return $this->startApiCall('GetInterceptEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Gets a specific association. + * See https://google.aip.dev/131. + * + * The async variant is + * {@see InterceptClient::getInterceptEndpointGroupAssociationAsync()} . + * + * @example samples/V1/InterceptClient/get_intercept_endpoint_group_association.php + * + * @param GetInterceptEndpointGroupAssociationRequest $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 InterceptEndpointGroupAssociation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInterceptEndpointGroupAssociation(GetInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): InterceptEndpointGroupAssociation + { + return $this->startApiCall('GetInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Lists deployment groups in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is + * {@see InterceptClient::listInterceptDeploymentGroupsAsync()} . + * + * @example samples/V1/InterceptClient/list_intercept_deployment_groups.php + * + * @param ListInterceptDeploymentGroupsRequest $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 listInterceptDeploymentGroups(ListInterceptDeploymentGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInterceptDeploymentGroups', $request, $callOptions); + } + + /** + * Lists deployments in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is {@see InterceptClient::listInterceptDeploymentsAsync()} . + * + * @example samples/V1/InterceptClient/list_intercept_deployments.php + * + * @param ListInterceptDeploymentsRequest $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 listInterceptDeployments(ListInterceptDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInterceptDeployments', $request, $callOptions); + } + + /** + * Lists associations in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is + * {@see InterceptClient::listInterceptEndpointGroupAssociationsAsync()} . + * + * @example samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php + * + * @param ListInterceptEndpointGroupAssociationsRequest $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 listInterceptEndpointGroupAssociations(ListInterceptEndpointGroupAssociationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInterceptEndpointGroupAssociations', $request, $callOptions); + } + + /** + * Lists endpoint groups in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is {@see InterceptClient::listInterceptEndpointGroupsAsync()} + * . + * + * @example samples/V1/InterceptClient/list_intercept_endpoint_groups.php + * + * @param ListInterceptEndpointGroupsRequest $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 listInterceptEndpointGroups(ListInterceptEndpointGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInterceptEndpointGroups', $request, $callOptions); + } + + /** + * Updates a deployment. + * See https://google.aip.dev/134. + * + * The async variant is {@see InterceptClient::updateInterceptDeploymentAsync()} . + * + * @example samples/V1/InterceptClient/update_intercept_deployment.php + * + * @param UpdateInterceptDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInterceptDeployment(UpdateInterceptDeploymentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInterceptDeployment', $request, $callOptions)->wait(); + } + + /** + * Updates a deployment group. + * See https://google.aip.dev/134. + * + * The async variant is + * {@see InterceptClient::updateInterceptDeploymentGroupAsync()} . + * + * @example samples/V1/InterceptClient/update_intercept_deployment_group.php + * + * @param UpdateInterceptDeploymentGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInterceptDeploymentGroup(UpdateInterceptDeploymentGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInterceptDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Updates an endpoint group. + * See https://google.aip.dev/134. + * + * The async variant is {@see InterceptClient::updateInterceptEndpointGroupAsync()} + * . + * + * @example samples/V1/InterceptClient/update_intercept_endpoint_group.php + * + * @param UpdateInterceptEndpointGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInterceptEndpointGroup(UpdateInterceptEndpointGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInterceptEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Updates an association. + * See https://google.aip.dev/134. + * + * The async variant is + * {@see InterceptClient::updateInterceptEndpointGroupAssociationAsync()} . + * + * @example samples/V1/InterceptClient/update_intercept_endpoint_group_association.php + * + * @param UpdateInterceptEndpointGroupAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInterceptEndpointGroupAssociation(UpdateInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see InterceptClient::getLocationAsync()} . + * + * @example samples/V1/InterceptClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see InterceptClient::listLocationsAsync()} . + * + * @example samples/V1/InterceptClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see InterceptClient::getIamPolicyAsync()} . + * + * @example samples/V1/InterceptClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see InterceptClient::setIamPolicyAsync()} . + * + * @example samples/V1/InterceptClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see InterceptClient::testIamPermissionsAsync()} . + * + * @example samples/V1/InterceptClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/MirroringClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/MirroringClient.php new file mode 100644 index 000000000000..9433a961c37a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/MirroringClient.php @@ -0,0 +1,1163 @@ + createMirroringDeploymentAsync(CreateMirroringDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMirroringDeploymentGroupAsync(CreateMirroringDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMirroringEndpointGroupAsync(CreateMirroringEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMirroringEndpointGroupAssociationAsync(CreateMirroringEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMirroringDeploymentAsync(DeleteMirroringDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMirroringDeploymentGroupAsync(DeleteMirroringDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMirroringEndpointGroupAsync(DeleteMirroringEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMirroringEndpointGroupAssociationAsync(DeleteMirroringEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMirroringDeploymentAsync(GetMirroringDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMirroringDeploymentGroupAsync(GetMirroringDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMirroringEndpointGroupAsync(GetMirroringEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMirroringEndpointGroupAssociationAsync(GetMirroringEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMirroringDeploymentGroupsAsync(ListMirroringDeploymentGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMirroringDeploymentsAsync(ListMirroringDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMirroringEndpointGroupAssociationsAsync(ListMirroringEndpointGroupAssociationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMirroringEndpointGroupsAsync(ListMirroringEndpointGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMirroringDeploymentAsync(UpdateMirroringDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMirroringDeploymentGroupAsync(UpdateMirroringDeploymentGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMirroringEndpointGroupAsync(UpdateMirroringEndpointGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMirroringEndpointGroupAssociationAsync(UpdateMirroringEndpointGroupAssociationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class MirroringClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.Mirroring'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/mirroring_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/mirroring_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/mirroring_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/mirroring_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * forwarding_rule resource. + * + * @param string $project + * @param string $forwardingRule + * + * @return string The formatted forwarding_rule resource. + */ + public static function forwardingRuleName(string $project, string $forwardingRule): string + { + return self::getPathTemplate('forwardingRule')->render([ + 'project' => $project, + 'forwarding_rule' => $forwardingRule, + ]); + } + + /** + * 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 + * mirroring_deployment resource. + * + * @param string $project + * @param string $location + * @param string $mirroringDeployment + * + * @return string The formatted mirroring_deployment resource. + */ + public static function mirroringDeploymentName(string $project, string $location, string $mirroringDeployment): string + { + return self::getPathTemplate('mirroringDeployment')->render([ + 'project' => $project, + 'location' => $location, + 'mirroring_deployment' => $mirroringDeployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mirroring_deployment_group resource. + * + * @param string $project + * @param string $location + * @param string $mirroringDeploymentGroup + * + * @return string The formatted mirroring_deployment_group resource. + */ + public static function mirroringDeploymentGroupName(string $project, string $location, string $mirroringDeploymentGroup): string + { + return self::getPathTemplate('mirroringDeploymentGroup')->render([ + 'project' => $project, + 'location' => $location, + 'mirroring_deployment_group' => $mirroringDeploymentGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mirroring_endpoint_group resource. + * + * @param string $project + * @param string $location + * @param string $mirroringEndpointGroup + * + * @return string The formatted mirroring_endpoint_group resource. + */ + public static function mirroringEndpointGroupName(string $project, string $location, string $mirroringEndpointGroup): string + { + return self::getPathTemplate('mirroringEndpointGroup')->render([ + 'project' => $project, + 'location' => $location, + 'mirroring_endpoint_group' => $mirroringEndpointGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mirroring_endpoint_group_association resource. + * + * @param string $project + * @param string $location + * @param string $mirroringEndpointGroupAssociation + * + * @return string The formatted mirroring_endpoint_group_association resource. + */ + public static function mirroringEndpointGroupAssociationName(string $project, string $location, string $mirroringEndpointGroupAssociation): string + { + return self::getPathTemplate('mirroringEndpointGroupAssociation')->render([ + 'project' => $project, + 'location' => $location, + 'mirroring_endpoint_group_association' => $mirroringEndpointGroupAssociation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - forwardingRule: projects/{project}/global/forwardingRules/{forwarding_rule} + * - location: projects/{project}/locations/{location} + * - mirroringDeployment: projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment} + * - mirroringDeploymentGroup: projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group} + * - mirroringEndpointGroup: projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group} + * - mirroringEndpointGroupAssociation: projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association} + * - network: projects/{project}/global/networks/{network} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\NetworkSecurity\V1\MirroringClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MirroringClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a deployment in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is {@see MirroringClient::createMirroringDeploymentAsync()} . + * + * @example samples/V1/MirroringClient/create_mirroring_deployment.php + * + * @param CreateMirroringDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMirroringDeployment(CreateMirroringDeploymentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMirroringDeployment', $request, $callOptions)->wait(); + } + + /** + * Creates a deployment group in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is + * {@see MirroringClient::createMirroringDeploymentGroupAsync()} . + * + * @example samples/V1/MirroringClient/create_mirroring_deployment_group.php + * + * @param CreateMirroringDeploymentGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMirroringDeploymentGroup(CreateMirroringDeploymentGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMirroringDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Creates an endpoint group in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is {@see MirroringClient::createMirroringEndpointGroupAsync()} + * . + * + * @example samples/V1/MirroringClient/create_mirroring_endpoint_group.php + * + * @param CreateMirroringEndpointGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMirroringEndpointGroup(CreateMirroringEndpointGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMirroringEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Creates an association in a given project and location. + * See https://google.aip.dev/133. + * + * The async variant is + * {@see MirroringClient::createMirroringEndpointGroupAssociationAsync()} . + * + * @example samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php + * + * @param CreateMirroringEndpointGroupAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMirroringEndpointGroupAssociation(CreateMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Deletes a deployment. + * See https://google.aip.dev/135. + * + * The async variant is {@see MirroringClient::deleteMirroringDeploymentAsync()} . + * + * @example samples/V1/MirroringClient/delete_mirroring_deployment.php + * + * @param DeleteMirroringDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMirroringDeployment(DeleteMirroringDeploymentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMirroringDeployment', $request, $callOptions)->wait(); + } + + /** + * Deletes a deployment group. + * See https://google.aip.dev/135. + * + * The async variant is + * {@see MirroringClient::deleteMirroringDeploymentGroupAsync()} . + * + * @example samples/V1/MirroringClient/delete_mirroring_deployment_group.php + * + * @param DeleteMirroringDeploymentGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMirroringDeploymentGroup(DeleteMirroringDeploymentGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMirroringDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes an endpoint group. + * See https://google.aip.dev/135. + * + * The async variant is {@see MirroringClient::deleteMirroringEndpointGroupAsync()} + * . + * + * @example samples/V1/MirroringClient/delete_mirroring_endpoint_group.php + * + * @param DeleteMirroringEndpointGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMirroringEndpointGroup(DeleteMirroringEndpointGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMirroringEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes an association. + * See https://google.aip.dev/135. + * + * The async variant is + * {@see MirroringClient::deleteMirroringEndpointGroupAssociationAsync()} . + * + * @example samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php + * + * @param DeleteMirroringEndpointGroupAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMirroringEndpointGroupAssociation(DeleteMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Gets a specific deployment. + * See https://google.aip.dev/131. + * + * The async variant is {@see MirroringClient::getMirroringDeploymentAsync()} . + * + * @example samples/V1/MirroringClient/get_mirroring_deployment.php + * + * @param GetMirroringDeploymentRequest $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 MirroringDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMirroringDeployment(GetMirroringDeploymentRequest $request, array $callOptions = []): MirroringDeployment + { + return $this->startApiCall('GetMirroringDeployment', $request, $callOptions)->wait(); + } + + /** + * Gets a specific deployment group. + * See https://google.aip.dev/131. + * + * The async variant is {@see MirroringClient::getMirroringDeploymentGroupAsync()} + * . + * + * @example samples/V1/MirroringClient/get_mirroring_deployment_group.php + * + * @param GetMirroringDeploymentGroupRequest $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 MirroringDeploymentGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMirroringDeploymentGroup(GetMirroringDeploymentGroupRequest $request, array $callOptions = []): MirroringDeploymentGroup + { + return $this->startApiCall('GetMirroringDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Gets a specific endpoint group. + * See https://google.aip.dev/131. + * + * The async variant is {@see MirroringClient::getMirroringEndpointGroupAsync()} . + * + * @example samples/V1/MirroringClient/get_mirroring_endpoint_group.php + * + * @param GetMirroringEndpointGroupRequest $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 MirroringEndpointGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMirroringEndpointGroup(GetMirroringEndpointGroupRequest $request, array $callOptions = []): MirroringEndpointGroup + { + return $this->startApiCall('GetMirroringEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Gets a specific association. + * See https://google.aip.dev/131. + * + * The async variant is + * {@see MirroringClient::getMirroringEndpointGroupAssociationAsync()} . + * + * @example samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php + * + * @param GetMirroringEndpointGroupAssociationRequest $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 MirroringEndpointGroupAssociation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMirroringEndpointGroupAssociation(GetMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): MirroringEndpointGroupAssociation + { + return $this->startApiCall('GetMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Lists deployment groups in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is + * {@see MirroringClient::listMirroringDeploymentGroupsAsync()} . + * + * @example samples/V1/MirroringClient/list_mirroring_deployment_groups.php + * + * @param ListMirroringDeploymentGroupsRequest $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 listMirroringDeploymentGroups(ListMirroringDeploymentGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMirroringDeploymentGroups', $request, $callOptions); + } + + /** + * Lists deployments in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is {@see MirroringClient::listMirroringDeploymentsAsync()} . + * + * @example samples/V1/MirroringClient/list_mirroring_deployments.php + * + * @param ListMirroringDeploymentsRequest $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 listMirroringDeployments(ListMirroringDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMirroringDeployments', $request, $callOptions); + } + + /** + * Lists associations in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is + * {@see MirroringClient::listMirroringEndpointGroupAssociationsAsync()} . + * + * @example samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php + * + * @param ListMirroringEndpointGroupAssociationsRequest $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 listMirroringEndpointGroupAssociations(ListMirroringEndpointGroupAssociationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMirroringEndpointGroupAssociations', $request, $callOptions); + } + + /** + * Lists endpoint groups in a given project and location. + * See https://google.aip.dev/132. + * + * The async variant is {@see MirroringClient::listMirroringEndpointGroupsAsync()} + * . + * + * @example samples/V1/MirroringClient/list_mirroring_endpoint_groups.php + * + * @param ListMirroringEndpointGroupsRequest $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 listMirroringEndpointGroups(ListMirroringEndpointGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMirroringEndpointGroups', $request, $callOptions); + } + + /** + * Updates a deployment. + * See https://google.aip.dev/134. + * + * The async variant is {@see MirroringClient::updateMirroringDeploymentAsync()} . + * + * @example samples/V1/MirroringClient/update_mirroring_deployment.php + * + * @param UpdateMirroringDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMirroringDeployment(UpdateMirroringDeploymentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMirroringDeployment', $request, $callOptions)->wait(); + } + + /** + * Updates a deployment group. + * See https://google.aip.dev/134. + * + * The async variant is + * {@see MirroringClient::updateMirroringDeploymentGroupAsync()} . + * + * @example samples/V1/MirroringClient/update_mirroring_deployment_group.php + * + * @param UpdateMirroringDeploymentGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMirroringDeploymentGroup(UpdateMirroringDeploymentGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMirroringDeploymentGroup', $request, $callOptions)->wait(); + } + + /** + * Updates an endpoint group. + * See https://google.aip.dev/134. + * + * The async variant is {@see MirroringClient::updateMirroringEndpointGroupAsync()} + * . + * + * @example samples/V1/MirroringClient/update_mirroring_endpoint_group.php + * + * @param UpdateMirroringEndpointGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMirroringEndpointGroup(UpdateMirroringEndpointGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMirroringEndpointGroup', $request, $callOptions)->wait(); + } + + /** + * Updates an association. + * See https://google.aip.dev/134. + * + * The async variant is + * {@see MirroringClient::updateMirroringEndpointGroupAssociationAsync()} . + * + * @example samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php + * + * @param UpdateMirroringEndpointGroupAssociationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMirroringEndpointGroupAssociation(UpdateMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see MirroringClient::getLocationAsync()} . + * + * @example samples/V1/MirroringClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see MirroringClient::listLocationsAsync()} . + * + * @example samples/V1/MirroringClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see MirroringClient::getIamPolicyAsync()} . + * + * @example samples/V1/MirroringClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see MirroringClient::setIamPolicyAsync()} . + * + * @example samples/V1/MirroringClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see MirroringClient::testIamPermissionsAsync()} . + * + * @example samples/V1/MirroringClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php new file mode 100644 index 000000000000..1b5ec3f40664 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php @@ -0,0 +1,1998 @@ + createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAuthzPolicyAsync(CreateAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackendAuthenticationConfigAsync(CreateBackendAuthenticationConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClientTlsPolicyAsync(CreateClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGatewaySecurityPolicyAsync(CreateGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGatewaySecurityPolicyRuleAsync(CreateGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface createServerTlsPolicyAsync(CreateServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTlsInspectionPolicyAsync(CreateTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUrlListAsync(CreateUrlListRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAuthzPolicyAsync(DeleteAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackendAuthenticationConfigAsync(DeleteBackendAuthenticationConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGatewaySecurityPolicyAsync(DeleteGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGatewaySecurityPolicyRuleAsync(DeleteGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTlsInspectionPolicyAsync(DeleteTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUrlListAsync(DeleteUrlListRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuthorizationPolicyAsync(GetAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuthzPolicyAsync(GetAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackendAuthenticationConfigAsync(GetBackendAuthenticationConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClientTlsPolicyAsync(GetClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGatewaySecurityPolicyAsync(GetGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGatewaySecurityPolicyRuleAsync(GetGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getServerTlsPolicyAsync(GetServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTlsInspectionPolicyAsync(GetTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUrlListAsync(GetUrlListRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuthorizationPoliciesAsync(ListAuthorizationPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuthzPoliciesAsync(ListAuthzPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackendAuthenticationConfigsAsync(ListBackendAuthenticationConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClientTlsPoliciesAsync(ListClientTlsPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGatewaySecurityPoliciesAsync(ListGatewaySecurityPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGatewaySecurityPolicyRulesAsync(ListGatewaySecurityPolicyRulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServerTlsPoliciesAsync(ListServerTlsPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTlsInspectionPoliciesAsync(ListTlsInspectionPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUrlListsAsync(ListUrlListsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAuthzPolicyAsync(UpdateAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackendAuthenticationConfigAsync(UpdateBackendAuthenticationConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGatewaySecurityPolicyAsync(UpdateGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGatewaySecurityPolicyRuleAsync(UpdateGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTlsInspectionPolicyAsync(UpdateTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUrlListAsync(UpdateUrlListRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class NetworkSecurityClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.NetworkSecurity'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/network_security_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/network_security_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/network_security_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/network_security_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * authorization_policy resource. + * + * @param string $project + * @param string $location + * @param string $authorizationPolicy + * + * @return string The formatted authorization_policy resource. + */ + public static function authorizationPolicyName(string $project, string $location, string $authorizationPolicy): string + { + return self::getPathTemplate('authorizationPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'authorization_policy' => $authorizationPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a authz_policy + * resource. + * + * @param string $project + * @param string $location + * @param string $authzPolicy + * + * @return string The formatted authz_policy resource. + */ + public static function authzPolicyName(string $project, string $location, string $authzPolicy): string + { + return self::getPathTemplate('authzPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'authz_policy' => $authzPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backend_authentication_config resource. + * + * @param string $project + * @param string $location + * @param string $backendAuthenticationConfig + * + * @return string The formatted backend_authentication_config resource. + */ + public static function backendAuthenticationConfigName(string $project, string $location, string $backendAuthenticationConfig): string + { + return self::getPathTemplate('backendAuthenticationConfig')->render([ + 'project' => $project, + 'location' => $location, + 'backend_authentication_config' => $backendAuthenticationConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a ca_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $caPool + * + * @return string The formatted ca_pool resource. + */ + public static function caPoolName(string $project, string $location, string $caPool): string + { + return self::getPathTemplate('caPool')->render([ + 'project' => $project, + 'location' => $location, + 'ca_pool' => $caPool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a certificate + * resource. + * + * @param string $project + * @param string $location + * @param string $certificate + * + * @return string The formatted certificate resource. + */ + public static function certificateName(string $project, string $location, string $certificate): string + { + return self::getPathTemplate('certificate')->render([ + 'project' => $project, + 'location' => $location, + 'certificate' => $certificate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * client_tls_policy resource. + * + * @param string $project + * @param string $location + * @param string $clientTlsPolicy + * + * @return string The formatted client_tls_policy resource. + */ + public static function clientTlsPolicyName(string $project, string $location, string $clientTlsPolicy): string + { + return self::getPathTemplate('clientTlsPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'client_tls_policy' => $clientTlsPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * gateway_security_policy resource. + * + * @param string $project + * @param string $location + * @param string $gatewaySecurityPolicy + * + * @return string The formatted gateway_security_policy resource. + */ + public static function gatewaySecurityPolicyName(string $project, string $location, string $gatewaySecurityPolicy): string + { + return self::getPathTemplate('gatewaySecurityPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'gateway_security_policy' => $gatewaySecurityPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * gateway_security_policy_rule resource. + * + * @param string $project + * @param string $location + * @param string $gatewaySecurityPolicy + * @param string $rule + * + * @return string The formatted gateway_security_policy_rule resource. + */ + public static function gatewaySecurityPolicyRuleName(string $project, string $location, string $gatewaySecurityPolicy, string $rule): string + { + return self::getPathTemplate('gatewaySecurityPolicyRule')->render([ + 'project' => $project, + 'location' => $location, + 'gateway_security_policy' => $gatewaySecurityPolicy, + 'rule' => $rule, + ]); + } + + /** + * 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 + * server_tls_policy resource. + * + * @param string $project + * @param string $location + * @param string $serverTlsPolicy + * + * @return string The formatted server_tls_policy resource. + */ + public static function serverTlsPolicyName(string $project, string $location, string $serverTlsPolicy): string + { + return self::getPathTemplate('serverTlsPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'server_tls_policy' => $serverTlsPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tls_inspection_policy resource. + * + * @param string $project + * @param string $location + * @param string $tlsInspectionPolicy + * + * @return string The formatted tls_inspection_policy resource. + */ + public static function tlsInspectionPolicyName(string $project, string $location, string $tlsInspectionPolicy): string + { + return self::getPathTemplate('tlsInspectionPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'tls_inspection_policy' => $tlsInspectionPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a trust_config + * resource. + * + * @param string $project + * @param string $location + * @param string $trustConfig + * + * @return string The formatted trust_config resource. + */ + public static function trustConfigName(string $project, string $location, string $trustConfig): string + { + return self::getPathTemplate('trustConfig')->render([ + 'project' => $project, + 'location' => $location, + 'trust_config' => $trustConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a url_list + * resource. + * + * @param string $project + * @param string $location + * @param string $urlList + * + * @return string The formatted url_list resource. + */ + public static function urlListName(string $project, string $location, string $urlList): string + { + return self::getPathTemplate('urlList')->render([ + 'project' => $project, + 'location' => $location, + 'url_list' => $urlList, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy} + * - authzPolicy: projects/{project}/locations/{location}/authzPolicies/{authz_policy} + * - backendAuthenticationConfig: projects/{project}/locations/{location}/backendAuthenticationConfigs/{backend_authentication_config} + * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} + * - certificate: projects/{project}/locations/{location}/certificates/{certificate} + * - clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy} + * - gatewaySecurityPolicy: projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} + * - gatewaySecurityPolicyRule: projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} + * - location: projects/{project}/locations/{location} + * - serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy} + * - tlsInspectionPolicy: projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} + * - trustConfig: projects/{project}/locations/{location}/trustConfigs/{trust_config} + * - urlList: projects/{project}/locations/{location}/urlLists/{url_list} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\NetworkSecurity\V1\NetworkSecurityClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new NetworkSecurityClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new AuthorizationPolicy in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::createAuthorizationPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_authorization_policy.php + * + * @param CreateAuthorizationPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAuthorizationPolicy(CreateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new AuthzPolicy in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::createAuthzPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_authz_policy.php + * + * @param CreateAuthzPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAuthzPolicy(CreateAuthzPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAuthzPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new BackendAuthenticationConfig in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::createBackendAuthenticationConfigAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_backend_authentication_config.php + * + * @param CreateBackendAuthenticationConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackendAuthenticationConfig(CreateBackendAuthenticationConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackendAuthenticationConfig', $request, $callOptions)->wait(); + } + + /** + * Creates a new ClientTlsPolicy in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::createClientTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/create_client_tls_policy.php + * + * @param CreateClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createClientTlsPolicy(CreateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new GatewaySecurityPolicy in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::createGatewaySecurityPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_gateway_security_policy.php + * + * @param CreateGatewaySecurityPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGatewaySecurityPolicy(CreateGatewaySecurityPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGatewaySecurityPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new GatewaySecurityPolicy in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::createGatewaySecurityPolicyRuleAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php + * + * @param CreateGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGatewaySecurityPolicyRule(CreateGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGatewaySecurityPolicyRule', $request, $callOptions)->wait(); + } + + /** + * Creates a new ServerTlsPolicy in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::createServerTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/create_server_tls_policy.php + * + * @param CreateServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createServerTlsPolicy(CreateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new TlsInspectionPolicy in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::createTlsInspectionPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php + * + * @param CreateTlsInspectionPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTlsInspectionPolicy(CreateTlsInspectionPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTlsInspectionPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new UrlList in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::createUrlListAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_url_list.php + * + * @param CreateUrlListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUrlList(CreateUrlListRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateUrlList', $request, $callOptions)->wait(); + } + + /** + * Deletes a single AuthorizationPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::deleteAuthorizationPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_authorization_policy.php + * + * @param DeleteAuthorizationPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAuthorizationPolicy(DeleteAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single AuthzPolicy. + * + * The async variant is {@see NetworkSecurityClient::deleteAuthzPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_authz_policy.php + * + * @param DeleteAuthzPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAuthzPolicy(DeleteAuthzPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAuthzPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single BackendAuthenticationConfig to + * BackendAuthenticationConfig. + * + * The async variant is + * {@see NetworkSecurityClient::deleteBackendAuthenticationConfigAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php + * + * @param DeleteBackendAuthenticationConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackendAuthenticationConfig(DeleteBackendAuthenticationConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackendAuthenticationConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::deleteClientTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/delete_client_tls_policy.php + * + * @param DeleteClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteClientTlsPolicy(DeleteClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single GatewaySecurityPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::deleteGatewaySecurityPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php + * + * @param DeleteGatewaySecurityPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGatewaySecurityPolicy(DeleteGatewaySecurityPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGatewaySecurityPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single GatewaySecurityPolicyRule. + * + * The async variant is + * {@see NetworkSecurityClient::deleteGatewaySecurityPolicyRuleAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php + * + * @param DeleteGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGatewaySecurityPolicyRule(DeleteGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGatewaySecurityPolicyRule', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::deleteServerTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/delete_server_tls_policy.php + * + * @param DeleteServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteServerTlsPolicy(DeleteServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single TlsInspectionPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::deleteTlsInspectionPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php + * + * @param DeleteTlsInspectionPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTlsInspectionPolicy(DeleteTlsInspectionPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteTlsInspectionPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single UrlList. + * + * The async variant is {@see NetworkSecurityClient::deleteUrlListAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_url_list.php + * + * @param DeleteUrlListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteUrlList(DeleteUrlListRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteUrlList', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AuthorizationPolicy. + * + * The async variant is {@see NetworkSecurityClient::getAuthorizationPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/get_authorization_policy.php + * + * @param GetAuthorizationPolicyRequest $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 AuthorizationPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuthorizationPolicy(GetAuthorizationPolicyRequest $request, array $callOptions = []): AuthorizationPolicy + { + return $this->startApiCall('GetAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AuthzPolicy. + * + * The async variant is {@see NetworkSecurityClient::getAuthzPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_authz_policy.php + * + * @param GetAuthzPolicyRequest $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 AuthzPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuthzPolicy(GetAuthzPolicyRequest $request, array $callOptions = []): AuthzPolicy + { + return $this->startApiCall('GetAuthzPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single BackendAuthenticationConfig to + * BackendAuthenticationConfig. + * + * The async variant is + * {@see NetworkSecurityClient::getBackendAuthenticationConfigAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_backend_authentication_config.php + * + * @param GetBackendAuthenticationConfigRequest $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 BackendAuthenticationConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackendAuthenticationConfig(GetBackendAuthenticationConfigRequest $request, array $callOptions = []): BackendAuthenticationConfig + { + return $this->startApiCall('GetBackendAuthenticationConfig', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::getClientTlsPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_client_tls_policy.php + * + * @param GetClientTlsPolicyRequest $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 ClientTlsPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getClientTlsPolicy(GetClientTlsPolicyRequest $request, array $callOptions = []): ClientTlsPolicy + { + return $this->startApiCall('GetClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single GatewaySecurityPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::getGatewaySecurityPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_gateway_security_policy.php + * + * @param GetGatewaySecurityPolicyRequest $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 GatewaySecurityPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGatewaySecurityPolicy(GetGatewaySecurityPolicyRequest $request, array $callOptions = []): GatewaySecurityPolicy + { + return $this->startApiCall('GetGatewaySecurityPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single GatewaySecurityPolicyRule. + * + * The async variant is + * {@see NetworkSecurityClient::getGatewaySecurityPolicyRuleAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php + * + * @param GetGatewaySecurityPolicyRuleRequest $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 GatewaySecurityPolicyRule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGatewaySecurityPolicyRule(GetGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): GatewaySecurityPolicyRule + { + return $this->startApiCall('GetGatewaySecurityPolicyRule', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::getServerTlsPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_server_tls_policy.php + * + * @param GetServerTlsPolicyRequest $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 ServerTlsPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getServerTlsPolicy(GetServerTlsPolicyRequest $request, array $callOptions = []): ServerTlsPolicy + { + return $this->startApiCall('GetServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single TlsInspectionPolicy. + * + * The async variant is {@see NetworkSecurityClient::getTlsInspectionPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php + * + * @param GetTlsInspectionPolicyRequest $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 TlsInspectionPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTlsInspectionPolicy(GetTlsInspectionPolicyRequest $request, array $callOptions = []): TlsInspectionPolicy + { + return $this->startApiCall('GetTlsInspectionPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single UrlList. + * + * The async variant is {@see NetworkSecurityClient::getUrlListAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_url_list.php + * + * @param GetUrlListRequest $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 UrlList + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUrlList(GetUrlListRequest $request, array $callOptions = []): UrlList + { + return $this->startApiCall('GetUrlList', $request, $callOptions)->wait(); + } + + /** + * Lists AuthorizationPolicies in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listAuthorizationPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_authorization_policies.php + * + * @param ListAuthorizationPoliciesRequest $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 listAuthorizationPolicies(ListAuthorizationPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuthorizationPolicies', $request, $callOptions); + } + + /** + * Lists AuthzPolicies in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listAuthzPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_authz_policies.php + * + * @param ListAuthzPoliciesRequest $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 listAuthzPolicies(ListAuthzPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuthzPolicies', $request, $callOptions); + } + + /** + * Lists BackendAuthenticationConfigs in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listBackendAuthenticationConfigsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php + * + * @param ListBackendAuthenticationConfigsRequest $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 listBackendAuthenticationConfigs(ListBackendAuthenticationConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackendAuthenticationConfigs', $request, $callOptions); + } + + /** + * Lists ClientTlsPolicies in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listClientTlsPoliciesAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/list_client_tls_policies.php + * + * @param ListClientTlsPoliciesRequest $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 listClientTlsPolicies(ListClientTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClientTlsPolicies', $request, $callOptions); + } + + /** + * Lists GatewaySecurityPolicies in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listGatewaySecurityPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_gateway_security_policies.php + * + * @param ListGatewaySecurityPoliciesRequest $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 listGatewaySecurityPolicies(ListGatewaySecurityPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGatewaySecurityPolicies', $request, $callOptions); + } + + /** + * Lists GatewaySecurityPolicyRules in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listGatewaySecurityPolicyRulesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php + * + * @param ListGatewaySecurityPolicyRulesRequest $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 listGatewaySecurityPolicyRules(ListGatewaySecurityPolicyRulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGatewaySecurityPolicyRules', $request, $callOptions); + } + + /** + * Lists ServerTlsPolicies in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listServerTlsPoliciesAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/list_server_tls_policies.php + * + * @param ListServerTlsPoliciesRequest $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 listServerTlsPolicies(ListServerTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListServerTlsPolicies', $request, $callOptions); + } + + /** + * Lists TlsInspectionPolicies in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listTlsInspectionPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php + * + * @param ListTlsInspectionPoliciesRequest $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 listTlsInspectionPolicies(ListTlsInspectionPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTlsInspectionPolicies', $request, $callOptions); + } + + /** + * Lists UrlLists in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listUrlListsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_url_lists.php + * + * @param ListUrlListsRequest $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 listUrlLists(ListUrlListsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUrlLists', $request, $callOptions); + } + + /** + * Updates the parameters of a single AuthorizationPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::updateAuthorizationPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_authorization_policy.php + * + * @param UpdateAuthorizationPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAuthorizationPolicy(UpdateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single AuthzPolicy. + * + * The async variant is {@see NetworkSecurityClient::updateAuthzPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_authz_policy.php + * + * @param UpdateAuthzPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAuthzPolicy(UpdateAuthzPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAuthzPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single BackendAuthenticationConfig to + * BackendAuthenticationConfig. + * + * The async variant is + * {@see NetworkSecurityClient::updateBackendAuthenticationConfigAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_backend_authentication_config.php + * + * @param UpdateBackendAuthenticationConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackendAuthenticationConfig(UpdateBackendAuthenticationConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBackendAuthenticationConfig', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::updateClientTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/update_client_tls_policy.php + * + * @param UpdateClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateClientTlsPolicy(UpdateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single GatewaySecurityPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::updateGatewaySecurityPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_gateway_security_policy.php + * + * @param UpdateGatewaySecurityPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGatewaySecurityPolicy(UpdateGatewaySecurityPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGatewaySecurityPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single GatewaySecurityPolicyRule. + * + * The async variant is + * {@see NetworkSecurityClient::updateGatewaySecurityPolicyRuleAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php + * + * @param UpdateGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGatewaySecurityPolicyRule(UpdateGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGatewaySecurityPolicyRule', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::updateServerTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/update_server_tls_policy.php + * + * @param UpdateServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateServerTlsPolicy(UpdateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single TlsInspectionPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::updateTlsInspectionPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php + * + * @param UpdateTlsInspectionPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTlsInspectionPolicy(UpdateTlsInspectionPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTlsInspectionPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single UrlList. + * + * The async variant is {@see NetworkSecurityClient::updateUrlListAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_url_list.php + * + * @param UpdateUrlListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUrlList(UpdateUrlListRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateUrlList', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NetworkSecurityClient::getLocationAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see NetworkSecurityClient::listLocationsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see NetworkSecurityClient::getIamPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see NetworkSecurityClient::setIamPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see NetworkSecurityClient::testIamPermissionsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php new file mode 100644 index 000000000000..e61621593875 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php @@ -0,0 +1,797 @@ + addAddressGroupItemsAsync(AddAddressGroupItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface cloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAddressGroupAsync(CreateAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAddressGroupAsync(DeleteAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAddressGroupAsync(GetAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAddressGroupReferencesAsync(ListAddressGroupReferencesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAddressGroupsAsync(ListAddressGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeAddressGroupItemsAsync(RemoveAddressGroupItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAddressGroupAsync(UpdateAddressGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class OrganizationAddressGroupServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.OrganizationAddressGroupService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/organization_address_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/organization_address_group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/organization_address_group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/organization_address_group_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * address_group resource. + * + * @param string $project + * @param string $location + * @param string $addressGroup + * + * @return string The formatted address_group resource. + */ + public static function addressGroupName(string $project, string $location, string $addressGroup): string + { + return self::getPathTemplate('addressGroup')->render([ + 'project' => $project, + 'location' => $location, + 'address_group' => $addressGroup, + ]); + } + + /** + * 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_address_group resource. + * + * @param string $organization + * @param string $location + * @param string $addressGroup + * + * @return string The formatted organization_location_address_group resource. + */ + public static function organizationLocationAddressGroupName(string $organization, string $location, string $addressGroup): string + { + return self::getPathTemplate('organizationLocationAddressGroup')->render([ + 'organization' => $organization, + 'location' => $location, + 'address_group' => $addressGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_address_group resource. + * + * @param string $project + * @param string $location + * @param string $addressGroup + * + * @return string The formatted project_location_address_group resource. + */ + public static function projectLocationAddressGroupName(string $project, string $location, string $addressGroup): string + { + return self::getPathTemplate('projectLocationAddressGroup')->render([ + 'project' => $project, + 'location' => $location, + 'address_group' => $addressGroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - addressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} + * - location: projects/{project}/locations/{location} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationAddressGroup: organizations/{organization}/locations/{location}/addressGroups/{address_group} + * - projectLocationAddressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\NetworkSecurity\V1\OrganizationAddressGroupServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new OrganizationAddressGroupServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds items to an address group. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::addAddressGroupItemsAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php + * + * @param AddAddressGroupItemsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function addAddressGroupItems(AddAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AddAddressGroupItems', $request, $callOptions)->wait(); + } + + /** + * Clones items from one address group to another. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::cloneAddressGroupItemsAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php + * + * @param CloneAddressGroupItemsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cloneAddressGroupItems(CloneAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CloneAddressGroupItems', $request, $callOptions)->wait(); + } + + /** + * Creates a new address group in a given project and location. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::createAddressGroupAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php + * + * @param CreateAddressGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAddressGroup(CreateAddressGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes an address group. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::deleteAddressGroupAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php + * + * @param DeleteAddressGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAddressGroup(DeleteAddressGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single address group. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::getAddressGroupAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php + * + * @param GetAddressGroupRequest $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 AddressGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAddressGroup(GetAddressGroupRequest $request, array $callOptions = []): AddressGroup + { + return $this->startApiCall('GetAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Lists references of an address group. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::listAddressGroupReferencesAsync()} + * . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php + * + * @param ListAddressGroupReferencesRequest $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 listAddressGroupReferences(ListAddressGroupReferencesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAddressGroupReferences', $request, $callOptions); + } + + /** + * Lists address groups in a given project and location. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::listAddressGroupsAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php + * + * @param ListAddressGroupsRequest $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 listAddressGroups(ListAddressGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAddressGroups', $request, $callOptions); + } + + /** + * Removes items from an address group. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::removeAddressGroupItemsAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php + * + * @param RemoveAddressGroupItemsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeAddressGroupItems(RemoveAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RemoveAddressGroupItems', $request, $callOptions)->wait(); + } + + /** + * Updates parameters of an address group. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::updateAddressGroupAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php + * + * @param UpdateAddressGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAddressGroup(UpdateAddressGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAddressGroup', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::getLocationAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::listLocationsAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is + * {@see OrganizationAddressGroupServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php new file mode 100644 index 000000000000..d7bd28424722 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php @@ -0,0 +1,937 @@ + createSecurityProfileAsync(CreateSecurityProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSecurityProfileGroupAsync(CreateSecurityProfileGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSecurityProfileAsync(DeleteSecurityProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSecurityProfileGroupAsync(DeleteSecurityProfileGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSecurityProfileAsync(GetSecurityProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSecurityProfileGroupAsync(GetSecurityProfileGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSecurityProfileGroupsAsync(ListSecurityProfileGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSecurityProfilesAsync(ListSecurityProfilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSecurityProfileAsync(UpdateSecurityProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSecurityProfileGroupAsync(UpdateSecurityProfileGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class OrganizationSecurityProfileGroupServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/organization_security_profile_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/organization_security_profile_group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/organization_security_profile_group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/organization_security_profile_group_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * intercept_endpoint_group resource. + * + * @param string $project + * @param string $location + * @param string $interceptEndpointGroup + * + * @return string The formatted intercept_endpoint_group resource. + */ + public static function interceptEndpointGroupName(string $project, string $location, string $interceptEndpointGroup): string + { + return self::getPathTemplate('interceptEndpointGroup')->render([ + 'project' => $project, + 'location' => $location, + 'intercept_endpoint_group' => $interceptEndpointGroup, + ]); + } + + /** + * 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 + * mirroring_endpoint_group resource. + * + * @param string $project + * @param string $location + * @param string $mirroringEndpointGroup + * + * @return string The formatted mirroring_endpoint_group resource. + */ + public static function mirroringEndpointGroupName(string $project, string $location, string $mirroringEndpointGroup): string + { + return self::getPathTemplate('mirroringEndpointGroup')->render([ + 'project' => $project, + 'location' => $location, + 'mirroring_endpoint_group' => $mirroringEndpointGroup, + ]); + } + + /** + * 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_security_profile resource. + * + * @param string $organization + * @param string $location + * @param string $securityProfile + * + * @return string The formatted organization_location_security_profile resource. + */ + public static function organizationLocationSecurityProfileName(string $organization, string $location, string $securityProfile): string + { + return self::getPathTemplate('organizationLocationSecurityProfile')->render([ + 'organization' => $organization, + 'location' => $location, + 'security_profile' => $securityProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_security_profile_group resource. + * + * @param string $organization + * @param string $location + * @param string $securityProfileGroup + * + * @return string The formatted organization_location_security_profile_group resource. + */ + public static function organizationLocationSecurityProfileGroupName(string $organization, string $location, string $securityProfileGroup): string + { + return self::getPathTemplate('organizationLocationSecurityProfileGroup')->render([ + 'organization' => $organization, + 'location' => $location, + 'security_profile_group' => $securityProfileGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_security_profile resource. + * + * @param string $project + * @param string $location + * @param string $securityProfile + * + * @return string The formatted project_location_security_profile resource. + */ + public static function projectLocationSecurityProfileName(string $project, string $location, string $securityProfile): string + { + return self::getPathTemplate('projectLocationSecurityProfile')->render([ + 'project' => $project, + 'location' => $location, + 'security_profile' => $securityProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_security_profile_group resource. + * + * @param string $project + * @param string $location + * @param string $securityProfileGroup + * + * @return string The formatted project_location_security_profile_group resource. + */ + public static function projectLocationSecurityProfileGroupName(string $project, string $location, string $securityProfileGroup): string + { + return self::getPathTemplate('projectLocationSecurityProfileGroup')->render([ + 'project' => $project, + 'location' => $location, + 'security_profile_group' => $securityProfileGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_profile resource. + * + * @param string $organization + * @param string $location + * @param string $securityProfile + * + * @return string The formatted security_profile resource. + */ + public static function securityProfileName(string $organization, string $location, string $securityProfile): string + { + return self::getPathTemplate('securityProfile')->render([ + 'organization' => $organization, + 'location' => $location, + 'security_profile' => $securityProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_profile_group resource. + * + * @param string $organization + * @param string $location + * @param string $securityProfileGroup + * + * @return string The formatted security_profile_group resource. + */ + public static function securityProfileGroupName(string $organization, string $location, string $securityProfileGroup): string + { + return self::getPathTemplate('securityProfileGroup')->render([ + 'organization' => $organization, + 'location' => $location, + 'security_profile_group' => $securityProfileGroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - interceptEndpointGroup: projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group} + * - location: projects/{project}/locations/{location} + * - mirroringEndpointGroup: projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationSecurityProfile: organizations/{organization}/locations/{location}/securityProfiles/{security_profile} + * - organizationLocationSecurityProfileGroup: organizations/{organization}/locations/{location}/securityProfileGroups/{security_profile_group} + * - projectLocationSecurityProfile: projects/{project}/locations/{location}/securityProfiles/{security_profile} + * - projectLocationSecurityProfileGroup: projects/{project}/locations/{location}/securityProfileGroups/{security_profile_group} + * - securityProfile: organizations/{organization}/locations/{location}/securityProfiles/{security_profile} + * - securityProfileGroup: organizations/{organization}/locations/{location}/securityProfileGroups/{security_profile_group} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use + * Google\Cloud\NetworkSecurity\V1\OrganizationSecurityProfileGroupServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new OrganizationSecurityProfileGroupServiceClient(['credentials' => + * $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new SecurityProfile in a given organization and location. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::createSecurityProfileAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php + * + * @param CreateSecurityProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSecurityProfile(CreateSecurityProfileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSecurityProfile', $request, $callOptions)->wait(); + } + + /** + * Creates a new SecurityProfileGroup in a given organization and location. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::createSecurityProfileGroupAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php + * + * @param CreateSecurityProfileGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSecurityProfileGroup(CreateSecurityProfileGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSecurityProfileGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes a single SecurityProfile. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::deleteSecurityProfileAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php + * + * @param DeleteSecurityProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSecurityProfile(DeleteSecurityProfileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSecurityProfile', $request, $callOptions)->wait(); + } + + /** + * Deletes a single SecurityProfileGroup. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::deleteSecurityProfileGroupAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php + * + * @param DeleteSecurityProfileGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSecurityProfileGroup(DeleteSecurityProfileGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSecurityProfileGroup', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single SecurityProfile. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::getSecurityProfileAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php + * + * @param GetSecurityProfileRequest $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 SecurityProfile + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSecurityProfile(GetSecurityProfileRequest $request, array $callOptions = []): SecurityProfile + { + return $this->startApiCall('GetSecurityProfile', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single SecurityProfileGroup. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::getSecurityProfileGroupAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php + * + * @param GetSecurityProfileGroupRequest $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 SecurityProfileGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSecurityProfileGroup(GetSecurityProfileGroupRequest $request, array $callOptions = []): SecurityProfileGroup + { + return $this->startApiCall('GetSecurityProfileGroup', $request, $callOptions)->wait(); + } + + /** + * Lists SecurityProfileGroups in a given organization and location. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::listSecurityProfileGroupsAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php + * + * @param ListSecurityProfileGroupsRequest $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 listSecurityProfileGroups(ListSecurityProfileGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSecurityProfileGroups', $request, $callOptions); + } + + /** + * Lists SecurityProfiles in a given organization and location. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::listSecurityProfilesAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php + * + * @param ListSecurityProfilesRequest $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 listSecurityProfiles(ListSecurityProfilesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSecurityProfiles', $request, $callOptions); + } + + /** + * Updates the parameters of a single SecurityProfile. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::updateSecurityProfileAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php + * + * @param UpdateSecurityProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSecurityProfile(UpdateSecurityProfileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSecurityProfile', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single SecurityProfileGroup. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::updateSecurityProfileGroupAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php + * + * @param UpdateSecurityProfileGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSecurityProfileGroup(UpdateSecurityProfileGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSecurityProfileGroup', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::getLocationAsync()} . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::listLocationsAsync()} . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $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 Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is + * {@see OrganizationSecurityProfileGroupServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..17634b27cc60 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json @@ -0,0 +1,921 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.networksecurity.v1", + "libraryPackage": "Google\\Cloud\\NetworkSecurity\\V1", + "services": { + "AddressGroupService": { + "clients": { + "grpc": { + "libraryClient": "AddressGroupServiceGapicClient", + "rpcs": { + "AddAddressGroupItems": { + "methods": [ + "addAddressGroupItems" + ] + }, + "CloneAddressGroupItems": { + "methods": [ + "cloneAddressGroupItems" + ] + }, + "CreateAddressGroup": { + "methods": [ + "createAddressGroup" + ] + }, + "DeleteAddressGroup": { + "methods": [ + "deleteAddressGroup" + ] + }, + "GetAddressGroup": { + "methods": [ + "getAddressGroup" + ] + }, + "ListAddressGroupReferences": { + "methods": [ + "listAddressGroupReferences" + ] + }, + "ListAddressGroups": { + "methods": [ + "listAddressGroups" + ] + }, + "RemoveAddressGroupItems": { + "methods": [ + "removeAddressGroupItems" + ] + }, + "UpdateAddressGroup": { + "methods": [ + "updateAddressGroup" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "OrganizationAddressGroupService": { + "clients": { + "grpc": { + "libraryClient": "OrganizationAddressGroupServiceGapicClient", + "rpcs": { + "AddAddressGroupItems": { + "methods": [ + "addAddressGroupItems" + ] + }, + "CloneAddressGroupItems": { + "methods": [ + "cloneAddressGroupItems" + ] + }, + "CreateAddressGroup": { + "methods": [ + "createAddressGroup" + ] + }, + "DeleteAddressGroup": { + "methods": [ + "deleteAddressGroup" + ] + }, + "GetAddressGroup": { + "methods": [ + "getAddressGroup" + ] + }, + "ListAddressGroupReferences": { + "methods": [ + "listAddressGroupReferences" + ] + }, + "ListAddressGroups": { + "methods": [ + "listAddressGroups" + ] + }, + "RemoveAddressGroupItems": { + "methods": [ + "removeAddressGroupItems" + ] + }, + "UpdateAddressGroup": { + "methods": [ + "updateAddressGroup" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "DnsThreatDetectorService": { + "clients": { + "grpc": { + "libraryClient": "DnsThreatDetectorServiceGapicClient", + "rpcs": { + "CreateDnsThreatDetector": { + "methods": [ + "createDnsThreatDetector" + ] + }, + "DeleteDnsThreatDetector": { + "methods": [ + "deleteDnsThreatDetector" + ] + }, + "GetDnsThreatDetector": { + "methods": [ + "getDnsThreatDetector" + ] + }, + "ListDnsThreatDetectors": { + "methods": [ + "listDnsThreatDetectors" + ] + }, + "UpdateDnsThreatDetector": { + "methods": [ + "updateDnsThreatDetector" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "FirewallActivation": { + "clients": { + "grpc": { + "libraryClient": "FirewallActivationGapicClient", + "rpcs": { + "CreateFirewallEndpoint": { + "methods": [ + "createFirewallEndpoint" + ] + }, + "CreateFirewallEndpointAssociation": { + "methods": [ + "createFirewallEndpointAssociation" + ] + }, + "DeleteFirewallEndpoint": { + "methods": [ + "deleteFirewallEndpoint" + ] + }, + "DeleteFirewallEndpointAssociation": { + "methods": [ + "deleteFirewallEndpointAssociation" + ] + }, + "GetFirewallEndpoint": { + "methods": [ + "getFirewallEndpoint" + ] + }, + "GetFirewallEndpointAssociation": { + "methods": [ + "getFirewallEndpointAssociation" + ] + }, + "ListFirewallEndpointAssociations": { + "methods": [ + "listFirewallEndpointAssociations" + ] + }, + "ListFirewallEndpoints": { + "methods": [ + "listFirewallEndpoints" + ] + }, + "UpdateFirewallEndpoint": { + "methods": [ + "updateFirewallEndpoint" + ] + }, + "UpdateFirewallEndpointAssociation": { + "methods": [ + "updateFirewallEndpointAssociation" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "Intercept": { + "clients": { + "grpc": { + "libraryClient": "InterceptGapicClient", + "rpcs": { + "CreateInterceptDeployment": { + "methods": [ + "createInterceptDeployment" + ] + }, + "CreateInterceptDeploymentGroup": { + "methods": [ + "createInterceptDeploymentGroup" + ] + }, + "CreateInterceptEndpointGroup": { + "methods": [ + "createInterceptEndpointGroup" + ] + }, + "CreateInterceptEndpointGroupAssociation": { + "methods": [ + "createInterceptEndpointGroupAssociation" + ] + }, + "DeleteInterceptDeployment": { + "methods": [ + "deleteInterceptDeployment" + ] + }, + "DeleteInterceptDeploymentGroup": { + "methods": [ + "deleteInterceptDeploymentGroup" + ] + }, + "DeleteInterceptEndpointGroup": { + "methods": [ + "deleteInterceptEndpointGroup" + ] + }, + "DeleteInterceptEndpointGroupAssociation": { + "methods": [ + "deleteInterceptEndpointGroupAssociation" + ] + }, + "GetInterceptDeployment": { + "methods": [ + "getInterceptDeployment" + ] + }, + "GetInterceptDeploymentGroup": { + "methods": [ + "getInterceptDeploymentGroup" + ] + }, + "GetInterceptEndpointGroup": { + "methods": [ + "getInterceptEndpointGroup" + ] + }, + "GetInterceptEndpointGroupAssociation": { + "methods": [ + "getInterceptEndpointGroupAssociation" + ] + }, + "ListInterceptDeploymentGroups": { + "methods": [ + "listInterceptDeploymentGroups" + ] + }, + "ListInterceptDeployments": { + "methods": [ + "listInterceptDeployments" + ] + }, + "ListInterceptEndpointGroupAssociations": { + "methods": [ + "listInterceptEndpointGroupAssociations" + ] + }, + "ListInterceptEndpointGroups": { + "methods": [ + "listInterceptEndpointGroups" + ] + }, + "UpdateInterceptDeployment": { + "methods": [ + "updateInterceptDeployment" + ] + }, + "UpdateInterceptDeploymentGroup": { + "methods": [ + "updateInterceptDeploymentGroup" + ] + }, + "UpdateInterceptEndpointGroup": { + "methods": [ + "updateInterceptEndpointGroup" + ] + }, + "UpdateInterceptEndpointGroupAssociation": { + "methods": [ + "updateInterceptEndpointGroupAssociation" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "Mirroring": { + "clients": { + "grpc": { + "libraryClient": "MirroringGapicClient", + "rpcs": { + "CreateMirroringDeployment": { + "methods": [ + "createMirroringDeployment" + ] + }, + "CreateMirroringDeploymentGroup": { + "methods": [ + "createMirroringDeploymentGroup" + ] + }, + "CreateMirroringEndpointGroup": { + "methods": [ + "createMirroringEndpointGroup" + ] + }, + "CreateMirroringEndpointGroupAssociation": { + "methods": [ + "createMirroringEndpointGroupAssociation" + ] + }, + "DeleteMirroringDeployment": { + "methods": [ + "deleteMirroringDeployment" + ] + }, + "DeleteMirroringDeploymentGroup": { + "methods": [ + "deleteMirroringDeploymentGroup" + ] + }, + "DeleteMirroringEndpointGroup": { + "methods": [ + "deleteMirroringEndpointGroup" + ] + }, + "DeleteMirroringEndpointGroupAssociation": { + "methods": [ + "deleteMirroringEndpointGroupAssociation" + ] + }, + "GetMirroringDeployment": { + "methods": [ + "getMirroringDeployment" + ] + }, + "GetMirroringDeploymentGroup": { + "methods": [ + "getMirroringDeploymentGroup" + ] + }, + "GetMirroringEndpointGroup": { + "methods": [ + "getMirroringEndpointGroup" + ] + }, + "GetMirroringEndpointGroupAssociation": { + "methods": [ + "getMirroringEndpointGroupAssociation" + ] + }, + "ListMirroringDeploymentGroups": { + "methods": [ + "listMirroringDeploymentGroups" + ] + }, + "ListMirroringDeployments": { + "methods": [ + "listMirroringDeployments" + ] + }, + "ListMirroringEndpointGroupAssociations": { + "methods": [ + "listMirroringEndpointGroupAssociations" + ] + }, + "ListMirroringEndpointGroups": { + "methods": [ + "listMirroringEndpointGroups" + ] + }, + "UpdateMirroringDeployment": { + "methods": [ + "updateMirroringDeployment" + ] + }, + "UpdateMirroringDeploymentGroup": { + "methods": [ + "updateMirroringDeploymentGroup" + ] + }, + "UpdateMirroringEndpointGroup": { + "methods": [ + "updateMirroringEndpointGroup" + ] + }, + "UpdateMirroringEndpointGroupAssociation": { + "methods": [ + "updateMirroringEndpointGroupAssociation" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "NetworkSecurity": { + "clients": { + "grpc": { + "libraryClient": "NetworkSecurityGapicClient", + "rpcs": { + "CreateAuthorizationPolicy": { + "methods": [ + "createAuthorizationPolicy" + ] + }, + "CreateAuthzPolicy": { + "methods": [ + "createAuthzPolicy" + ] + }, + "CreateBackendAuthenticationConfig": { + "methods": [ + "createBackendAuthenticationConfig" + ] + }, + "CreateClientTlsPolicy": { + "methods": [ + "createClientTlsPolicy" + ] + }, + "CreateGatewaySecurityPolicy": { + "methods": [ + "createGatewaySecurityPolicy" + ] + }, + "CreateGatewaySecurityPolicyRule": { + "methods": [ + "createGatewaySecurityPolicyRule" + ] + }, + "CreateServerTlsPolicy": { + "methods": [ + "createServerTlsPolicy" + ] + }, + "CreateTlsInspectionPolicy": { + "methods": [ + "createTlsInspectionPolicy" + ] + }, + "CreateUrlList": { + "methods": [ + "createUrlList" + ] + }, + "DeleteAuthorizationPolicy": { + "methods": [ + "deleteAuthorizationPolicy" + ] + }, + "DeleteAuthzPolicy": { + "methods": [ + "deleteAuthzPolicy" + ] + }, + "DeleteBackendAuthenticationConfig": { + "methods": [ + "deleteBackendAuthenticationConfig" + ] + }, + "DeleteClientTlsPolicy": { + "methods": [ + "deleteClientTlsPolicy" + ] + }, + "DeleteGatewaySecurityPolicy": { + "methods": [ + "deleteGatewaySecurityPolicy" + ] + }, + "DeleteGatewaySecurityPolicyRule": { + "methods": [ + "deleteGatewaySecurityPolicyRule" + ] + }, + "DeleteServerTlsPolicy": { + "methods": [ + "deleteServerTlsPolicy" + ] + }, + "DeleteTlsInspectionPolicy": { + "methods": [ + "deleteTlsInspectionPolicy" + ] + }, + "DeleteUrlList": { + "methods": [ + "deleteUrlList" + ] + }, + "GetAuthorizationPolicy": { + "methods": [ + "getAuthorizationPolicy" + ] + }, + "GetAuthzPolicy": { + "methods": [ + "getAuthzPolicy" + ] + }, + "GetBackendAuthenticationConfig": { + "methods": [ + "getBackendAuthenticationConfig" + ] + }, + "GetClientTlsPolicy": { + "methods": [ + "getClientTlsPolicy" + ] + }, + "GetGatewaySecurityPolicy": { + "methods": [ + "getGatewaySecurityPolicy" + ] + }, + "GetGatewaySecurityPolicyRule": { + "methods": [ + "getGatewaySecurityPolicyRule" + ] + }, + "GetServerTlsPolicy": { + "methods": [ + "getServerTlsPolicy" + ] + }, + "GetTlsInspectionPolicy": { + "methods": [ + "getTlsInspectionPolicy" + ] + }, + "GetUrlList": { + "methods": [ + "getUrlList" + ] + }, + "ListAuthorizationPolicies": { + "methods": [ + "listAuthorizationPolicies" + ] + }, + "ListAuthzPolicies": { + "methods": [ + "listAuthzPolicies" + ] + }, + "ListBackendAuthenticationConfigs": { + "methods": [ + "listBackendAuthenticationConfigs" + ] + }, + "ListClientTlsPolicies": { + "methods": [ + "listClientTlsPolicies" + ] + }, + "ListGatewaySecurityPolicies": { + "methods": [ + "listGatewaySecurityPolicies" + ] + }, + "ListGatewaySecurityPolicyRules": { + "methods": [ + "listGatewaySecurityPolicyRules" + ] + }, + "ListServerTlsPolicies": { + "methods": [ + "listServerTlsPolicies" + ] + }, + "ListTlsInspectionPolicies": { + "methods": [ + "listTlsInspectionPolicies" + ] + }, + "ListUrlLists": { + "methods": [ + "listUrlLists" + ] + }, + "UpdateAuthorizationPolicy": { + "methods": [ + "updateAuthorizationPolicy" + ] + }, + "UpdateAuthzPolicy": { + "methods": [ + "updateAuthzPolicy" + ] + }, + "UpdateBackendAuthenticationConfig": { + "methods": [ + "updateBackendAuthenticationConfig" + ] + }, + "UpdateClientTlsPolicy": { + "methods": [ + "updateClientTlsPolicy" + ] + }, + "UpdateGatewaySecurityPolicy": { + "methods": [ + "updateGatewaySecurityPolicy" + ] + }, + "UpdateGatewaySecurityPolicyRule": { + "methods": [ + "updateGatewaySecurityPolicyRule" + ] + }, + "UpdateServerTlsPolicy": { + "methods": [ + "updateServerTlsPolicy" + ] + }, + "UpdateTlsInspectionPolicy": { + "methods": [ + "updateTlsInspectionPolicy" + ] + }, + "UpdateUrlList": { + "methods": [ + "updateUrlList" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "OrganizationSecurityProfileGroupService": { + "clients": { + "grpc": { + "libraryClient": "OrganizationSecurityProfileGroupServiceGapicClient", + "rpcs": { + "CreateSecurityProfile": { + "methods": [ + "createSecurityProfile" + ] + }, + "CreateSecurityProfileGroup": { + "methods": [ + "createSecurityProfileGroup" + ] + }, + "DeleteSecurityProfile": { + "methods": [ + "deleteSecurityProfile" + ] + }, + "DeleteSecurityProfileGroup": { + "methods": [ + "deleteSecurityProfileGroup" + ] + }, + "GetSecurityProfile": { + "methods": [ + "getSecurityProfile" + ] + }, + "GetSecurityProfileGroup": { + "methods": [ + "getSecurityProfileGroup" + ] + }, + "ListSecurityProfileGroups": { + "methods": [ + "listSecurityProfileGroups" + ] + }, + "ListSecurityProfiles": { + "methods": [ + "listSecurityProfiles" + ] + }, + "UpdateSecurityProfile": { + "methods": [ + "updateSecurityProfile" + ] + }, + "UpdateSecurityProfileGroup": { + "methods": [ + "updateSecurityProfileGroup" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json new file mode 100644 index 000000000000..844d42f4b5db --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json @@ -0,0 +1,92 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.AddressGroupService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "AddAddressGroupItems": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CloneAddressGroupItems": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAddressGroupReferences": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAddressGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RemoveAddressGroupItems": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php new file mode 100644 index 000000000000..9b39d53c5bac --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php @@ -0,0 +1,275 @@ + [ + 'google.cloud.networksecurity.v1.AddressGroupService' => [ + 'AddAddressGroupItems' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CloneAddressGroupItems' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CreateAddressGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAddressGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveAddressGroupItems' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'UpdateAddressGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group.name', + 'fieldAccessors' => [ + 'getAddressGroup', + 'getName', + ], + ], + ], + ], + 'GetAddressGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAddressGroupReferences' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAddressGroupReferences', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse', + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'ListAddressGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAddressGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupsResponse', + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'addressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationAddressGroup' => 'organizations/{organization}/locations/{location}/addressGroups/{address_group}', + 'projectLocationAddressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php new file mode 100644 index 000000000000..34e343d4d2cb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php @@ -0,0 +1,358 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.AddressGroupService' => [ + 'AddAddressGroupItems' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:addItems', + 'body' => '*', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CloneAddressGroupItems' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:cloneItems', + 'body' => '*', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CreateAddressGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/addressGroups', + 'body' => 'address_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'address_group_id', + ], + ], + 'DeleteAddressGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/addressGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAddressGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/addressGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAddressGroupReferences' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:listReferences', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'ListAddressGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/addressGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveAddressGroupItems' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:removeItems', + 'body' => '*', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'UpdateAddressGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{address_group.name=projects/*/locations/*/addressGroups/*}', + 'body' => 'address_group', + 'placeholders' => [ + 'address_group.name' => [ + 'getters' => [ + 'getAddressGroup', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_client_config.json new file mode 100644 index 000000000000..7c9d1d6e6593 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_client_config.json @@ -0,0 +1,72 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.DnsThreatDetectorService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "CreateDnsThreatDetector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDnsThreatDetector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDnsThreatDetector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDnsThreatDetectors": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDnsThreatDetector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_descriptor_config.php new file mode 100644 index 000000000000..d08b7d1f407b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_descriptor_config.php @@ -0,0 +1,175 @@ + [ + 'google.cloud.networksecurity.v1.DnsThreatDetectorService' => [ + 'CreateDnsThreatDetector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\DnsThreatDetector', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDnsThreatDetector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsThreatDetector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\DnsThreatDetector', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDnsThreatDetectors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDnsThreatDetectors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListDnsThreatDetectorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDnsThreatDetector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\DnsThreatDetector', + 'headerParams' => [ + [ + 'keyName' => 'dns_threat_detector.name', + 'fieldAccessors' => [ + 'getDnsThreatDetector', + 'getName', + ], + ], + ], + ], + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'dnsThreatDetector' => 'projects/{project}/locations/{location}/dnsThreatDetectors/{dns_threat_detector}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_rest_client_config.php new file mode 100644 index 000000000000..519f9f361903 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_rest_client_config.php @@ -0,0 +1,308 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.DnsThreatDetectorService' => [ + 'CreateDnsThreatDetector' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dnsThreatDetectors', + 'body' => 'dns_threat_detector', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDnsThreatDetector' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsThreatDetectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsThreatDetector' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsThreatDetectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDnsThreatDetectors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dnsThreatDetectors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDnsThreatDetector' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{dns_threat_detector.name=projects/*/locations/*/dnsThreatDetectors/*}', + 'body' => 'dns_threat_detector', + 'placeholders' => [ + 'dns_threat_detector.name' => [ + 'getters' => [ + 'getDnsThreatDetector', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_client_config.json new file mode 100644 index 000000000000..b8cf4aa877af --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_client_config.json @@ -0,0 +1,97 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.FirewallActivation": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "CreateFirewallEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateFirewallEndpointAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteFirewallEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteFirewallEndpointAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetFirewallEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetFirewallEndpointAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFirewallEndpointAssociations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFirewallEndpoints": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateFirewallEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateFirewallEndpointAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_descriptor_config.php new file mode 100644 index 000000000000..334dd296abe0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_descriptor_config.php @@ -0,0 +1,291 @@ + [ + 'google.cloud.networksecurity.v1.FirewallActivation' => [ + 'CreateFirewallEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\FirewallEndpoint', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateFirewallEndpointAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFirewallEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteFirewallEndpointAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateFirewallEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\FirewallEndpoint', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'firewall_endpoint.name', + 'fieldAccessors' => [ + 'getFirewallEndpoint', + 'getName', + ], + ], + ], + ], + 'UpdateFirewallEndpointAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'firewall_endpoint_association.name', + 'fieldAccessors' => [ + 'getFirewallEndpointAssociation', + 'getName', + ], + ], + ], + ], + 'GetFirewallEndpoint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\FirewallEndpoint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetFirewallEndpointAssociation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\FirewallEndpointAssociation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListFirewallEndpointAssociations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFirewallEndpointAssociations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListFirewallEndpointAssociationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListFirewallEndpoints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFirewallEndpoints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListFirewallEndpointsResponse', + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'firewallEndpoint' => 'organizations/{organization}/locations/{location}/firewallEndpoints/{firewall_endpoint}', + 'firewallEndpointAssociation' => 'projects/{project}/locations/{location}/firewallEndpointAssociations/{firewall_endpoint_association}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationFirewallEndpoint' => 'organizations/{organization}/locations/{location}/firewallEndpoints/{firewall_endpoint}', + 'projectLocationFirewallEndpoint' => 'projects/{project}/locations/{location}/firewallEndpoints/{firewall_endpoint}', + 'tlsInspectionPolicy' => 'projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_rest_client_config.php new file mode 100644 index 000000000000..9d2202b96533 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_rest_client_config.php @@ -0,0 +1,375 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.FirewallActivation' => [ + 'CreateFirewallEndpoint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/firewallEndpoints', + 'body' => 'firewall_endpoint', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'firewall_endpoint_id', + ], + ], + 'CreateFirewallEndpointAssociation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/firewallEndpointAssociations', + 'body' => 'firewall_endpoint_association', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFirewallEndpoint' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/firewallEndpoints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteFirewallEndpointAssociation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/firewallEndpointAssociations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFirewallEndpoint' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/firewallEndpoints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFirewallEndpointAssociation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/firewallEndpointAssociations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListFirewallEndpointAssociations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/firewallEndpointAssociations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFirewallEndpoints' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/firewallEndpoints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateFirewallEndpoint' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{firewall_endpoint.name=organizations/*/locations/*/firewallEndpoints/*}', + 'body' => 'firewall_endpoint', + 'placeholders' => [ + 'firewall_endpoint.name' => [ + 'getters' => [ + 'getFirewallEndpoint', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateFirewallEndpointAssociation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{firewall_endpoint_association.name=projects/*/locations/*/firewallEndpointAssociations/*}', + 'body' => 'firewall_endpoint_association', + 'placeholders' => [ + 'firewall_endpoint_association.name' => [ + 'getters' => [ + 'getFirewallEndpointAssociation', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_client_config.json new file mode 100644 index 000000000000..c77d0c8dab72 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_client_config.json @@ -0,0 +1,147 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.Intercept": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "CreateInterceptDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateInterceptDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateInterceptEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateInterceptEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInterceptDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInterceptDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInterceptEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInterceptEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInterceptDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInterceptDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInterceptEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInterceptEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInterceptDeploymentGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInterceptDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInterceptEndpointGroupAssociations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInterceptEndpointGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateInterceptDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateInterceptDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateInterceptEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateInterceptEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_descriptor_config.php new file mode 100644 index 000000000000..e0687a52ff58 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_descriptor_config.php @@ -0,0 +1,470 @@ + [ + 'google.cloud.networksecurity.v1.Intercept' => [ + 'CreateInterceptDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptDeployment', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInterceptDeploymentGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInterceptEndpointGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInterceptEndpointGroupAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteInterceptDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInterceptDeploymentGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInterceptEndpointGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInterceptEndpointGroupAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInterceptDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptDeployment', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'intercept_deployment.name', + 'fieldAccessors' => [ + 'getInterceptDeployment', + 'getName', + ], + ], + ], + ], + 'UpdateInterceptDeploymentGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'intercept_deployment_group.name', + 'fieldAccessors' => [ + 'getInterceptDeploymentGroup', + 'getName', + ], + ], + ], + ], + 'UpdateInterceptEndpointGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'intercept_endpoint_group.name', + 'fieldAccessors' => [ + 'getInterceptEndpointGroup', + 'getName', + ], + ], + ], + ], + 'UpdateInterceptEndpointGroupAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'intercept_endpoint_group_association.name', + 'fieldAccessors' => [ + 'getInterceptEndpointGroupAssociation', + 'getName', + ], + ], + ], + ], + 'GetInterceptDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\InterceptDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInterceptDeploymentGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInterceptEndpointGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInterceptEndpointGroupAssociation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInterceptDeploymentGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInterceptDeploymentGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInterceptDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInterceptDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInterceptEndpointGroupAssociations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInterceptEndpointGroupAssociations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupAssociationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInterceptEndpointGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInterceptEndpointGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupsResponse', + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'forwardingRule' => 'projects/{project}/global/forwardingRules/{forwarding_rule}', + 'interceptDeployment' => 'projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}', + 'interceptDeploymentGroup' => 'projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}', + 'interceptEndpointGroup' => 'projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}', + 'interceptEndpointGroupAssociation' => 'projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_rest_client_config.php new file mode 100644 index 000000000000..9938b45c8a4b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_rest_client_config.php @@ -0,0 +1,491 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.Intercept' => [ + 'CreateInterceptDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptDeployments', + 'body' => 'intercept_deployment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'intercept_deployment_id', + ], + ], + 'CreateInterceptDeploymentGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptDeploymentGroups', + 'body' => 'intercept_deployment_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'intercept_deployment_group_id', + ], + ], + 'CreateInterceptEndpointGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptEndpointGroups', + 'body' => 'intercept_endpoint_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'intercept_endpoint_group_id', + ], + ], + 'CreateInterceptEndpointGroupAssociation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptEndpointGroupAssociations', + 'body' => 'intercept_endpoint_group_association', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteInterceptDeployment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInterceptDeploymentGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptDeploymentGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInterceptEndpointGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptEndpointGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInterceptEndpointGroupAssociation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptEndpointGroupAssociations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInterceptDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInterceptDeploymentGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptDeploymentGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInterceptEndpointGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptEndpointGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInterceptEndpointGroupAssociation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/interceptEndpointGroupAssociations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInterceptDeploymentGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptDeploymentGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInterceptDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptDeployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInterceptEndpointGroupAssociations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptEndpointGroupAssociations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInterceptEndpointGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/interceptEndpointGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateInterceptDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{intercept_deployment.name=projects/*/locations/*/interceptDeployments/*}', + 'body' => 'intercept_deployment', + 'placeholders' => [ + 'intercept_deployment.name' => [ + 'getters' => [ + 'getInterceptDeployment', + 'getName', + ], + ], + ], + ], + 'UpdateInterceptDeploymentGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{intercept_deployment_group.name=projects/*/locations/*/interceptDeploymentGroups/*}', + 'body' => 'intercept_deployment_group', + 'placeholders' => [ + 'intercept_deployment_group.name' => [ + 'getters' => [ + 'getInterceptDeploymentGroup', + 'getName', + ], + ], + ], + ], + 'UpdateInterceptEndpointGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{intercept_endpoint_group.name=projects/*/locations/*/interceptEndpointGroups/*}', + 'body' => 'intercept_endpoint_group', + 'placeholders' => [ + 'intercept_endpoint_group.name' => [ + 'getters' => [ + 'getInterceptEndpointGroup', + 'getName', + ], + ], + ], + ], + 'UpdateInterceptEndpointGroupAssociation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{intercept_endpoint_group_association.name=projects/*/locations/*/interceptEndpointGroupAssociations/*}', + 'body' => 'intercept_endpoint_group_association', + 'placeholders' => [ + 'intercept_endpoint_group_association.name' => [ + 'getters' => [ + 'getInterceptEndpointGroupAssociation', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_client_config.json new file mode 100644 index 000000000000..4f38e3af40fb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_client_config.json @@ -0,0 +1,147 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.Mirroring": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "CreateMirroringDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateMirroringDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateMirroringEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateMirroringEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteMirroringDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteMirroringDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteMirroringEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteMirroringEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetMirroringDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetMirroringDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetMirroringEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetMirroringEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMirroringDeploymentGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMirroringDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMirroringEndpointGroupAssociations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMirroringEndpointGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateMirroringDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateMirroringDeploymentGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateMirroringEndpointGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateMirroringEndpointGroupAssociation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_descriptor_config.php new file mode 100644 index 000000000000..2d85be4c6461 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_descriptor_config.php @@ -0,0 +1,470 @@ + [ + 'google.cloud.networksecurity.v1.Mirroring' => [ + 'CreateMirroringDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringDeployment', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMirroringDeploymentGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMirroringEndpointGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMirroringEndpointGroupAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteMirroringDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMirroringDeploymentGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMirroringEndpointGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMirroringEndpointGroupAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateMirroringDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringDeployment', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'mirroring_deployment.name', + 'fieldAccessors' => [ + 'getMirroringDeployment', + 'getName', + ], + ], + ], + ], + 'UpdateMirroringDeploymentGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'mirroring_deployment_group.name', + 'fieldAccessors' => [ + 'getMirroringDeploymentGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMirroringEndpointGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'mirroring_endpoint_group.name', + 'fieldAccessors' => [ + 'getMirroringEndpointGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMirroringEndpointGroupAssociation' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'mirroring_endpoint_group_association.name', + 'fieldAccessors' => [ + 'getMirroringEndpointGroupAssociation', + 'getName', + ], + ], + ], + ], + 'GetMirroringDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\MirroringDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMirroringDeploymentGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMirroringEndpointGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMirroringEndpointGroupAssociation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMirroringDeploymentGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMirroringDeploymentGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListMirroringDeploymentGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMirroringDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMirroringDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListMirroringDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMirroringEndpointGroupAssociations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMirroringEndpointGroupAssociations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListMirroringEndpointGroupAssociationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMirroringEndpointGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMirroringEndpointGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListMirroringEndpointGroupsResponse', + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'forwardingRule' => 'projects/{project}/global/forwardingRules/{forwarding_rule}', + 'location' => 'projects/{project}/locations/{location}', + 'mirroringDeployment' => 'projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}', + 'mirroringDeploymentGroup' => 'projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group}', + 'mirroringEndpointGroup' => 'projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}', + 'mirroringEndpointGroupAssociation' => 'projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association}', + 'network' => 'projects/{project}/global/networks/{network}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_rest_client_config.php new file mode 100644 index 000000000000..ed98851ee68b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_rest_client_config.php @@ -0,0 +1,491 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.Mirroring' => [ + 'CreateMirroringDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringDeployments', + 'body' => 'mirroring_deployment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'mirroring_deployment_id', + ], + ], + 'CreateMirroringDeploymentGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringDeploymentGroups', + 'body' => 'mirroring_deployment_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'mirroring_deployment_group_id', + ], + ], + 'CreateMirroringEndpointGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringEndpointGroups', + 'body' => 'mirroring_endpoint_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'mirroring_endpoint_group_id', + ], + ], + 'CreateMirroringEndpointGroupAssociation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringEndpointGroupAssociations', + 'body' => 'mirroring_endpoint_group_association', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteMirroringDeployment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMirroringDeploymentGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringDeploymentGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMirroringEndpointGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringEndpointGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMirroringEndpointGroupAssociation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringEndpointGroupAssociations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMirroringDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMirroringDeploymentGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringDeploymentGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMirroringEndpointGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringEndpointGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMirroringEndpointGroupAssociation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/mirroringEndpointGroupAssociations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMirroringDeploymentGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringDeploymentGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMirroringDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringDeployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMirroringEndpointGroupAssociations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringEndpointGroupAssociations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMirroringEndpointGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/mirroringEndpointGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateMirroringDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mirroring_deployment.name=projects/*/locations/*/mirroringDeployments/*}', + 'body' => 'mirroring_deployment', + 'placeholders' => [ + 'mirroring_deployment.name' => [ + 'getters' => [ + 'getMirroringDeployment', + 'getName', + ], + ], + ], + ], + 'UpdateMirroringDeploymentGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mirroring_deployment_group.name=projects/*/locations/*/mirroringDeploymentGroups/*}', + 'body' => 'mirroring_deployment_group', + 'placeholders' => [ + 'mirroring_deployment_group.name' => [ + 'getters' => [ + 'getMirroringDeploymentGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMirroringEndpointGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mirroring_endpoint_group.name=projects/*/locations/*/mirroringEndpointGroups/*}', + 'body' => 'mirroring_endpoint_group', + 'placeholders' => [ + 'mirroring_endpoint_group.name' => [ + 'getters' => [ + 'getMirroringEndpointGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMirroringEndpointGroupAssociation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mirroring_endpoint_group_association.name=projects/*/locations/*/mirroringEndpointGroupAssociations/*}', + 'body' => 'mirroring_endpoint_group_association', + 'placeholders' => [ + 'mirroring_endpoint_group_association.name' => [ + 'getters' => [ + 'getMirroringEndpointGroupAssociation', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json new file mode 100644 index 000000000000..69d95d98d336 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json @@ -0,0 +1,282 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.NetworkSecurity": { + "retry_codes": { + "no_retry_codes": [], + "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 + }, + "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": { + "CreateAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListAuthorizationPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListAuthzPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListBackendAuthenticationConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListClientTlsPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListGatewaySecurityPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListGatewaySecurityPolicyRules": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListServerTlsPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListTlsInspectionPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListUrlLists": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php new file mode 100644 index 000000000000..64c90a58a14c --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php @@ -0,0 +1,926 @@ + [ + 'google.cloud.networksecurity.v1.NetworkSecurity' => [ + 'CreateAuthorizationPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAuthzPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthzPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackendAuthenticationConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateClientTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGatewaySecurityPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGatewaySecurityPolicyRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateServerTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTlsInspectionPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUrlList' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\UrlList', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAuthorizationPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAuthzPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackendAuthenticationConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteClientTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGatewaySecurityPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGatewaySecurityPolicyRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServerTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTlsInspectionPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUrlList' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAuthorizationPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'authorization_policy.name', + 'fieldAccessors' => [ + 'getAuthorizationPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateAuthzPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthzPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'authz_policy.name', + 'fieldAccessors' => [ + 'getAuthzPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateBackendAuthenticationConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backend_authentication_config.name', + 'fieldAccessors' => [ + 'getBackendAuthenticationConfig', + 'getName', + ], + ], + ], + ], + 'UpdateClientTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'client_tls_policy.name', + 'fieldAccessors' => [ + 'getClientTlsPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGatewaySecurityPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'gateway_security_policy.name', + 'fieldAccessors' => [ + 'getGatewaySecurityPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGatewaySecurityPolicyRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'gateway_security_policy_rule.name', + 'fieldAccessors' => [ + 'getGatewaySecurityPolicyRule', + 'getName', + ], + ], + ], + ], + 'UpdateServerTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'server_tls_policy.name', + 'fieldAccessors' => [ + 'getServerTlsPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateTlsInspectionPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'tls_inspection_policy.name', + 'fieldAccessors' => [ + 'getTlsInspectionPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateUrlList' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\UrlList', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'url_list.name', + 'fieldAccessors' => [ + 'getUrlList', + 'getName', + ], + ], + ], + ], + 'GetAuthorizationPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAuthzPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthzPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackendAuthenticationConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetClientTlsPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGatewaySecurityPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGatewaySecurityPolicyRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetServerTlsPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTlsInspectionPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUrlList' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\UrlList', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAuthorizationPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuthorizationPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAuthzPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuthzPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAuthzPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackendAuthenticationConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackendAuthenticationConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListBackendAuthenticationConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListClientTlsPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClientTlsPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGatewaySecurityPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGatewaySecurityPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGatewaySecurityPolicyRules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGatewaySecurityPolicyRules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPolicyRulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListServerTlsPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getServerTlsPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTlsInspectionPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTlsInspectionPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListTlsInspectionPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUrlLists' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUrlLists', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListUrlListsResponse', + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'authorizationPolicy' => 'projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}', + 'authzPolicy' => 'projects/{project}/locations/{location}/authzPolicies/{authz_policy}', + 'backendAuthenticationConfig' => 'projects/{project}/locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}', + 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', + 'certificate' => 'projects/{project}/locations/{location}/certificates/{certificate}', + 'clientTlsPolicy' => 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}', + 'gatewaySecurityPolicy' => 'projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}', + 'gatewaySecurityPolicyRule' => 'projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}', + 'location' => 'projects/{project}/locations/{location}', + 'serverTlsPolicy' => 'projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}', + 'tlsInspectionPolicy' => 'projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}', + 'trustConfig' => 'projects/{project}/locations/{location}/trustConfigs/{trust_config}', + 'urlList' => 'projects/{project}/locations/{location}/urlLists/{url_list}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php new file mode 100644 index 000000000000..36f7a0b2ef40 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php @@ -0,0 +1,799 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.NetworkSecurity' => [ + 'CreateAuthorizationPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', + 'body' => 'authorization_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'authorization_policy_id', + ], + ], + 'CreateAuthzPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authzPolicies', + 'body' => 'authz_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'authz_policy_id', + ], + ], + 'CreateBackendAuthenticationConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs', + 'body' => 'backend_authentication_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backend_authentication_config_id', + ], + ], + 'CreateClientTlsPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', + 'body' => 'client_tls_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'client_tls_policy_id', + ], + ], + 'CreateGatewaySecurityPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies', + 'body' => 'gateway_security_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'gateway_security_policy_id', + ], + ], + 'CreateGatewaySecurityPolicyRule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules', + 'body' => 'gateway_security_policy_rule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateServerTlsPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', + 'body' => 'server_tls_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'server_tls_policy_id', + ], + ], + 'CreateTlsInspectionPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies', + 'body' => 'tls_inspection_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tls_inspection_policy_id', + ], + ], + 'CreateUrlList' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/urlLists', + 'body' => 'url_list', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'url_list_id', + ], + ], + 'DeleteAuthorizationPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAuthzPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authzPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackendAuthenticationConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteClientTlsPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGatewaySecurityPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGatewaySecurityPolicyRule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServerTlsPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTlsInspectionPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUrlList' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/urlLists/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAuthorizationPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAuthzPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authzPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackendAuthenticationConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetClientTlsPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGatewaySecurityPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGatewaySecurityPolicyRule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetServerTlsPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTlsInspectionPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUrlList' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/urlLists/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAuthorizationPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAuthzPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authzPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackendAuthenticationConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListClientTlsPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGatewaySecurityPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGatewaySecurityPolicyRules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListServerTlsPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTlsInspectionPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUrlLists' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/urlLists', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAuthorizationPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}', + 'body' => 'authorization_policy', + 'placeholders' => [ + 'authorization_policy.name' => [ + 'getters' => [ + 'getAuthorizationPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateAuthzPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{authz_policy.name=projects/*/locations/*/authzPolicies/*}', + 'body' => 'authz_policy', + 'placeholders' => [ + 'authz_policy.name' => [ + 'getters' => [ + 'getAuthzPolicy', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackendAuthenticationConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backend_authentication_config.name=projects/*/locations/*/backendAuthenticationConfigs/*}', + 'body' => 'backend_authentication_config', + 'placeholders' => [ + 'backend_authentication_config.name' => [ + 'getters' => [ + 'getBackendAuthenticationConfig', + 'getName', + ], + ], + ], + ], + 'UpdateClientTlsPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}', + 'body' => 'client_tls_policy', + 'placeholders' => [ + 'client_tls_policy.name' => [ + 'getters' => [ + 'getClientTlsPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGatewaySecurityPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{gateway_security_policy.name=projects/*/locations/*/gatewaySecurityPolicies/*}', + 'body' => 'gateway_security_policy', + 'placeholders' => [ + 'gateway_security_policy.name' => [ + 'getters' => [ + 'getGatewaySecurityPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGatewaySecurityPolicyRule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{gateway_security_policy_rule.name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', + 'body' => 'gateway_security_policy_rule', + 'placeholders' => [ + 'gateway_security_policy_rule.name' => [ + 'getters' => [ + 'getGatewaySecurityPolicyRule', + 'getName', + ], + ], + ], + ], + 'UpdateServerTlsPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}', + 'body' => 'server_tls_policy', + 'placeholders' => [ + 'server_tls_policy.name' => [ + 'getters' => [ + 'getServerTlsPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateTlsInspectionPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tls_inspection_policy.name=projects/*/locations/*/tlsInspectionPolicies/*}', + 'body' => 'tls_inspection_policy', + 'placeholders' => [ + 'tls_inspection_policy.name' => [ + 'getters' => [ + 'getTlsInspectionPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateUrlList' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{url_list.name=projects/*/locations/*/urlLists/*}', + 'body' => 'url_list', + 'placeholders' => [ + 'url_list.name' => [ + 'getters' => [ + 'getUrlList', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json new file mode 100644 index 000000000000..092d7cf36101 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json @@ -0,0 +1,92 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.OrganizationAddressGroupService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "AddAddressGroupItems": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CloneAddressGroupItems": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAddressGroupReferences": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAddressGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RemoveAddressGroupItems": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateAddressGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php new file mode 100644 index 000000000000..e1513495ea6d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php @@ -0,0 +1,275 @@ + [ + 'google.cloud.networksecurity.v1.OrganizationAddressGroupService' => [ + 'AddAddressGroupItems' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CloneAddressGroupItems' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CreateAddressGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAddressGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveAddressGroupItems' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'UpdateAddressGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'address_group.name', + 'fieldAccessors' => [ + 'getAddressGroup', + 'getName', + ], + ], + ], + ], + 'GetAddressGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AddressGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAddressGroupReferences' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAddressGroupReferences', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse', + 'headerParams' => [ + [ + 'keyName' => 'address_group', + 'fieldAccessors' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'ListAddressGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAddressGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupsResponse', + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'addressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationAddressGroup' => 'organizations/{organization}/locations/{location}/addressGroups/{address_group}', + 'projectLocationAddressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php new file mode 100644 index 000000000000..5500e9739c7e --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php @@ -0,0 +1,358 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.OrganizationAddressGroupService' => [ + 'AddAddressGroupItems' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:addItems', + 'body' => '*', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CloneAddressGroupItems' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:cloneItems', + 'body' => '*', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'CreateAddressGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/addressGroups', + 'body' => 'address_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'address_group_id', + ], + ], + 'DeleteAddressGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/addressGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAddressGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/addressGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAddressGroupReferences' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:listReferences', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'ListAddressGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/addressGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveAddressGroupItems' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:removeItems', + 'body' => '*', + 'placeholders' => [ + 'address_group' => [ + 'getters' => [ + 'getAddressGroup', + ], + ], + ], + ], + 'UpdateAddressGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{address_group.name=organizations/*/locations/*/addressGroups/*}', + 'body' => 'address_group', + 'placeholders' => [ + 'address_group.name' => [ + 'getters' => [ + 'getAddressGroup', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_client_config.json new file mode 100644 index 000000000000..85280d375ec5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_client_config.json @@ -0,0 +1,97 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "CreateSecurityProfile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateSecurityProfileGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSecurityProfile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSecurityProfileGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSecurityProfile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSecurityProfileGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSecurityProfileGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSecurityProfiles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSecurityProfile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSecurityProfileGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_descriptor_config.php new file mode 100644 index 000000000000..d2d622ee794f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_descriptor_config.php @@ -0,0 +1,293 @@ + [ + 'google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService' => [ + 'CreateSecurityProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\SecurityProfile', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSecurityProfileGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSecurityProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSecurityProfileGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSecurityProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\SecurityProfile', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'security_profile.name', + 'fieldAccessors' => [ + 'getSecurityProfile', + 'getName', + ], + ], + ], + ], + 'UpdateSecurityProfileGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'security_profile_group.name', + 'fieldAccessors' => [ + 'getSecurityProfileGroup', + 'getName', + ], + ], + ], + ], + 'GetSecurityProfile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\SecurityProfile', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSecurityProfileGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\SecurityProfileGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSecurityProfileGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSecurityProfileGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListSecurityProfileGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSecurityProfiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSecurityProfiles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListSecurityProfilesResponse', + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'interceptEndpointGroup' => 'projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}', + 'location' => 'projects/{project}/locations/{location}', + 'mirroringEndpointGroup' => 'projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationSecurityProfile' => 'organizations/{organization}/locations/{location}/securityProfiles/{security_profile}', + 'organizationLocationSecurityProfileGroup' => 'organizations/{organization}/locations/{location}/securityProfileGroups/{security_profile_group}', + 'projectLocationSecurityProfile' => 'projects/{project}/locations/{location}/securityProfiles/{security_profile}', + 'projectLocationSecurityProfileGroup' => 'projects/{project}/locations/{location}/securityProfileGroups/{security_profile_group}', + 'securityProfile' => 'organizations/{organization}/locations/{location}/securityProfiles/{security_profile}', + 'securityProfileGroup' => 'organizations/{organization}/locations/{location}/securityProfileGroups/{security_profile_group}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_rest_client_config.php new file mode 100644 index 000000000000..5064d17d535a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_rest_client_config.php @@ -0,0 +1,378 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService' => [ + 'CreateSecurityProfile' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityProfiles', + 'body' => 'security_profile', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'security_profile_id', + ], + ], + 'CreateSecurityProfileGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityProfileGroups', + 'body' => 'security_profile_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'security_profile_group_id', + ], + ], + 'DeleteSecurityProfile' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityProfiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSecurityProfileGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityProfileGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSecurityProfile' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityProfiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSecurityProfileGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/securityProfileGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSecurityProfileGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityProfileGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSecurityProfiles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/securityProfiles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSecurityProfile' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_profile.name=organizations/*/locations/*/securityProfiles/*}', + 'body' => 'security_profile', + 'placeholders' => [ + 'security_profile.name' => [ + 'getters' => [ + 'getSecurityProfile', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSecurityProfileGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_profile_group.name=organizations/*/locations/*/securityProfileGroups/*}', + 'body' => 'security_profile_group', + 'placeholders' => [ + 'security_profile_group.name' => [ + 'getters' => [ + 'getSecurityProfileGroup', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php new file mode 100644 index 000000000000..525ac6278695 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php @@ -0,0 +1,1528 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AddressGroupServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AddressGroupServiceClient($options); + } + + /** @test */ + public function addAddressGroupItemsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new AddAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->addAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/AddAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getItems(); + $this->assertProtobufEquals($items, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function addAddressGroupItemsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new AddAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->addAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cloneAddressGroupItemsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cloneAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new CloneAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setSourceAddressGroup($formattedSourceAddressGroup); + $response = $gapicClient->cloneAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/CloneAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getSourceAddressGroup(); + $this->assertProtobufEquals($formattedSourceAddressGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cloneAddressGroupItemsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new CloneAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setSourceAddressGroup($formattedSourceAddressGroup); + $response = $gapicClient->cloneAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAddressGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAddressGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $addressGroupId = 'addressGroupId-816169274'; + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new CreateAddressGroupRequest()) + ->setParent($formattedParent) + ->setAddressGroupId($addressGroupId) + ->setAddressGroup($addressGroup); + $response = $gapicClient->createAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/CreateAddressGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAddressGroupId(); + $this->assertProtobufEquals($addressGroupId, $actualValue); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($addressGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAddressGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $addressGroupId = 'addressGroupId-816169274'; + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new CreateAddressGroupRequest()) + ->setParent($formattedParent) + ->setAddressGroupId($addressGroupId) + ->setAddressGroup($addressGroup); + $response = $gapicClient->createAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAddressGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAddressGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new DeleteAddressGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/DeleteAddressGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAddressGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new DeleteAddressGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getAddressGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new GetAddressGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getAddressGroup($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.networksecurity.v1.AddressGroupService/GetAddressGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAddressGroupExceptionTest() + { + $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->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new GetAddressGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getAddressGroup($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 listAddressGroupReferencesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $addressGroupReferencesElement = new AddressGroupReference(); + $addressGroupReferences = [ + $addressGroupReferencesElement, + ]; + $expectedResponse = new ListAddressGroupReferencesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAddressGroupReferences($addressGroupReferences); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new ListAddressGroupReferencesRequest()) + ->setAddressGroup($formattedAddressGroup); + $response = $gapicClient->listAddressGroupReferences($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAddressGroupReferences()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/ListAddressGroupReferences', $actualFuncCall); + $actualValue = $actualRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAddressGroupReferencesExceptionTest() + { + $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 + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new ListAddressGroupReferencesRequest()) + ->setAddressGroup($formattedAddressGroup); + try { + $gapicClient->listAddressGroupReferences($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 listAddressGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $addressGroupsElement = new AddressGroup(); + $addressGroups = [ + $addressGroupsElement, + ]; + $expectedResponse = new ListAddressGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAddressGroups($addressGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAddressGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAddressGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAddressGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/ListAddressGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAddressGroupsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAddressGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAddressGroups($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 removeAddressGroupItemsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new RemoveAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->removeAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/RemoveAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getItems(); + $this->assertProtobufEquals($items, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeAddressGroupItemsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new RemoveAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->removeAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAddressGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAddressGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new UpdateAddressGroupRequest()) + ->setAddressGroup($addressGroup); + $response = $gapicClient->updateAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/UpdateAddressGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($addressGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAddressGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new UpdateAddressGroupRequest()) + ->setAddressGroup($addressGroup); + $response = $gapicClient->updateAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 addAddressGroupItemsAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new AddAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->addAddressGroupItemsAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/AddAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getItems(); + $this->assertProtobufEquals($items, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php new file mode 100644 index 000000000000..437684efab1a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php @@ -0,0 +1,782 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DnsThreatDetectorServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DnsThreatDetectorServiceClient($options); + } + + /** @test */ + public function createDnsThreatDetectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new DnsThreatDetector(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dnsThreatDetector = new DnsThreatDetector(); + $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; + $dnsThreatDetector->setProvider($dnsThreatDetectorProvider); + $request = (new CreateDnsThreatDetectorRequest()) + ->setParent($formattedParent) + ->setDnsThreatDetector($dnsThreatDetector); + $response = $gapicClient->createDnsThreatDetector($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.networksecurity.v1.DnsThreatDetectorService/CreateDnsThreatDetector', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDnsThreatDetector(); + $this->assertProtobufEquals($dnsThreatDetector, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDnsThreatDetectorExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $dnsThreatDetector = new DnsThreatDetector(); + $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; + $dnsThreatDetector->setProvider($dnsThreatDetectorProvider); + $request = (new CreateDnsThreatDetectorRequest()) + ->setParent($formattedParent) + ->setDnsThreatDetector($dnsThreatDetector); + try { + $gapicClient->createDnsThreatDetector($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 deleteDnsThreatDetectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); + $request = (new DeleteDnsThreatDetectorRequest()) + ->setName($formattedName); + $gapicClient->deleteDnsThreatDetector($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.DnsThreatDetectorService/DeleteDnsThreatDetector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDnsThreatDetectorExceptionTest() + { + $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->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); + $request = (new DeleteDnsThreatDetectorRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDnsThreatDetector($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 getDnsThreatDetectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new DnsThreatDetector(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); + $request = (new GetDnsThreatDetectorRequest()) + ->setName($formattedName); + $response = $gapicClient->getDnsThreatDetector($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.networksecurity.v1.DnsThreatDetectorService/GetDnsThreatDetector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDnsThreatDetectorExceptionTest() + { + $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->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); + $request = (new GetDnsThreatDetectorRequest()) + ->setName($formattedName); + try { + $gapicClient->getDnsThreatDetector($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 listDnsThreatDetectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dnsThreatDetectorsElement = new DnsThreatDetector(); + $dnsThreatDetectors = [ + $dnsThreatDetectorsElement, + ]; + $expectedResponse = new ListDnsThreatDetectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDnsThreatDetectors($dnsThreatDetectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDnsThreatDetectorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDnsThreatDetectors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDnsThreatDetectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.DnsThreatDetectorService/ListDnsThreatDetectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDnsThreatDetectorsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDnsThreatDetectorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDnsThreatDetectors($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 updateDnsThreatDetectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new DnsThreatDetector(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $dnsThreatDetector = new DnsThreatDetector(); + $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; + $dnsThreatDetector->setProvider($dnsThreatDetectorProvider); + $request = (new UpdateDnsThreatDetectorRequest()) + ->setDnsThreatDetector($dnsThreatDetector); + $response = $gapicClient->updateDnsThreatDetector($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.networksecurity.v1.DnsThreatDetectorService/UpdateDnsThreatDetector', $actualFuncCall); + $actualValue = $actualRequestObject->getDnsThreatDetector(); + $this->assertProtobufEquals($dnsThreatDetector, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDnsThreatDetectorExceptionTest() + { + $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 + $dnsThreatDetector = new DnsThreatDetector(); + $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; + $dnsThreatDetector->setProvider($dnsThreatDetectorProvider); + $request = (new UpdateDnsThreatDetectorRequest()) + ->setDnsThreatDetector($dnsThreatDetector); + try { + $gapicClient->updateDnsThreatDetector($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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 createDnsThreatDetectorAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new DnsThreatDetector(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dnsThreatDetector = new DnsThreatDetector(); + $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; + $dnsThreatDetector->setProvider($dnsThreatDetectorProvider); + $request = (new CreateDnsThreatDetectorRequest()) + ->setParent($formattedParent) + ->setDnsThreatDetector($dnsThreatDetector); + $response = $gapicClient->createDnsThreatDetectorAsync($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.networksecurity.v1.DnsThreatDetectorService/CreateDnsThreatDetector', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDnsThreatDetector(); + $this->assertProtobufEquals($dnsThreatDetector, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/FirewallActivationClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/FirewallActivationClientTest.php new file mode 100644 index 000000000000..da05962e45c9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/FirewallActivationClientTest.php @@ -0,0 +1,1615 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FirewallActivationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FirewallActivationClient($options); + } + + /** @test */ + public function createFirewallEndpointTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFirewallEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $reconciling = false; + $satisfiesPzs = false; + $satisfiesPzi = false; + $billingProjectId = 'billingProjectId1808796741'; + $expectedResponse = new FirewallEndpoint(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setBillingProjectId($billingProjectId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFirewallEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $firewallEndpointId = 'firewallEndpointId1750813510'; + $firewallEndpoint = new FirewallEndpoint(); + $request = (new CreateFirewallEndpointRequest()) + ->setParent($formattedParent) + ->setFirewallEndpointId($firewallEndpointId) + ->setFirewallEndpoint($firewallEndpoint); + $response = $gapicClient->createFirewallEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFirewallEndpointId(); + $this->assertProtobufEquals($firewallEndpointId, $actualValue); + $actualValue = $actualApiRequestObject->getFirewallEndpoint(); + $this->assertProtobufEquals($firewallEndpoint, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFirewallEndpointTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFirewallEndpointExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFirewallEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $firewallEndpointId = 'firewallEndpointId1750813510'; + $firewallEndpoint = new FirewallEndpoint(); + $request = (new CreateFirewallEndpointRequest()) + ->setParent($formattedParent) + ->setFirewallEndpointId($firewallEndpointId) + ->setFirewallEndpoint($firewallEndpoint); + $response = $gapicClient->createFirewallEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFirewallEndpointTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFirewallEndpointAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFirewallEndpointAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $firewallEndpoint = 'firewallEndpoint-560762380'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $reconciling = false; + $disabled = true; + $expectedResponse = new FirewallEndpointAssociation(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setFirewallEndpoint($firewallEndpoint); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDisabled($disabled); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFirewallEndpointAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $firewallEndpointAssociation = new FirewallEndpointAssociation(); + $firewallEndpointAssociationNetwork = 'firewallEndpointAssociationNetwork-207975934'; + $firewallEndpointAssociation->setNetwork($firewallEndpointAssociationNetwork); + $firewallEndpointAssociationFirewallEndpoint = 'firewallEndpointAssociationFirewallEndpoint306666849'; + $firewallEndpointAssociation->setFirewallEndpoint($firewallEndpointAssociationFirewallEndpoint); + $request = (new CreateFirewallEndpointAssociationRequest()) + ->setParent($formattedParent) + ->setFirewallEndpointAssociation($firewallEndpointAssociation); + $response = $gapicClient->createFirewallEndpointAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpointAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFirewallEndpointAssociation(); + $this->assertProtobufEquals($firewallEndpointAssociation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFirewallEndpointAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFirewallEndpointAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFirewallEndpointAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $firewallEndpointAssociation = new FirewallEndpointAssociation(); + $firewallEndpointAssociationNetwork = 'firewallEndpointAssociationNetwork-207975934'; + $firewallEndpointAssociation->setNetwork($firewallEndpointAssociationNetwork); + $firewallEndpointAssociationFirewallEndpoint = 'firewallEndpointAssociationFirewallEndpoint306666849'; + $firewallEndpointAssociation->setFirewallEndpoint($firewallEndpointAssociationFirewallEndpoint); + $request = (new CreateFirewallEndpointAssociationRequest()) + ->setParent($formattedParent) + ->setFirewallEndpointAssociation($firewallEndpointAssociation); + $response = $gapicClient->createFirewallEndpointAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFirewallEndpointAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFirewallEndpointTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFirewallEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFirewallEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); + $request = (new DeleteFirewallEndpointRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFirewallEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/DeleteFirewallEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFirewallEndpointTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFirewallEndpointExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFirewallEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); + $request = (new DeleteFirewallEndpointRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFirewallEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFirewallEndpointTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFirewallEndpointAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFirewallEndpointAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFirewallEndpointAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); + $request = (new DeleteFirewallEndpointAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFirewallEndpointAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/DeleteFirewallEndpointAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFirewallEndpointAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFirewallEndpointAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFirewallEndpointAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); + $request = (new DeleteFirewallEndpointAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFirewallEndpointAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFirewallEndpointAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getFirewallEndpointTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $reconciling = false; + $satisfiesPzs = false; + $satisfiesPzi = false; + $billingProjectId = 'billingProjectId1808796741'; + $expectedResponse = new FirewallEndpoint(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setBillingProjectId($billingProjectId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); + $request = (new GetFirewallEndpointRequest()) + ->setName($formattedName); + $response = $gapicClient->getFirewallEndpoint($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.networksecurity.v1.FirewallActivation/GetFirewallEndpoint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFirewallEndpointExceptionTest() + { + $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->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); + $request = (new GetFirewallEndpointRequest()) + ->setName($formattedName); + try { + $gapicClient->getFirewallEndpoint($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 getFirewallEndpointAssociationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $network = 'network1843485230'; + $firewallEndpoint = 'firewallEndpoint-560762380'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $reconciling = false; + $disabled = true; + $expectedResponse = new FirewallEndpointAssociation(); + $expectedResponse->setName($name2); + $expectedResponse->setNetwork($network); + $expectedResponse->setFirewallEndpoint($firewallEndpoint); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); + $request = (new GetFirewallEndpointAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->getFirewallEndpointAssociation($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.networksecurity.v1.FirewallActivation/GetFirewallEndpointAssociation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFirewallEndpointAssociationExceptionTest() + { + $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->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); + $request = (new GetFirewallEndpointAssociationRequest()) + ->setName($formattedName); + try { + $gapicClient->getFirewallEndpointAssociation($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 listFirewallEndpointAssociationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $firewallEndpointAssociationsElement = new FirewallEndpointAssociation(); + $firewallEndpointAssociations = [ + $firewallEndpointAssociationsElement, + ]; + $expectedResponse = new ListFirewallEndpointAssociationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFirewallEndpointAssociations($firewallEndpointAssociations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListFirewallEndpointAssociationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFirewallEndpointAssociations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFirewallEndpointAssociations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/ListFirewallEndpointAssociations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFirewallEndpointAssociationsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListFirewallEndpointAssociationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFirewallEndpointAssociations($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 listFirewallEndpointsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $firewallEndpointsElement = new FirewallEndpoint(); + $firewallEndpoints = [ + $firewallEndpointsElement, + ]; + $expectedResponse = new ListFirewallEndpointsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFirewallEndpoints($firewallEndpoints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListFirewallEndpointsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFirewallEndpoints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFirewallEndpoints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/ListFirewallEndpoints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFirewallEndpointsExceptionTest() + { + $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 ListFirewallEndpointsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFirewallEndpoints($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 updateFirewallEndpointTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFirewallEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $reconciling = false; + $satisfiesPzs = false; + $satisfiesPzi = false; + $billingProjectId = 'billingProjectId1808796741'; + $expectedResponse = new FirewallEndpoint(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setBillingProjectId($billingProjectId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFirewallEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $firewallEndpoint = new FirewallEndpoint(); + $request = (new UpdateFirewallEndpointRequest()) + ->setUpdateMask($updateMask) + ->setFirewallEndpoint($firewallEndpoint); + $response = $gapicClient->updateFirewallEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/UpdateFirewallEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getFirewallEndpoint(); + $this->assertProtobufEquals($firewallEndpoint, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFirewallEndpointTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFirewallEndpointExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFirewallEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $firewallEndpoint = new FirewallEndpoint(); + $request = (new UpdateFirewallEndpointRequest()) + ->setUpdateMask($updateMask) + ->setFirewallEndpoint($firewallEndpoint); + $response = $gapicClient->updateFirewallEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFirewallEndpointTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFirewallEndpointAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFirewallEndpointAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $firewallEndpoint = 'firewallEndpoint-560762380'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $reconciling = false; + $disabled = true; + $expectedResponse = new FirewallEndpointAssociation(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setFirewallEndpoint($firewallEndpoint); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDisabled($disabled); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFirewallEndpointAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $firewallEndpointAssociation = new FirewallEndpointAssociation(); + $firewallEndpointAssociationNetwork = 'firewallEndpointAssociationNetwork-207975934'; + $firewallEndpointAssociation->setNetwork($firewallEndpointAssociationNetwork); + $firewallEndpointAssociationFirewallEndpoint = 'firewallEndpointAssociationFirewallEndpoint306666849'; + $firewallEndpointAssociation->setFirewallEndpoint($firewallEndpointAssociationFirewallEndpoint); + $request = (new UpdateFirewallEndpointAssociationRequest()) + ->setUpdateMask($updateMask) + ->setFirewallEndpointAssociation($firewallEndpointAssociation); + $response = $gapicClient->updateFirewallEndpointAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/UpdateFirewallEndpointAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getFirewallEndpointAssociation(); + $this->assertProtobufEquals($firewallEndpointAssociation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFirewallEndpointAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFirewallEndpointAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFirewallEndpointAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $firewallEndpointAssociation = new FirewallEndpointAssociation(); + $firewallEndpointAssociationNetwork = 'firewallEndpointAssociationNetwork-207975934'; + $firewallEndpointAssociation->setNetwork($firewallEndpointAssociationNetwork); + $firewallEndpointAssociationFirewallEndpoint = 'firewallEndpointAssociationFirewallEndpoint306666849'; + $firewallEndpointAssociation->setFirewallEndpoint($firewallEndpointAssociationFirewallEndpoint); + $request = (new UpdateFirewallEndpointAssociationRequest()) + ->setUpdateMask($updateMask) + ->setFirewallEndpointAssociation($firewallEndpointAssociation); + $response = $gapicClient->updateFirewallEndpointAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFirewallEndpointAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 createFirewallEndpointAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFirewallEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $reconciling = false; + $satisfiesPzs = false; + $satisfiesPzi = false; + $billingProjectId = 'billingProjectId1808796741'; + $expectedResponse = new FirewallEndpoint(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setBillingProjectId($billingProjectId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFirewallEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $firewallEndpointId = 'firewallEndpointId1750813510'; + $firewallEndpoint = new FirewallEndpoint(); + $request = (new CreateFirewallEndpointRequest()) + ->setParent($formattedParent) + ->setFirewallEndpointId($firewallEndpointId) + ->setFirewallEndpoint($firewallEndpoint); + $response = $gapicClient->createFirewallEndpointAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFirewallEndpointId(); + $this->assertProtobufEquals($firewallEndpointId, $actualValue); + $actualValue = $actualApiRequestObject->getFirewallEndpoint(); + $this->assertProtobufEquals($firewallEndpoint, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFirewallEndpointTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/InterceptClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/InterceptClientTest.php new file mode 100644 index 000000000000..4dff956effe0 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/InterceptClientTest.php @@ -0,0 +1,2704 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return InterceptClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new InterceptClient($options); + } + + /** @test */ + public function createInterceptDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $forwardingRule = 'forwardingRule-1340648706'; + $interceptDeploymentGroup = 'interceptDeploymentGroup-1497970078'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setInterceptDeploymentGroup($interceptDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInterceptDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptDeploymentId = 'interceptDeploymentId-52528104'; + $interceptDeployment = new InterceptDeployment(); + $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); + $request = (new CreateInterceptDeploymentRequest()) + ->setParent($formattedParent) + ->setInterceptDeploymentId($interceptDeploymentId) + ->setInterceptDeployment($interceptDeployment); + $response = $gapicClient->createInterceptDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptDeploymentId(); + $this->assertProtobufEquals($interceptDeploymentId, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptDeployment(); + $this->assertProtobufEquals($interceptDeployment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInterceptDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptDeploymentId = 'interceptDeploymentId-52528104'; + $interceptDeployment = new InterceptDeployment(); + $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); + $request = (new CreateInterceptDeploymentRequest()) + ->setParent($formattedParent) + ->setInterceptDeploymentId($interceptDeploymentId) + ->setInterceptDeployment($interceptDeployment); + $response = $gapicClient->createInterceptDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInterceptDeploymentGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptDeploymentGroup(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInterceptDeploymentGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptDeploymentGroupId = 'interceptDeploymentGroupId-1316293608'; + $interceptDeploymentGroup = new InterceptDeploymentGroup(); + $interceptDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptDeploymentGroup->setNetwork($interceptDeploymentGroupNetwork); + $request = (new CreateInterceptDeploymentGroupRequest()) + ->setParent($formattedParent) + ->setInterceptDeploymentGroupId($interceptDeploymentGroupId) + ->setInterceptDeploymentGroup($interceptDeploymentGroup); + $response = $gapicClient->createInterceptDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptDeploymentGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptDeploymentGroupId(); + $this->assertProtobufEquals($interceptDeploymentGroupId, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptDeploymentGroup(); + $this->assertProtobufEquals($interceptDeploymentGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptDeploymentGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInterceptDeploymentGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptDeploymentGroupId = 'interceptDeploymentGroupId-1316293608'; + $interceptDeploymentGroup = new InterceptDeploymentGroup(); + $interceptDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptDeploymentGroup->setNetwork($interceptDeploymentGroupNetwork); + $request = (new CreateInterceptDeploymentGroupRequest()) + ->setParent($formattedParent) + ->setInterceptDeploymentGroupId($interceptDeploymentGroupId) + ->setInterceptDeploymentGroup($interceptDeploymentGroup); + $response = $gapicClient->createInterceptDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptDeploymentGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInterceptEndpointGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $interceptDeploymentGroup = 'interceptDeploymentGroup-1497970078'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptEndpointGroup(); + $expectedResponse->setName($name); + $expectedResponse->setInterceptDeploymentGroup($interceptDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInterceptEndpointGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptEndpointGroupId = 'interceptEndpointGroupId782835720'; + $interceptEndpointGroup = new InterceptEndpointGroup(); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); + $request = (new CreateInterceptEndpointGroupRequest()) + ->setParent($formattedParent) + ->setInterceptEndpointGroupId($interceptEndpointGroupId) + ->setInterceptEndpointGroup($interceptEndpointGroup); + $response = $gapicClient->createInterceptEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptEndpointGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptEndpointGroupId(); + $this->assertProtobufEquals($interceptEndpointGroupId, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptEndpointGroup(); + $this->assertProtobufEquals($interceptEndpointGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptEndpointGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInterceptEndpointGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptEndpointGroupId = 'interceptEndpointGroupId782835720'; + $interceptEndpointGroup = new InterceptEndpointGroup(); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); + $request = (new CreateInterceptEndpointGroupRequest()) + ->setParent($formattedParent) + ->setInterceptEndpointGroupId($interceptEndpointGroupId) + ->setInterceptEndpointGroup($interceptEndpointGroup); + $response = $gapicClient->createInterceptEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptEndpointGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInterceptEndpointGroupAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $interceptEndpointGroup = 'interceptEndpointGroup-42359694'; + $network = 'network1843485230'; + $reconciling = false; + $networkCookie = 2014610027; + $expectedResponse = new InterceptEndpointGroupAssociation(); + $expectedResponse->setName($name); + $expectedResponse->setInterceptEndpointGroup($interceptEndpointGroup); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setNetworkCookie($networkCookie); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInterceptEndpointGroupAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); + $request = (new CreateInterceptEndpointGroupAssociationRequest()) + ->setParent($formattedParent) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + $response = $gapicClient->createInterceptEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptEndpointGroupAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptEndpointGroupAssociation(); + $this->assertProtobufEquals($interceptEndpointGroupAssociation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptEndpointGroupAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInterceptEndpointGroupAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); + $request = (new CreateInterceptEndpointGroupAssociationRequest()) + ->setParent($formattedParent) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + $response = $gapicClient->createInterceptEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptEndpointGroupAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInterceptDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); + $request = (new DeleteInterceptDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/DeleteInterceptDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); + $request = (new DeleteInterceptDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptDeploymentGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInterceptDeploymentGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $request = (new DeleteInterceptDeploymentGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/DeleteInterceptDeploymentGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptDeploymentGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptDeploymentGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $request = (new DeleteInterceptDeploymentGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptDeploymentGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptEndpointGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInterceptEndpointGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $request = (new DeleteInterceptEndpointGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/DeleteInterceptEndpointGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptEndpointGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptEndpointGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $request = (new DeleteInterceptEndpointGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptEndpointGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptEndpointGroupAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInterceptEndpointGroupAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new DeleteInterceptEndpointGroupAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/DeleteInterceptEndpointGroupAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptEndpointGroupAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInterceptEndpointGroupAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInterceptEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new DeleteInterceptEndpointGroupAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInterceptEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInterceptEndpointGroupAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getInterceptDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $forwardingRule = 'forwardingRule-1340648706'; + $interceptDeploymentGroup = 'interceptDeploymentGroup-1497970078'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setInterceptDeploymentGroup($interceptDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); + $request = (new GetInterceptDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getInterceptDeployment($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.networksecurity.v1.Intercept/GetInterceptDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInterceptDeploymentExceptionTest() + { + $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->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); + $request = (new GetInterceptDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getInterceptDeployment($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 getInterceptDeploymentGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $network = 'network1843485230'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptDeploymentGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $request = (new GetInterceptDeploymentGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getInterceptDeploymentGroup($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.networksecurity.v1.Intercept/GetInterceptDeploymentGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInterceptDeploymentGroupExceptionTest() + { + $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->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $request = (new GetInterceptDeploymentGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getInterceptDeploymentGroup($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 getInterceptEndpointGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $interceptDeploymentGroup = 'interceptDeploymentGroup-1497970078'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptEndpointGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setInterceptDeploymentGroup($interceptDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $request = (new GetInterceptEndpointGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getInterceptEndpointGroup($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.networksecurity.v1.Intercept/GetInterceptEndpointGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInterceptEndpointGroupExceptionTest() + { + $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->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $request = (new GetInterceptEndpointGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getInterceptEndpointGroup($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 getInterceptEndpointGroupAssociationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $interceptEndpointGroup = 'interceptEndpointGroup-42359694'; + $network = 'network1843485230'; + $reconciling = false; + $networkCookie = 2014610027; + $expectedResponse = new InterceptEndpointGroupAssociation(); + $expectedResponse->setName($name2); + $expectedResponse->setInterceptEndpointGroup($interceptEndpointGroup); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setNetworkCookie($networkCookie); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new GetInterceptEndpointGroupAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->getInterceptEndpointGroupAssociation($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.networksecurity.v1.Intercept/GetInterceptEndpointGroupAssociation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInterceptEndpointGroupAssociationExceptionTest() + { + $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->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new GetInterceptEndpointGroupAssociationRequest()) + ->setName($formattedName); + try { + $gapicClient->getInterceptEndpointGroupAssociation($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 listInterceptDeploymentGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $interceptDeploymentGroupsElement = new InterceptDeploymentGroup(); + $interceptDeploymentGroups = [ + $interceptDeploymentGroupsElement, + ]; + $expectedResponse = new ListInterceptDeploymentGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInterceptDeploymentGroups($interceptDeploymentGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptDeploymentGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInterceptDeploymentGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInterceptDeploymentGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/ListInterceptDeploymentGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInterceptDeploymentGroupsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptDeploymentGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInterceptDeploymentGroups($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 listInterceptDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $interceptDeploymentsElement = new InterceptDeployment(); + $interceptDeployments = [ + $interceptDeploymentsElement, + ]; + $expectedResponse = new ListInterceptDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInterceptDeployments($interceptDeployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInterceptDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInterceptDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/ListInterceptDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInterceptDeploymentsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInterceptDeployments($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 listInterceptEndpointGroupAssociationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $interceptEndpointGroupAssociationsElement = new InterceptEndpointGroupAssociation(); + $interceptEndpointGroupAssociations = [ + $interceptEndpointGroupAssociationsElement, + ]; + $expectedResponse = new ListInterceptEndpointGroupAssociationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInterceptEndpointGroupAssociations($interceptEndpointGroupAssociations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptEndpointGroupAssociationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInterceptEndpointGroupAssociations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInterceptEndpointGroupAssociations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/ListInterceptEndpointGroupAssociations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInterceptEndpointGroupAssociationsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptEndpointGroupAssociationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInterceptEndpointGroupAssociations($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 listInterceptEndpointGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $interceptEndpointGroupsElement = new InterceptEndpointGroup(); + $interceptEndpointGroups = [ + $interceptEndpointGroupsElement, + ]; + $expectedResponse = new ListInterceptEndpointGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInterceptEndpointGroups($interceptEndpointGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptEndpointGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInterceptEndpointGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInterceptEndpointGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/ListInterceptEndpointGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInterceptEndpointGroupsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInterceptEndpointGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInterceptEndpointGroups($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 updateInterceptDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $forwardingRule = 'forwardingRule-1340648706'; + $interceptDeploymentGroup = 'interceptDeploymentGroup-1497970078'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setInterceptDeploymentGroup($interceptDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInterceptDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $interceptDeployment = new InterceptDeployment(); + $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); + $request = (new UpdateInterceptDeploymentRequest()) + ->setInterceptDeployment($interceptDeployment); + $response = $gapicClient->updateInterceptDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/UpdateInterceptDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInterceptDeployment(); + $this->assertProtobufEquals($interceptDeployment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInterceptDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $interceptDeployment = new InterceptDeployment(); + $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); + $request = (new UpdateInterceptDeploymentRequest()) + ->setInterceptDeployment($interceptDeployment); + $response = $gapicClient->updateInterceptDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInterceptDeploymentGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptDeploymentGroup(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInterceptDeploymentGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $interceptDeploymentGroup = new InterceptDeploymentGroup(); + $interceptDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptDeploymentGroup->setNetwork($interceptDeploymentGroupNetwork); + $request = (new UpdateInterceptDeploymentGroupRequest()) + ->setInterceptDeploymentGroup($interceptDeploymentGroup); + $response = $gapicClient->updateInterceptDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/UpdateInterceptDeploymentGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInterceptDeploymentGroup(); + $this->assertProtobufEquals($interceptDeploymentGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptDeploymentGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInterceptDeploymentGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $interceptDeploymentGroup = new InterceptDeploymentGroup(); + $interceptDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptDeploymentGroup->setNetwork($interceptDeploymentGroupNetwork); + $request = (new UpdateInterceptDeploymentGroupRequest()) + ->setInterceptDeploymentGroup($interceptDeploymentGroup); + $response = $gapicClient->updateInterceptDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptDeploymentGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInterceptEndpointGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $interceptDeploymentGroup = 'interceptDeploymentGroup-1497970078'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptEndpointGroup(); + $expectedResponse->setName($name); + $expectedResponse->setInterceptDeploymentGroup($interceptDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInterceptEndpointGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $interceptEndpointGroup = new InterceptEndpointGroup(); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); + $request = (new UpdateInterceptEndpointGroupRequest()) + ->setInterceptEndpointGroup($interceptEndpointGroup); + $response = $gapicClient->updateInterceptEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/UpdateInterceptEndpointGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInterceptEndpointGroup(); + $this->assertProtobufEquals($interceptEndpointGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptEndpointGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInterceptEndpointGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $interceptEndpointGroup = new InterceptEndpointGroup(); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); + $request = (new UpdateInterceptEndpointGroupRequest()) + ->setInterceptEndpointGroup($interceptEndpointGroup); + $response = $gapicClient->updateInterceptEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptEndpointGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInterceptEndpointGroupAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $interceptEndpointGroup = 'interceptEndpointGroup-42359694'; + $network = 'network1843485230'; + $reconciling = false; + $networkCookie = 2014610027; + $expectedResponse = new InterceptEndpointGroupAssociation(); + $expectedResponse->setName($name); + $expectedResponse->setInterceptEndpointGroup($interceptEndpointGroup); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setNetworkCookie($networkCookie); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInterceptEndpointGroupAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); + $request = (new UpdateInterceptEndpointGroupAssociationRequest()) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + $response = $gapicClient->updateInterceptEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/UpdateInterceptEndpointGroupAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInterceptEndpointGroupAssociation(); + $this->assertProtobufEquals($interceptEndpointGroupAssociation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptEndpointGroupAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInterceptEndpointGroupAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInterceptEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); + $request = (new UpdateInterceptEndpointGroupAssociationRequest()) + ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + $response = $gapicClient->updateInterceptEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInterceptEndpointGroupAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 createInterceptDeploymentAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInterceptDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $forwardingRule = 'forwardingRule-1340648706'; + $interceptDeploymentGroup = 'interceptDeploymentGroup-1497970078'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new InterceptDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setInterceptDeploymentGroup($interceptDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInterceptDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $interceptDeploymentId = 'interceptDeploymentId-52528104'; + $interceptDeployment = new InterceptDeployment(); + $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); + $request = (new CreateInterceptDeploymentRequest()) + ->setParent($formattedParent) + ->setInterceptDeploymentId($interceptDeploymentId) + ->setInterceptDeployment($interceptDeployment); + $response = $gapicClient->createInterceptDeploymentAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptDeploymentId(); + $this->assertProtobufEquals($interceptDeploymentId, $actualValue); + $actualValue = $actualApiRequestObject->getInterceptDeployment(); + $this->assertProtobufEquals($interceptDeployment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInterceptDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/MirroringClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/MirroringClientTest.php new file mode 100644 index 000000000000..22558e6afa81 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/MirroringClientTest.php @@ -0,0 +1,2674 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MirroringClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MirroringClient($options); + } + + /** @test */ + public function createMirroringDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $forwardingRule = 'forwardingRule-1340648706'; + $mirroringDeploymentGroup = 'mirroringDeploymentGroup383487361'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMirroringDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringDeploymentId = 'mirroringDeploymentId972727641'; + $mirroringDeployment = new MirroringDeployment(); + $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); + $request = (new CreateMirroringDeploymentRequest()) + ->setParent($formattedParent) + ->setMirroringDeploymentId($mirroringDeploymentId) + ->setMirroringDeployment($mirroringDeployment); + $response = $gapicClient->createMirroringDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringDeploymentId(); + $this->assertProtobufEquals($mirroringDeploymentId, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringDeployment(); + $this->assertProtobufEquals($mirroringDeployment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMirroringDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringDeploymentId = 'mirroringDeploymentId972727641'; + $mirroringDeployment = new MirroringDeployment(); + $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); + $request = (new CreateMirroringDeploymentRequest()) + ->setParent($formattedParent) + ->setMirroringDeploymentId($mirroringDeploymentId) + ->setMirroringDeployment($mirroringDeployment); + $response = $gapicClient->createMirroringDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMirroringDeploymentGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringDeploymentGroup(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMirroringDeploymentGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringDeploymentGroupId = 'mirroringDeploymentGroupId-140941159'; + $mirroringDeploymentGroup = new MirroringDeploymentGroup(); + $mirroringDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $mirroringDeploymentGroup->setNetwork($mirroringDeploymentGroupNetwork); + $request = (new CreateMirroringDeploymentGroupRequest()) + ->setParent($formattedParent) + ->setMirroringDeploymentGroupId($mirroringDeploymentGroupId) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $response = $gapicClient->createMirroringDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringDeploymentGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringDeploymentGroupId(); + $this->assertProtobufEquals($mirroringDeploymentGroupId, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringDeploymentGroup(); + $this->assertProtobufEquals($mirroringDeploymentGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringDeploymentGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMirroringDeploymentGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringDeploymentGroupId = 'mirroringDeploymentGroupId-140941159'; + $mirroringDeploymentGroup = new MirroringDeploymentGroup(); + $mirroringDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $mirroringDeploymentGroup->setNetwork($mirroringDeploymentGroupNetwork); + $request = (new CreateMirroringDeploymentGroupRequest()) + ->setParent($formattedParent) + ->setMirroringDeploymentGroupId($mirroringDeploymentGroupId) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $response = $gapicClient->createMirroringDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringDeploymentGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMirroringEndpointGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $mirroringDeploymentGroup = 'mirroringDeploymentGroup383487361'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringEndpointGroup(); + $expectedResponse->setName($name); + $expectedResponse->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMirroringEndpointGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringEndpointGroupId = 'mirroringEndpointGroupId-1021525815'; + $mirroringEndpointGroup = new MirroringEndpointGroup(); + $request = (new CreateMirroringEndpointGroupRequest()) + ->setParent($formattedParent) + ->setMirroringEndpointGroupId($mirroringEndpointGroupId) + ->setMirroringEndpointGroup($mirroringEndpointGroup); + $response = $gapicClient->createMirroringEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringEndpointGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringEndpointGroupId(); + $this->assertProtobufEquals($mirroringEndpointGroupId, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringEndpointGroup(); + $this->assertProtobufEquals($mirroringEndpointGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringEndpointGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMirroringEndpointGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringEndpointGroupId = 'mirroringEndpointGroupId-1021525815'; + $mirroringEndpointGroup = new MirroringEndpointGroup(); + $request = (new CreateMirroringEndpointGroupRequest()) + ->setParent($formattedParent) + ->setMirroringEndpointGroupId($mirroringEndpointGroupId) + ->setMirroringEndpointGroup($mirroringEndpointGroup); + $response = $gapicClient->createMirroringEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringEndpointGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMirroringEndpointGroupAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $mirroringEndpointGroup = 'mirroringEndpointGroup1675797329'; + $network = 'network1843485230'; + $reconciling = false; + $expectedResponse = new MirroringEndpointGroupAssociation(); + $expectedResponse->setName($name); + $expectedResponse->setMirroringEndpointGroup($mirroringEndpointGroup); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMirroringEndpointGroupAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation(); + $request = (new CreateMirroringEndpointGroupAssociationRequest()) + ->setParent($formattedParent) + ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + $response = $gapicClient->createMirroringEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringEndpointGroupAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringEndpointGroupAssociation(); + $this->assertProtobufEquals($mirroringEndpointGroupAssociation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringEndpointGroupAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMirroringEndpointGroupAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation(); + $request = (new CreateMirroringEndpointGroupAssociationRequest()) + ->setParent($formattedParent) + ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + $response = $gapicClient->createMirroringEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringEndpointGroupAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMirroringDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); + $request = (new DeleteMirroringDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); + $request = (new DeleteMirroringDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringDeploymentGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMirroringDeploymentGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $request = (new DeleteMirroringDeploymentGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringDeploymentGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringDeploymentGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringDeploymentGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $request = (new DeleteMirroringDeploymentGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringDeploymentGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringEndpointGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMirroringEndpointGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); + $request = (new DeleteMirroringEndpointGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringEndpointGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringEndpointGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringEndpointGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); + $request = (new DeleteMirroringEndpointGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringEndpointGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringEndpointGroupAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMirroringEndpointGroupAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new DeleteMirroringEndpointGroupAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringEndpointGroupAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringEndpointGroupAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMirroringEndpointGroupAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMirroringEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new DeleteMirroringEndpointGroupAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMirroringEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMirroringEndpointGroupAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getMirroringDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $forwardingRule = 'forwardingRule-1340648706'; + $mirroringDeploymentGroup = 'mirroringDeploymentGroup383487361'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); + $request = (new GetMirroringDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getMirroringDeployment($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.networksecurity.v1.Mirroring/GetMirroringDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMirroringDeploymentExceptionTest() + { + $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->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); + $request = (new GetMirroringDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getMirroringDeployment($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 getMirroringDeploymentGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $network = 'network1843485230'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringDeploymentGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $request = (new GetMirroringDeploymentGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getMirroringDeploymentGroup($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.networksecurity.v1.Mirroring/GetMirroringDeploymentGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMirroringDeploymentGroupExceptionTest() + { + $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->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $request = (new GetMirroringDeploymentGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getMirroringDeploymentGroup($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 getMirroringEndpointGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $mirroringDeploymentGroup = 'mirroringDeploymentGroup383487361'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringEndpointGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); + $request = (new GetMirroringEndpointGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getMirroringEndpointGroup($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.networksecurity.v1.Mirroring/GetMirroringEndpointGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMirroringEndpointGroupExceptionTest() + { + $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->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); + $request = (new GetMirroringEndpointGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getMirroringEndpointGroup($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 getMirroringEndpointGroupAssociationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $mirroringEndpointGroup = 'mirroringEndpointGroup1675797329'; + $network = 'network1843485230'; + $reconciling = false; + $expectedResponse = new MirroringEndpointGroupAssociation(); + $expectedResponse->setName($name2); + $expectedResponse->setMirroringEndpointGroup($mirroringEndpointGroup); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new GetMirroringEndpointGroupAssociationRequest()) + ->setName($formattedName); + $response = $gapicClient->getMirroringEndpointGroupAssociation($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.networksecurity.v1.Mirroring/GetMirroringEndpointGroupAssociation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMirroringEndpointGroupAssociationExceptionTest() + { + $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->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); + $request = (new GetMirroringEndpointGroupAssociationRequest()) + ->setName($formattedName); + try { + $gapicClient->getMirroringEndpointGroupAssociation($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 listMirroringDeploymentGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $mirroringDeploymentGroupsElement = new MirroringDeploymentGroup(); + $mirroringDeploymentGroups = [ + $mirroringDeploymentGroupsElement, + ]; + $expectedResponse = new ListMirroringDeploymentGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMirroringDeploymentGroups($mirroringDeploymentGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringDeploymentGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMirroringDeploymentGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMirroringDeploymentGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/ListMirroringDeploymentGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMirroringDeploymentGroupsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringDeploymentGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMirroringDeploymentGroups($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 listMirroringDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $mirroringDeploymentsElement = new MirroringDeployment(); + $mirroringDeployments = [ + $mirroringDeploymentsElement, + ]; + $expectedResponse = new ListMirroringDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMirroringDeployments($mirroringDeployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMirroringDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMirroringDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/ListMirroringDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMirroringDeploymentsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMirroringDeployments($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 listMirroringEndpointGroupAssociationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $mirroringEndpointGroupAssociationsElement = new MirroringEndpointGroupAssociation(); + $mirroringEndpointGroupAssociations = [ + $mirroringEndpointGroupAssociationsElement, + ]; + $expectedResponse = new ListMirroringEndpointGroupAssociationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMirroringEndpointGroupAssociations($mirroringEndpointGroupAssociations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringEndpointGroupAssociationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMirroringEndpointGroupAssociations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMirroringEndpointGroupAssociations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/ListMirroringEndpointGroupAssociations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMirroringEndpointGroupAssociationsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringEndpointGroupAssociationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMirroringEndpointGroupAssociations($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 listMirroringEndpointGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $mirroringEndpointGroupsElement = new MirroringEndpointGroup(); + $mirroringEndpointGroups = [ + $mirroringEndpointGroupsElement, + ]; + $expectedResponse = new ListMirroringEndpointGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMirroringEndpointGroups($mirroringEndpointGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringEndpointGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMirroringEndpointGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMirroringEndpointGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/ListMirroringEndpointGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMirroringEndpointGroupsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMirroringEndpointGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMirroringEndpointGroups($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 updateMirroringDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $forwardingRule = 'forwardingRule-1340648706'; + $mirroringDeploymentGroup = 'mirroringDeploymentGroup383487361'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMirroringDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $mirroringDeployment = new MirroringDeployment(); + $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); + $request = (new UpdateMirroringDeploymentRequest()) + ->setMirroringDeployment($mirroringDeployment); + $response = $gapicClient->updateMirroringDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMirroringDeployment(); + $this->assertProtobufEquals($mirroringDeployment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMirroringDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $mirroringDeployment = new MirroringDeployment(); + $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); + $request = (new UpdateMirroringDeploymentRequest()) + ->setMirroringDeployment($mirroringDeployment); + $response = $gapicClient->updateMirroringDeployment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMirroringDeploymentGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringDeploymentGroup(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMirroringDeploymentGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $mirroringDeploymentGroup = new MirroringDeploymentGroup(); + $mirroringDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $mirroringDeploymentGroup->setNetwork($mirroringDeploymentGroupNetwork); + $request = (new UpdateMirroringDeploymentGroupRequest()) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $response = $gapicClient->updateMirroringDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringDeploymentGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMirroringDeploymentGroup(); + $this->assertProtobufEquals($mirroringDeploymentGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringDeploymentGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMirroringDeploymentGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringDeploymentGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $mirroringDeploymentGroup = new MirroringDeploymentGroup(); + $mirroringDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $mirroringDeploymentGroup->setNetwork($mirroringDeploymentGroupNetwork); + $request = (new UpdateMirroringDeploymentGroupRequest()) + ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $response = $gapicClient->updateMirroringDeploymentGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringDeploymentGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMirroringEndpointGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $mirroringDeploymentGroup = 'mirroringDeploymentGroup383487361'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringEndpointGroup(); + $expectedResponse->setName($name); + $expectedResponse->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMirroringEndpointGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $mirroringEndpointGroup = new MirroringEndpointGroup(); + $request = (new UpdateMirroringEndpointGroupRequest()) + ->setMirroringEndpointGroup($mirroringEndpointGroup); + $response = $gapicClient->updateMirroringEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringEndpointGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMirroringEndpointGroup(); + $this->assertProtobufEquals($mirroringEndpointGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringEndpointGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMirroringEndpointGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringEndpointGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $mirroringEndpointGroup = new MirroringEndpointGroup(); + $request = (new UpdateMirroringEndpointGroupRequest()) + ->setMirroringEndpointGroup($mirroringEndpointGroup); + $response = $gapicClient->updateMirroringEndpointGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringEndpointGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMirroringEndpointGroupAssociationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $mirroringEndpointGroup = 'mirroringEndpointGroup1675797329'; + $network = 'network1843485230'; + $reconciling = false; + $expectedResponse = new MirroringEndpointGroupAssociation(); + $expectedResponse->setName($name); + $expectedResponse->setMirroringEndpointGroup($mirroringEndpointGroup); + $expectedResponse->setNetwork($network); + $expectedResponse->setReconciling($reconciling); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMirroringEndpointGroupAssociationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation(); + $request = (new UpdateMirroringEndpointGroupAssociationRequest()) + ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + $response = $gapicClient->updateMirroringEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringEndpointGroupAssociation', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMirroringEndpointGroupAssociation(); + $this->assertProtobufEquals($mirroringEndpointGroupAssociation, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringEndpointGroupAssociationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMirroringEndpointGroupAssociationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMirroringEndpointGroupAssociationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation(); + $request = (new UpdateMirroringEndpointGroupAssociationRequest()) + ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + $response = $gapicClient->updateMirroringEndpointGroupAssociation($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMirroringEndpointGroupAssociationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 createMirroringDeploymentAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMirroringDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $forwardingRule = 'forwardingRule-1340648706'; + $mirroringDeploymentGroup = 'mirroringDeploymentGroup383487361'; + $reconciling = false; + $description = 'description-1724546052'; + $expectedResponse = new MirroringDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setForwardingRule($forwardingRule); + $expectedResponse->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMirroringDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $mirroringDeploymentId = 'mirroringDeploymentId972727641'; + $mirroringDeployment = new MirroringDeployment(); + $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); + $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); + $request = (new CreateMirroringDeploymentRequest()) + ->setParent($formattedParent) + ->setMirroringDeploymentId($mirroringDeploymentId) + ->setMirroringDeployment($mirroringDeployment); + $response = $gapicClient->createMirroringDeploymentAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringDeploymentId(); + $this->assertProtobufEquals($mirroringDeploymentId, $actualValue); + $actualValue = $actualApiRequestObject->getMirroringDeployment(); + $this->assertProtobufEquals($mirroringDeployment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMirroringDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php new file mode 100644 index 000000000000..16f3114a89fc --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php @@ -0,0 +1,5477 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NetworkSecurityClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NetworkSecurityClient($options); + } + + /** @test */ + public function createAuthorizationPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = 'authorizationPolicyId-730349822'; + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->createAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); + $this->assertProtobufEquals($authorizationPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); + $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAuthorizationPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = 'authorizationPolicyId-730349822'; + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->createAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAuthzPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthzPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthzPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authzPolicyId = 'authzPolicyId148183835'; + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new CreateAuthzPolicyRequest()) + ->setParent($formattedParent) + ->setAuthzPolicyId($authzPolicyId) + ->setAuthzPolicy($authzPolicy); + $response = $gapicClient->createAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthzPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthzPolicyId(); + $this->assertProtobufEquals($authzPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthzPolicy(); + $this->assertProtobufEquals($authzPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthzPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAuthzPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authzPolicyId = 'authzPolicyId148183835'; + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new CreateAuthzPolicyRequest()) + ->setParent($formattedParent) + ->setAuthzPolicyId($authzPolicyId) + ->setAuthzPolicy($authzPolicy); + $response = $gapicClient->createAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthzPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackendAuthenticationConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $clientCertificate = 'clientCertificate1953512227'; + $trustConfig = 'trustConfig1834807049'; + $etag = 'etag3123477'; + $expectedResponse = new BackendAuthenticationConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setClientCertificate($clientCertificate); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackendAuthenticationConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backendAuthenticationConfigId = 'backendAuthenticationConfigId-1658023556'; + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new CreateBackendAuthenticationConfigRequest()) + ->setParent($formattedParent) + ->setBackendAuthenticationConfigId($backendAuthenticationConfigId) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + $response = $gapicClient->createBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateBackendAuthenticationConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackendAuthenticationConfigId(); + $this->assertProtobufEquals($backendAuthenticationConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getBackendAuthenticationConfig(); + $this->assertProtobufEquals($backendAuthenticationConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackendAuthenticationConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackendAuthenticationConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backendAuthenticationConfigId = 'backendAuthenticationConfigId-1658023556'; + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new CreateBackendAuthenticationConfigRequest()) + ->setParent($formattedParent) + ->setBackendAuthenticationConfigId($backendAuthenticationConfigId) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + $response = $gapicClient->createBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackendAuthenticationConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClientTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = 'clientTlsPolicyId244525968'; + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->createClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClientTlsPolicyId(); + $this->assertProtobufEquals($clientTlsPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getClientTlsPolicy(); + $this->assertProtobufEquals($clientTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClientTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = 'clientTlsPolicyId244525968'; + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->createClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGatewaySecurityPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $expectedResponse = new GatewaySecurityPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGatewaySecurityPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $gatewaySecurityPolicyId = 'gatewaySecurityPolicyId-1291912476'; + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new CreateGatewaySecurityPolicyRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->createGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateGatewaySecurityPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyId(); + $this->assertProtobufEquals($gatewaySecurityPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicy(); + $this->assertProtobufEquals($gatewaySecurityPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGatewaySecurityPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $gatewaySecurityPolicyId = 'gatewaySecurityPolicyId-1291912476'; + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new CreateGatewaySecurityPolicyRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->createGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGatewaySecurityPolicyRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $enabled = false; + $priority = 1165461084; + $description = 'description-1724546052'; + $sessionMatcher = 'sessionMatcher-2055881591'; + $applicationMatcher = 'applicationMatcher-488643261'; + $tlsInspectionEnabled = true; + $expectedResponse = new GatewaySecurityPolicyRule(); + $expectedResponse->setName($name); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setPriority($priority); + $expectedResponse->setDescription($description); + $expectedResponse->setSessionMatcher($sessionMatcher); + $expectedResponse->setApplicationMatcher($applicationMatcher); + $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new CreateGatewaySecurityPolicyRuleRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + $response = $gapicClient->createGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateGatewaySecurityPolicyRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyRule(); + $this->assertProtobufEquals($gatewaySecurityPolicyRule, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGatewaySecurityPolicyRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new CreateGatewaySecurityPolicyRuleRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + $response = $gapicClient->createGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyRuleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServerTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->createServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getServerTlsPolicyId(); + $this->assertProtobufEquals($serverTlsPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getServerTlsPolicy(); + $this->assertProtobufEquals($serverTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->createServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTlsInspectionPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $caPool = 'caPool536760157'; + $trustConfig = 'trustConfig1834807049'; + $excludePublicCaSet = true; + $expectedResponse = new TlsInspectionPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCaPool($caPool); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTlsInspectionPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tlsInspectionPolicyId = 'tlsInspectionPolicyId1705280257'; + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new CreateTlsInspectionPolicyRequest()) + ->setParent($formattedParent) + ->setTlsInspectionPolicyId($tlsInspectionPolicyId) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->createTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateTlsInspectionPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTlsInspectionPolicyId(); + $this->assertProtobufEquals($tlsInspectionPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getTlsInspectionPolicy(); + $this->assertProtobufEquals($tlsInspectionPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTlsInspectionPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTlsInspectionPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tlsInspectionPolicyId = 'tlsInspectionPolicyId1705280257'; + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new CreateTlsInspectionPolicyRequest()) + ->setParent($formattedParent) + ->setTlsInspectionPolicyId($tlsInspectionPolicyId) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->createTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTlsInspectionPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUrlListTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new UrlList(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createUrlListTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $urlListId = 'urlListId-108977780'; + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new CreateUrlListRequest()) + ->setParent($formattedParent) + ->setUrlListId($urlListId) + ->setUrlList($urlList); + $response = $gapicClient->createUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateUrlList', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getUrlListId(); + $this->assertProtobufEquals($urlListId, $actualValue); + $actualValue = $actualApiRequestObject->getUrlList(); + $this->assertProtobufEquals($urlList, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUrlListTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUrlListExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $urlListId = 'urlListId-108977780'; + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new CreateUrlListRequest()) + ->setParent($formattedParent) + ->setUrlListId($urlListId) + ->setUrlList($urlList); + $response = $gapicClient->createUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUrlListTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizationPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new DeleteAuthorizationPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizationPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new DeleteAuthorizationPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthzPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAuthzPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new DeleteAuthzPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthzPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthzPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthzPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new DeleteAuthzPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthzPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackendAuthenticationConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackendAuthenticationConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); + $request = (new DeleteBackendAuthenticationConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteBackendAuthenticationConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackendAuthenticationConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackendAuthenticationConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); + $request = (new DeleteBackendAuthenticationConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackendAuthenticationConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClientTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new DeleteClientTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClientTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new DeleteClientTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGatewaySecurityPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $request = (new DeleteGatewaySecurityPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteGatewaySecurityPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $request = (new DeleteGatewaySecurityPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); + $request = (new DeleteGatewaySecurityPolicyRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteGatewaySecurityPolicyRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); + $request = (new DeleteGatewaySecurityPolicyRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServerTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new DeleteServerTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new DeleteServerTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTlsInspectionPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTlsInspectionPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new DeleteTlsInspectionPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteTlsInspectionPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTlsInspectionPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTlsInspectionPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new DeleteTlsInspectionPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTlsInspectionPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUrlListTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteUrlListTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new DeleteUrlListRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteUrlList', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUrlListTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUrlListExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new DeleteUrlListRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUrlListTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getAuthorizationPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new GetAuthorizationPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuthorizationPolicy($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.networksecurity.v1.NetworkSecurity/GetAuthorizationPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizationPolicyExceptionTest() + { + $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->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new GetAuthorizationPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuthorizationPolicy($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 getAuthzPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new AuthzPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new GetAuthzPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuthzPolicy($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.networksecurity.v1.NetworkSecurity/GetAuthzPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthzPolicyExceptionTest() + { + $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->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new GetAuthzPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuthzPolicy($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 getBackendAuthenticationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $clientCertificate = 'clientCertificate1953512227'; + $trustConfig = 'trustConfig1834807049'; + $etag = 'etag3123477'; + $expectedResponse = new BackendAuthenticationConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setClientCertificate($clientCertificate); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); + $request = (new GetBackendAuthenticationConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackendAuthenticationConfig($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.networksecurity.v1.NetworkSecurity/GetBackendAuthenticationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackendAuthenticationConfigExceptionTest() + { + $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->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); + $request = (new GetBackendAuthenticationConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackendAuthenticationConfig($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 getClientTlsPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new GetClientTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getClientTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetClientTlsPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClientTlsPolicyExceptionTest() + { + $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->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new GetClientTlsPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getClientTlsPolicy($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 getGatewaySecurityPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $expectedResponse = new GatewaySecurityPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $request = (new GetGatewaySecurityPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getGatewaySecurityPolicy($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.networksecurity.v1.NetworkSecurity/GetGatewaySecurityPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGatewaySecurityPolicyExceptionTest() + { + $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->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $request = (new GetGatewaySecurityPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getGatewaySecurityPolicy($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 getGatewaySecurityPolicyRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enabled = false; + $priority = 1165461084; + $description = 'description-1724546052'; + $sessionMatcher = 'sessionMatcher-2055881591'; + $applicationMatcher = 'applicationMatcher-488643261'; + $tlsInspectionEnabled = true; + $expectedResponse = new GatewaySecurityPolicyRule(); + $expectedResponse->setName($name2); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setPriority($priority); + $expectedResponse->setDescription($description); + $expectedResponse->setSessionMatcher($sessionMatcher); + $expectedResponse->setApplicationMatcher($applicationMatcher); + $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); + $request = (new GetGatewaySecurityPolicyRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getGatewaySecurityPolicyRule($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.networksecurity.v1.NetworkSecurity/GetGatewaySecurityPolicyRule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGatewaySecurityPolicyRuleExceptionTest() + { + $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->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); + $request = (new GetGatewaySecurityPolicyRuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getGatewaySecurityPolicyRule($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 getServerTlsPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new GetServerTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getServerTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetServerTlsPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServerTlsPolicyExceptionTest() + { + $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->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new GetServerTlsPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getServerTlsPolicy($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 getTlsInspectionPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $caPool = 'caPool536760157'; + $trustConfig = 'trustConfig1834807049'; + $excludePublicCaSet = true; + $expectedResponse = new TlsInspectionPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCaPool($caPool); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new GetTlsInspectionPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getTlsInspectionPolicy($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.networksecurity.v1.NetworkSecurity/GetTlsInspectionPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTlsInspectionPolicyExceptionTest() + { + $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->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new GetTlsInspectionPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getTlsInspectionPolicy($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 getUrlListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new UrlList(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new GetUrlListRequest()) + ->setName($formattedName); + $response = $gapicClient->getUrlList($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.networksecurity.v1.NetworkSecurity/GetUrlList', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUrlListExceptionTest() + { + $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->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new GetUrlListRequest()) + ->setName($formattedName); + try { + $gapicClient->getUrlList($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 listAuthorizationPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authorizationPoliciesElement = new AuthorizationPolicy(); + $authorizationPolicies = [ + $authorizationPoliciesElement, + ]; + $expectedResponse = new ListAuthorizationPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthorizationPolicies($authorizationPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthorizationPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuthorizationPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthorizationPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthorizationPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizationPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthorizationPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuthorizationPolicies($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 listAuthzPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authzPoliciesElement = new AuthzPolicy(); + $authzPolicies = [ + $authzPoliciesElement, + ]; + $expectedResponse = new ListAuthzPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthzPolicies($authzPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthzPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuthzPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthzPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthzPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthzPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthzPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuthzPolicies($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 listBackendAuthenticationConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backendAuthenticationConfigsElement = new BackendAuthenticationConfig(); + $backendAuthenticationConfigs = [ + $backendAuthenticationConfigsElement, + ]; + $expectedResponse = new ListBackendAuthenticationConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackendAuthenticationConfigs($backendAuthenticationConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackendAuthenticationConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackendAuthenticationConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackendAuthenticationConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListBackendAuthenticationConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackendAuthenticationConfigsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackendAuthenticationConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackendAuthenticationConfigs($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 listClientTlsPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clientTlsPoliciesElement = new ClientTlsPolicy(); + $clientTlsPolicies = [ + $clientTlsPoliciesElement, + ]; + $expectedResponse = new ListClientTlsPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClientTlsPolicies($clientTlsPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientTlsPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClientTlsPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClientTlsPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListClientTlsPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientTlsPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientTlsPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClientTlsPolicies($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 listGatewaySecurityPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gatewaySecurityPoliciesElement = new GatewaySecurityPolicy(); + $gatewaySecurityPolicies = [ + $gatewaySecurityPoliciesElement, + ]; + $expectedResponse = new ListGatewaySecurityPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGatewaySecurityPolicies($gatewaySecurityPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGatewaySecurityPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGatewaySecurityPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGatewaySecurityPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListGatewaySecurityPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGatewaySecurityPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGatewaySecurityPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGatewaySecurityPolicies($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 listGatewaySecurityPolicyRulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gatewaySecurityPolicyRulesElement = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRules = [ + $gatewaySecurityPolicyRulesElement, + ]; + $expectedResponse = new ListGatewaySecurityPolicyRulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGatewaySecurityPolicyRules($gatewaySecurityPolicyRules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $request = (new ListGatewaySecurityPolicyRulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGatewaySecurityPolicyRules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGatewaySecurityPolicyRules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListGatewaySecurityPolicyRules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGatewaySecurityPolicyRulesExceptionTest() + { + $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->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); + $request = (new ListGatewaySecurityPolicyRulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGatewaySecurityPolicyRules($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 listServerTlsPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $serverTlsPoliciesElement = new ServerTlsPolicy(); + $serverTlsPolicies = [ + $serverTlsPoliciesElement, + ]; + $expectedResponse = new ListServerTlsPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServerTlsPolicies($serverTlsPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServerTlsPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listServerTlsPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServerTlsPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListServerTlsPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerTlsPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServerTlsPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listServerTlsPolicies($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 listTlsInspectionPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tlsInspectionPoliciesElement = new TlsInspectionPolicy(); + $tlsInspectionPolicies = [ + $tlsInspectionPoliciesElement, + ]; + $expectedResponse = new ListTlsInspectionPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTlsInspectionPolicies($tlsInspectionPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTlsInspectionPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTlsInspectionPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTlsInspectionPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListTlsInspectionPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTlsInspectionPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTlsInspectionPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTlsInspectionPolicies($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 listUrlListsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $urlListsElement = new UrlList(); + $urlLists = [ + $urlListsElement, + ]; + $expectedResponse = new ListUrlListsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUrlLists($urlLists); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListUrlListsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listUrlLists($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUrlLists()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListUrlLists', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUrlListsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListUrlListsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listUrlLists($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 updateAuthorizationPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest()) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->updateAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); + $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAuthorizationPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest()) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->updateAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAuthzPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthzPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthzPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new UpdateAuthzPolicyRequest()) + ->setUpdateMask($updateMask) + ->setAuthzPolicy($authzPolicy); + $response = $gapicClient->updateAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthzPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getAuthzPolicy(); + $this->assertProtobufEquals($authzPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthzPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAuthzPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new UpdateAuthzPolicyRequest()) + ->setUpdateMask($updateMask) + ->setAuthzPolicy($authzPolicy); + $response = $gapicClient->updateAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthzPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackendAuthenticationConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $clientCertificate = 'clientCertificate1953512227'; + $trustConfig = 'trustConfig1834807049'; + $etag = 'etag3123477'; + $expectedResponse = new BackendAuthenticationConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setClientCertificate($clientCertificate); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackendAuthenticationConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new UpdateBackendAuthenticationConfigRequest()) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + $response = $gapicClient->updateBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateBackendAuthenticationConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getBackendAuthenticationConfig(); + $this->assertProtobufEquals($backendAuthenticationConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackendAuthenticationConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackendAuthenticationConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new UpdateBackendAuthenticationConfigRequest()) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + $response = $gapicClient->updateBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackendAuthenticationConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClientTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest()) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->updateClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getClientTlsPolicy(); + $this->assertProtobufEquals($clientTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClientTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest()) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->updateClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGatewaySecurityPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $expectedResponse = new GatewaySecurityPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGatewaySecurityPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new UpdateGatewaySecurityPolicyRequest()) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->updateGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateGatewaySecurityPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicy(); + $this->assertProtobufEquals($gatewaySecurityPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGatewaySecurityPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new UpdateGatewaySecurityPolicyRequest()) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->updateGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGatewaySecurityPolicyRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $enabled = false; + $priority = 1165461084; + $description = 'description-1724546052'; + $sessionMatcher = 'sessionMatcher-2055881591'; + $applicationMatcher = 'applicationMatcher-488643261'; + $tlsInspectionEnabled = true; + $expectedResponse = new GatewaySecurityPolicyRule(); + $expectedResponse->setName($name); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setPriority($priority); + $expectedResponse->setDescription($description); + $expectedResponse->setSessionMatcher($sessionMatcher); + $expectedResponse->setApplicationMatcher($applicationMatcher); + $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new UpdateGatewaySecurityPolicyRuleRequest()) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + $response = $gapicClient->updateGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateGatewaySecurityPolicyRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyRule(); + $this->assertProtobufEquals($gatewaySecurityPolicyRule, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGatewaySecurityPolicyRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new UpdateGatewaySecurityPolicyRuleRequest()) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + $response = $gapicClient->updateGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyRuleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateServerTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest()) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->updateServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getServerTlsPolicy(); + $this->assertProtobufEquals($serverTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest()) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->updateServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTlsInspectionPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $caPool = 'caPool536760157'; + $trustConfig = 'trustConfig1834807049'; + $excludePublicCaSet = true; + $expectedResponse = new TlsInspectionPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCaPool($caPool); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTlsInspectionPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new UpdateTlsInspectionPolicyRequest()) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->updateTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateTlsInspectionPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTlsInspectionPolicy(); + $this->assertProtobufEquals($tlsInspectionPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTlsInspectionPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTlsInspectionPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new UpdateTlsInspectionPolicyRequest()) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->updateTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTlsInspectionPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateUrlListTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new UrlList(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateUrlListTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new UpdateUrlListRequest()) + ->setUrlList($urlList); + $response = $gapicClient->updateUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateUrlList', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUrlList(); + $this->assertProtobufEquals($urlList, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateUrlListTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateUrlListExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new UpdateUrlListRequest()) + ->setUrlList($urlList); + $response = $gapicClient->updateUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateUrlListTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 createAuthorizationPolicyAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = 'authorizationPolicyId-730349822'; + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->createAuthorizationPolicyAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); + $this->assertProtobufEquals($authorizationPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); + $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php new file mode 100644 index 000000000000..eb80d451df21 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php @@ -0,0 +1,1528 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OrganizationAddressGroupServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OrganizationAddressGroupServiceClient($options); + } + + /** @test */ + public function addAddressGroupItemsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new AddAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->addAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/AddAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getItems(); + $this->assertProtobufEquals($items, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function addAddressGroupItemsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new AddAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->addAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cloneAddressGroupItemsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cloneAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new CloneAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setSourceAddressGroup($formattedSourceAddressGroup); + $response = $gapicClient->cloneAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/CloneAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getSourceAddressGroup(); + $this->assertProtobufEquals($formattedSourceAddressGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cloneAddressGroupItemsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new CloneAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setSourceAddressGroup($formattedSourceAddressGroup); + $response = $gapicClient->cloneAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAddressGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAddressGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $addressGroupId = 'addressGroupId-816169274'; + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new CreateAddressGroupRequest()) + ->setParent($formattedParent) + ->setAddressGroupId($addressGroupId) + ->setAddressGroup($addressGroup); + $response = $gapicClient->createAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/CreateAddressGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAddressGroupId(); + $this->assertProtobufEquals($addressGroupId, $actualValue); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($addressGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAddressGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $addressGroupId = 'addressGroupId-816169274'; + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new CreateAddressGroupRequest()) + ->setParent($formattedParent) + ->setAddressGroupId($addressGroupId) + ->setAddressGroup($addressGroup); + $response = $gapicClient->createAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAddressGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAddressGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new DeleteAddressGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/DeleteAddressGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAddressGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new DeleteAddressGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getAddressGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new GetAddressGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getAddressGroup($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.networksecurity.v1.OrganizationAddressGroupService/GetAddressGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAddressGroupExceptionTest() + { + $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->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new GetAddressGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getAddressGroup($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 listAddressGroupReferencesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $addressGroupReferencesElement = new AddressGroupReference(); + $addressGroupReferences = [ + $addressGroupReferencesElement, + ]; + $expectedResponse = new ListAddressGroupReferencesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAddressGroupReferences($addressGroupReferences); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new ListAddressGroupReferencesRequest()) + ->setAddressGroup($formattedAddressGroup); + $response = $gapicClient->listAddressGroupReferences($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAddressGroupReferences()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/ListAddressGroupReferences', $actualFuncCall); + $actualValue = $actualRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAddressGroupReferencesExceptionTest() + { + $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 + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $request = (new ListAddressGroupReferencesRequest()) + ->setAddressGroup($formattedAddressGroup); + try { + $gapicClient->listAddressGroupReferences($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 listAddressGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $addressGroupsElement = new AddressGroup(); + $addressGroups = [ + $addressGroupsElement, + ]; + $expectedResponse = new ListAddressGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAddressGroups($addressGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAddressGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAddressGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAddressGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/ListAddressGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAddressGroupsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAddressGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAddressGroups($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 removeAddressGroupItemsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new RemoveAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->removeAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/RemoveAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getItems(); + $this->assertProtobufEquals($items, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeAddressGroupItemsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new RemoveAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->removeAddressGroupItems($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAddressGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAddressGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new UpdateAddressGroupRequest()) + ->setAddressGroup($addressGroup); + $response = $gapicClient->updateAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/UpdateAddressGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($addressGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAddressGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAddressGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $addressGroup = new AddressGroup(); + $addressGroupName = 'addressGroupName-892255210'; + $addressGroup->setName($addressGroupName); + $addressGroupType = Type::TYPE_UNSPECIFIED; + $addressGroup->setType($addressGroupType); + $addressGroupCapacity = 1210917061; + $addressGroup->setCapacity($addressGroupCapacity); + $request = (new UpdateAddressGroupRequest()) + ->setAddressGroup($addressGroup); + $response = $gapicClient->updateAddressGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 addAddressGroupItemsAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAddressGroupItemsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $capacity = 67824454; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new AddressGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacity($capacity); + $expectedResponse->setSelfLink($selfLink); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addAddressGroupItemsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); + $items = []; + $request = (new AddAddressGroupItemsRequest()) + ->setAddressGroup($formattedAddressGroup) + ->setItems($items); + $response = $gapicClient->addAddressGroupItemsAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/AddAddressGroupItems', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAddressGroup(); + $this->assertProtobufEquals($formattedAddressGroup, $actualValue); + $actualValue = $actualApiRequestObject->getItems(); + $this->assertProtobufEquals($items, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php new file mode 100644 index 000000000000..1491a8b86011 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php @@ -0,0 +1,1593 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OrganizationSecurityProfileGroupServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OrganizationSecurityProfileGroupServiceClient($options); + } + + /** @test */ + public function createSecurityProfileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSecurityProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $expectedResponse = new SecurityProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSecurityProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $securityProfileId = 'securityProfileId-1751387696'; + $securityProfile = new SecurityProfile(); + $request = (new CreateSecurityProfileRequest()) + ->setParent($formattedParent) + ->setSecurityProfileId($securityProfileId) + ->setSecurityProfile($securityProfile); + $response = $gapicClient->createSecurityProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfileId(); + $this->assertProtobufEquals($securityProfileId, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfile(); + $this->assertProtobufEquals($securityProfile, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSecurityProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSecurityProfileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSecurityProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $securityProfileId = 'securityProfileId-1751387696'; + $securityProfile = new SecurityProfile(); + $request = (new CreateSecurityProfileRequest()) + ->setParent($formattedParent) + ->setSecurityProfileId($securityProfileId) + ->setSecurityProfile($securityProfile); + $response = $gapicClient->createSecurityProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSecurityProfileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSecurityProfileGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSecurityProfileGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $dataPathId = 1465603104; + $threatPreventionProfile = 'threatPreventionProfile142676447'; + $customMirroringProfile = 'customMirroringProfile-334448673'; + $customInterceptProfile = 'customInterceptProfile-1051702818'; + $urlFilteringProfile = 'urlFilteringProfile962621700'; + $expectedResponse = new SecurityProfileGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $expectedResponse->setDataPathId($dataPathId); + $expectedResponse->setThreatPreventionProfile($threatPreventionProfile); + $expectedResponse->setCustomMirroringProfile($customMirroringProfile); + $expectedResponse->setCustomInterceptProfile($customInterceptProfile); + $expectedResponse->setUrlFilteringProfile($urlFilteringProfile); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSecurityProfileGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $securityProfileGroupId = 'securityProfileGroupId-921223216'; + $securityProfileGroup = new SecurityProfileGroup(); + $request = (new CreateSecurityProfileGroupRequest()) + ->setParent($formattedParent) + ->setSecurityProfileGroupId($securityProfileGroupId) + ->setSecurityProfileGroup($securityProfileGroup); + $response = $gapicClient->createSecurityProfileGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfileGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfileGroupId(); + $this->assertProtobufEquals($securityProfileGroupId, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfileGroup(); + $this->assertProtobufEquals($securityProfileGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSecurityProfileGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSecurityProfileGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSecurityProfileGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $securityProfileGroupId = 'securityProfileGroupId-921223216'; + $securityProfileGroup = new SecurityProfileGroup(); + $request = (new CreateSecurityProfileGroupRequest()) + ->setParent($formattedParent) + ->setSecurityProfileGroupId($securityProfileGroupId) + ->setSecurityProfileGroup($securityProfileGroup); + $response = $gapicClient->createSecurityProfileGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSecurityProfileGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSecurityProfileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSecurityProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSecurityProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); + $request = (new DeleteSecurityProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSecurityProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/DeleteSecurityProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSecurityProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSecurityProfileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSecurityProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); + $request = (new DeleteSecurityProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSecurityProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSecurityProfileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSecurityProfileGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSecurityProfileGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSecurityProfileGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); + $request = (new DeleteSecurityProfileGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSecurityProfileGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/DeleteSecurityProfileGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSecurityProfileGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSecurityProfileGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSecurityProfileGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); + $request = (new DeleteSecurityProfileGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSecurityProfileGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSecurityProfileGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getSecurityProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $expectedResponse = new SecurityProfile(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); + $request = (new GetSecurityProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->getSecurityProfile($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.networksecurity.v1.OrganizationSecurityProfileGroupService/GetSecurityProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecurityProfileExceptionTest() + { + $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->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); + $request = (new GetSecurityProfileRequest()) + ->setName($formattedName); + try { + $gapicClient->getSecurityProfile($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 getSecurityProfileGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $dataPathId = 1465603104; + $threatPreventionProfile = 'threatPreventionProfile142676447'; + $customMirroringProfile = 'customMirroringProfile-334448673'; + $customInterceptProfile = 'customInterceptProfile-1051702818'; + $urlFilteringProfile = 'urlFilteringProfile962621700'; + $expectedResponse = new SecurityProfileGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $expectedResponse->setDataPathId($dataPathId); + $expectedResponse->setThreatPreventionProfile($threatPreventionProfile); + $expectedResponse->setCustomMirroringProfile($customMirroringProfile); + $expectedResponse->setCustomInterceptProfile($customInterceptProfile); + $expectedResponse->setUrlFilteringProfile($urlFilteringProfile); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); + $request = (new GetSecurityProfileGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getSecurityProfileGroup($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.networksecurity.v1.OrganizationSecurityProfileGroupService/GetSecurityProfileGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecurityProfileGroupExceptionTest() + { + $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->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); + $request = (new GetSecurityProfileGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getSecurityProfileGroup($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 listSecurityProfileGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $securityProfileGroupsElement = new SecurityProfileGroup(); + $securityProfileGroups = [ + $securityProfileGroupsElement, + ]; + $expectedResponse = new ListSecurityProfileGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSecurityProfileGroups($securityProfileGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListSecurityProfileGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSecurityProfileGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSecurityProfileGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/ListSecurityProfileGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecurityProfileGroupsExceptionTest() + { + $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 ListSecurityProfileGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSecurityProfileGroups($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 listSecurityProfilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $securityProfilesElement = new SecurityProfile(); + $securityProfiles = [ + $securityProfilesElement, + ]; + $expectedResponse = new ListSecurityProfilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSecurityProfiles($securityProfiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListSecurityProfilesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSecurityProfiles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSecurityProfiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/ListSecurityProfiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecurityProfilesExceptionTest() + { + $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 ListSecurityProfilesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSecurityProfiles($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 updateSecurityProfileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSecurityProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $expectedResponse = new SecurityProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSecurityProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $securityProfile = new SecurityProfile(); + $request = (new UpdateSecurityProfileRequest()) + ->setUpdateMask($updateMask) + ->setSecurityProfile($securityProfile); + $response = $gapicClient->updateSecurityProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/UpdateSecurityProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfile(); + $this->assertProtobufEquals($securityProfile, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSecurityProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSecurityProfileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSecurityProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $securityProfile = new SecurityProfile(); + $request = (new UpdateSecurityProfileRequest()) + ->setUpdateMask($updateMask) + ->setSecurityProfile($securityProfile); + $response = $gapicClient->updateSecurityProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSecurityProfileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSecurityProfileGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSecurityProfileGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $dataPathId = 1465603104; + $threatPreventionProfile = 'threatPreventionProfile142676447'; + $customMirroringProfile = 'customMirroringProfile-334448673'; + $customInterceptProfile = 'customInterceptProfile-1051702818'; + $urlFilteringProfile = 'urlFilteringProfile962621700'; + $expectedResponse = new SecurityProfileGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $expectedResponse->setDataPathId($dataPathId); + $expectedResponse->setThreatPreventionProfile($threatPreventionProfile); + $expectedResponse->setCustomMirroringProfile($customMirroringProfile); + $expectedResponse->setCustomInterceptProfile($customInterceptProfile); + $expectedResponse->setUrlFilteringProfile($urlFilteringProfile); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSecurityProfileGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $securityProfileGroup = new SecurityProfileGroup(); + $request = (new UpdateSecurityProfileGroupRequest()) + ->setUpdateMask($updateMask) + ->setSecurityProfileGroup($securityProfileGroup); + $response = $gapicClient->updateSecurityProfileGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/UpdateSecurityProfileGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfileGroup(); + $this->assertProtobufEquals($securityProfileGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSecurityProfileGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSecurityProfileGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSecurityProfileGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $securityProfileGroup = new SecurityProfileGroup(); + $request = (new UpdateSecurityProfileGroupRequest()) + ->setUpdateMask($updateMask) + ->setSecurityProfileGroup($securityProfileGroup); + $response = $gapicClient->updateSecurityProfileGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSecurityProfileGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($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 createSecurityProfileAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSecurityProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $expectedResponse = new SecurityProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSecurityProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $securityProfileId = 'securityProfileId-1751387696'; + $securityProfile = new SecurityProfile(); + $request = (new CreateSecurityProfileRequest()) + ->setParent($formattedParent) + ->setSecurityProfileId($securityProfileId) + ->setSecurityProfile($securityProfile); + $response = $gapicClient->createSecurityProfileAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfileId(); + $this->assertProtobufEquals($securityProfileId, $actualValue); + $actualValue = $actualApiRequestObject->getSecurityProfile(); + $this->assertProtobufEquals($securityProfile, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSecurityProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From bf233b0c5968a4b64283a7e1af70c0106acfe931 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Mar 2026 15:09:08 +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 --- NetworkSecurity/metadata/V1/AddressGroup.php | 5 +- .../metadata}/V1/AuthzPolicy.php | 0 .../V1/BackendAuthenticationConfig.php | 0 .../metadata}/V1/DnsThreatDetector.php | 0 .../metadata}/V1/FirewallActivation.php | 0 .../metadata}/V1/GatewaySecurityPolicy.php | 0 .../V1/GatewaySecurityPolicyRule.php | 0 .../metadata}/V1/Intercept.php | 0 .../metadata}/V1/Mirroring.php | 0 .../metadata/V1/NetworkSecurity.php | 10 +- .../metadata}/V1/SecurityProfileGroup.php | 0 .../V1/SecurityProfileGroupIntercept.php | 0 .../V1/SecurityProfileGroupMirroring.php | 0 .../V1/SecurityProfileGroupService.php | 0 .../SecurityProfileGroupThreatprevention.php | 0 .../V1/SecurityProfileGroupUrlfiltering.php | 0 .../metadata/V1/ServerTlsPolicy.php | 2 +- .../metadata}/V1/TlsInspectionPolicy.php | 0 .../metadata}/V1/UrlList.php | 0 .../list_locations.php | 16 + .../create_dns_threat_detector.php | 0 .../delete_dns_threat_detector.php | 0 .../get_dns_threat_detector.php | 0 .../get_iam_policy.php | 0 .../get_location.php | 0 .../list_dns_threat_detectors.php | 0 .../list_locations.php | 0 .../set_iam_policy.php | 0 .../test_iam_permissions.php | 0 .../update_dns_threat_detector.php | 0 .../create_firewall_endpoint.php | 0 .../create_firewall_endpoint_association.php | 0 .../delete_firewall_endpoint.php | 0 .../delete_firewall_endpoint_association.php | 0 .../get_firewall_endpoint.php | 0 .../get_firewall_endpoint_association.php | 0 .../get_iam_policy.php | 0 .../FirewallActivationClient/get_location.php | 0 .../list_firewall_endpoint_associations.php | 0 .../list_firewall_endpoints.php | 0 .../list_locations.php | 0 .../set_iam_policy.php | 0 .../test_iam_permissions.php | 0 .../update_firewall_endpoint.php | 0 .../update_firewall_endpoint_association.php | 0 .../create_intercept_deployment.php | 0 .../create_intercept_deployment_group.php | 0 .../create_intercept_endpoint_group.php | 0 ...e_intercept_endpoint_group_association.php | 0 .../delete_intercept_deployment.php | 0 .../delete_intercept_deployment_group.php | 0 .../delete_intercept_endpoint_group.php | 0 ...e_intercept_endpoint_group_association.php | 0 .../V1/InterceptClient/get_iam_policy.php | 0 .../get_intercept_deployment.php | 0 .../get_intercept_deployment_group.php | 0 .../get_intercept_endpoint_group.php | 0 ...t_intercept_endpoint_group_association.php | 0 .../V1/InterceptClient/get_location.php | 0 .../list_intercept_deployment_groups.php | 0 .../list_intercept_deployments.php | 0 ..._intercept_endpoint_group_associations.php | 0 .../list_intercept_endpoint_groups.php | 0 .../V1/InterceptClient/list_locations.php | 0 .../V1/InterceptClient/set_iam_policy.php | 0 .../InterceptClient/test_iam_permissions.php | 0 .../update_intercept_deployment.php | 0 .../update_intercept_deployment_group.php | 0 .../update_intercept_endpoint_group.php | 0 ...e_intercept_endpoint_group_association.php | 0 .../create_mirroring_deployment.php | 0 .../create_mirroring_deployment_group.php | 0 .../create_mirroring_endpoint_group.php | 0 ...e_mirroring_endpoint_group_association.php | 0 .../delete_mirroring_deployment.php | 0 .../delete_mirroring_deployment_group.php | 0 .../delete_mirroring_endpoint_group.php | 0 ...e_mirroring_endpoint_group_association.php | 0 .../V1/MirroringClient/get_iam_policy.php | 0 .../V1/MirroringClient/get_location.php | 0 .../get_mirroring_deployment.php | 0 .../get_mirroring_deployment_group.php | 0 .../get_mirroring_endpoint_group.php | 0 ...t_mirroring_endpoint_group_association.php | 0 .../V1/MirroringClient/list_locations.php | 0 .../list_mirroring_deployment_groups.php | 0 .../list_mirroring_deployments.php | 0 ..._mirroring_endpoint_group_associations.php | 0 .../list_mirroring_endpoint_groups.php | 0 .../V1/MirroringClient/set_iam_policy.php | 0 .../MirroringClient/test_iam_permissions.php | 0 .../update_mirroring_deployment.php | 0 .../update_mirroring_deployment_group.php | 0 .../update_mirroring_endpoint_group.php | 0 ...e_mirroring_endpoint_group_association.php | 0 .../create_authz_policy.php | 0 .../create_backend_authentication_config.php | 0 .../create_client_tls_policy.php | 9 +- .../create_gateway_security_policy.php | 0 .../create_gateway_security_policy_rule.php | 0 .../create_server_tls_policy.php | 7 +- .../create_tls_inspection_policy.php | 0 .../NetworkSecurityClient/create_url_list.php | 0 .../delete_authorization_policy.php | 4 +- .../delete_authz_policy.php | 0 .../delete_backend_authentication_config.php | 0 .../delete_gateway_security_policy.php | 0 .../delete_gateway_security_policy_rule.php | 0 .../delete_tls_inspection_policy.php | 0 .../NetworkSecurityClient/delete_url_list.php | 0 .../get_authz_policy.php | 0 .../get_backend_authentication_config.php | 0 .../get_gateway_security_policy.php | 0 .../get_gateway_security_policy_rule.php | 0 .../get_tls_inspection_policy.php | 0 .../V1/NetworkSecurityClient/get_url_list.php | 0 .../list_authz_policies.php | 0 .../list_backend_authentication_configs.php | 0 .../list_gateway_security_policies.php | 0 .../list_gateway_security_policy_rules.php | 0 .../NetworkSecurityClient/list_locations.php | 16 + .../list_tls_inspection_policies.php | 0 .../NetworkSecurityClient/list_url_lists.php | 0 .../update_authz_policy.php | 0 .../update_backend_authentication_config.php | 0 .../update_client_tls_policy.php | 2 +- .../update_gateway_security_policy.php | 0 .../update_gateway_security_policy_rule.php | 0 .../update_tls_inspection_policy.php | 0 .../NetworkSecurityClient/update_url_list.php | 0 .../list_locations.php | 16 + .../create_security_profile.php | 0 .../create_security_profile_group.php | 0 .../delete_security_profile.php | 0 .../delete_security_profile_group.php | 0 .../get_iam_policy.php | 0 .../get_location.php | 0 .../get_security_profile.php | 0 .../get_security_profile_group.php | 0 .../list_locations.php | 0 .../list_security_profile_groups.php | 0 .../list_security_profiles.php | 0 .../set_iam_policy.php | 0 .../test_iam_permissions.php | 0 .../update_security_profile.php | 0 .../update_security_profile_group.php | 0 .../src}/V1/AntivirusOverride.php | 0 .../src/V1/AuthorizationPolicy.php | 48 +- .../src/V1/AuthorizationPolicy/Rule.php | 56 +- .../AuthorizationPolicy/Rule/Destination.php | 76 +- .../V1/AuthorizationPolicy/Rule/Source.php | 64 +- .../src}/V1/AuthzPolicy.php | 0 .../src}/V1/AuthzPolicy/AuthzAction.php | 0 .../src}/V1/AuthzPolicy/AuthzRule.php | 0 .../src}/V1/AuthzPolicy/AuthzRule/From.php | 0 .../AuthzRule/From/RequestSource.php | 0 .../V1/AuthzPolicy/AuthzRule/HeaderMatch.php | 0 .../src}/V1/AuthzPolicy/AuthzRule/IpBlock.php | 0 .../V1/AuthzPolicy/AuthzRule/Principal.php | 0 .../AuthzRule/Principal/PrincipalSelector.php | 0 .../AuthzPolicy/AuthzRule/RequestResource.php | 0 .../RequestResource/TagValueIdSet.php | 0 .../V1/AuthzPolicy/AuthzRule/StringMatch.php | 0 .../src}/V1/AuthzPolicy/AuthzRule/To.php | 0 .../AuthzRule/To/RequestOperation.php | 0 .../BaseProtocolMethodsOption.php | 0 .../To/RequestOperation/HeaderSet.php | 0 .../AuthzRule/To/RequestOperation/MCP.php | 0 .../To/RequestOperation/MCPMethod.php | 0 .../src}/V1/AuthzPolicy/CustomProvider.php | 0 .../CustomProvider/AuthzExtension.php | 0 .../AuthzPolicy/CustomProvider/CloudIap.php | 0 .../V1/AuthzPolicy/LoadBalancingScheme.php | 0 .../src}/V1/AuthzPolicy/PolicyProfile.php | 0 .../src}/V1/AuthzPolicy/Target.php | 0 .../src}/V1/BackendAuthenticationConfig.php | 0 .../WellKnownRoots.php | 0 .../src/V1/CertificateProviderInstance.php | 24 +- .../V1/Client/AddressGroupServiceClient.php | 16 + .../Client/DnsThreatDetectorServiceClient.php | 37 +- .../V1/Client/FirewallActivationClient.php | 99 +- .../src/V1/Client/InterceptClient.php | 158 +- .../src/V1/Client/MirroringClient.php | 158 +- .../src/V1/Client/NetworkSecurityClient.php | 1306 +++- .../OrganizationAddressGroupServiceClient.php | 16 + ...ationSecurityProfileGroupServiceClient.php | 122 +- NetworkSecurity/src/V1/ClientTlsPolicy.php | 52 +- .../src}/V1/CreateAuthzPolicyRequest.php | 0 ...eateBackendAuthenticationConfigRequest.php | 0 .../src/V1/CreateClientTlsPolicyRequest.php | 35 +- .../V1/CreateDnsThreatDetectorRequest.php | 0 ...eateFirewallEndpointAssociationRequest.php | 0 .../src}/V1/CreateFirewallEndpointRequest.php | 0 .../V1/CreateGatewaySecurityPolicyRequest.php | 0 ...CreateGatewaySecurityPolicyRuleRequest.php | 0 .../CreateInterceptDeploymentGroupRequest.php | 0 .../V1/CreateInterceptDeploymentRequest.php | 0 ...terceptEndpointGroupAssociationRequest.php | 0 .../CreateInterceptEndpointGroupRequest.php | 0 .../CreateMirroringDeploymentGroupRequest.php | 0 .../V1/CreateMirroringDeploymentRequest.php | 0 ...rroringEndpointGroupAssociationRequest.php | 0 .../CreateMirroringEndpointGroupRequest.php | 0 .../V1/CreateSecurityProfileGroupRequest.php | 0 .../src}/V1/CreateSecurityProfileRequest.php | 0 .../src/V1/CreateServerTlsPolicyRequest.php | 35 +- .../V1/CreateTlsInspectionPolicyRequest.php | 0 .../src}/V1/CreateUrlListRequest.php | 0 .../src}/V1/CustomInterceptProfile.php | 0 .../src}/V1/CustomMirroringProfile.php | 0 .../V1/DeleteAuthorizationPolicyRequest.php | 20 +- .../src}/V1/DeleteAuthzPolicyRequest.php | 0 ...leteBackendAuthenticationConfigRequest.php | 0 .../V1/DeleteDnsThreatDetectorRequest.php | 0 ...leteFirewallEndpointAssociationRequest.php | 0 .../src}/V1/DeleteFirewallEndpointRequest.php | 0 .../V1/DeleteGatewaySecurityPolicyRequest.php | 0 ...DeleteGatewaySecurityPolicyRuleRequest.php | 0 .../DeleteInterceptDeploymentGroupRequest.php | 0 .../V1/DeleteInterceptDeploymentRequest.php | 0 ...terceptEndpointGroupAssociationRequest.php | 0 .../DeleteInterceptEndpointGroupRequest.php | 0 .../DeleteMirroringDeploymentGroupRequest.php | 0 .../V1/DeleteMirroringDeploymentRequest.php | 0 ...rroringEndpointGroupAssociationRequest.php | 0 .../DeleteMirroringEndpointGroupRequest.php | 0 .../V1/DeleteSecurityProfileGroupRequest.php | 0 .../src}/V1/DeleteSecurityProfileRequest.php | 0 .../V1/DeleteTlsInspectionPolicyRequest.php | 0 .../src}/V1/DeleteUrlListRequest.php | 0 .../src}/V1/DnsThreatDetector.php | 0 .../src}/V1/DnsThreatDetector/Provider.php | 0 .../src}/V1/FirewallEndpoint.php | 0 .../FirewallEndpoint/AssociationReference.php | 0 .../V1/FirewallEndpoint/EndpointSettings.php | 0 .../src}/V1/FirewallEndpoint/State.php | 0 .../src}/V1/FirewallEndpointAssociation.php | 0 .../V1/FirewallEndpointAssociation/State.php | 0 .../src}/V1/GatewaySecurityPolicy.php | 0 .../src}/V1/GatewaySecurityPolicyRule.php | 0 .../BasicProfile.php | 0 .../src}/V1/GetAuthzPolicyRequest.php | 0 .../GetBackendAuthenticationConfigRequest.php | 0 .../src}/V1/GetDnsThreatDetectorRequest.php | 0 .../GetFirewallEndpointAssociationRequest.php | 0 .../src}/V1/GetFirewallEndpointRequest.php | 0 .../V1/GetGatewaySecurityPolicyRequest.php | 0 .../GetGatewaySecurityPolicyRuleRequest.php | 0 .../V1/GetInterceptDeploymentGroupRequest.php | 0 .../src}/V1/GetInterceptDeploymentRequest.php | 0 ...terceptEndpointGroupAssociationRequest.php | 0 .../V1/GetInterceptEndpointGroupRequest.php | 0 .../V1/GetMirroringDeploymentGroupRequest.php | 0 .../src}/V1/GetMirroringDeploymentRequest.php | 0 ...rroringEndpointGroupAssociationRequest.php | 0 .../V1/GetMirroringEndpointGroupRequest.php | 0 .../V1/GetSecurityProfileGroupRequest.php | 0 .../src}/V1/GetSecurityProfileRequest.php | 0 .../src}/V1/GetTlsInspectionPolicyRequest.php | 0 .../src}/V1/GetUrlListRequest.php | 0 NetworkSecurity/src/V1/GrpcEndpoint.php | 16 +- .../src}/V1/InterceptDeployment.php | 0 .../src}/V1/InterceptDeployment/State.php | 0 .../src}/V1/InterceptDeploymentGroup.php | 0 .../ConnectedEndpointGroup.php | 0 .../InterceptDeploymentGroup/Deployment.php | 0 .../V1/InterceptDeploymentGroup/State.php | 0 .../src}/V1/InterceptEndpointGroup.php | 0 .../AssociationDetails.php | 0 .../ConnectedDeploymentGroup.php | 0 .../src}/V1/InterceptEndpointGroup/State.php | 0 .../V1/InterceptEndpointGroupAssociation.php | 0 .../LocationDetails.php | 0 .../LocationDetails/State.php | 0 .../State.php | 0 .../src}/V1/InterceptLocation.php | 0 .../src}/V1/InterceptLocation/State.php | 0 .../src}/V1/ListAuthzPoliciesRequest.php | 0 .../src}/V1/ListAuthzPoliciesResponse.php | 0 ...istBackendAuthenticationConfigsRequest.php | 0 ...stBackendAuthenticationConfigsResponse.php | 0 .../src}/V1/ListDnsThreatDetectorsRequest.php | 0 .../V1/ListDnsThreatDetectorsResponse.php | 0 ...istFirewallEndpointAssociationsRequest.php | 0 ...stFirewallEndpointAssociationsResponse.php | 0 .../src}/V1/ListFirewallEndpointsRequest.php | 0 .../src}/V1/ListFirewallEndpointsResponse.php | 0 .../V1/ListGatewaySecurityPoliciesRequest.php | 0 .../ListGatewaySecurityPoliciesResponse.php | 0 .../ListGatewaySecurityPolicyRulesRequest.php | 0 ...ListGatewaySecurityPolicyRulesResponse.php | 0 .../ListInterceptDeploymentGroupsRequest.php | 0 .../ListInterceptDeploymentGroupsResponse.php | 0 .../V1/ListInterceptDeploymentsRequest.php | 0 .../V1/ListInterceptDeploymentsResponse.php | 0 ...erceptEndpointGroupAssociationsRequest.php | 0 ...rceptEndpointGroupAssociationsResponse.php | 0 .../V1/ListInterceptEndpointGroupsRequest.php | 0 .../ListInterceptEndpointGroupsResponse.php | 0 .../ListMirroringDeploymentGroupsRequest.php | 0 .../ListMirroringDeploymentGroupsResponse.php | 0 .../V1/ListMirroringDeploymentsRequest.php | 0 .../V1/ListMirroringDeploymentsResponse.php | 0 ...roringEndpointGroupAssociationsRequest.php | 0 ...oringEndpointGroupAssociationsResponse.php | 0 .../V1/ListMirroringEndpointGroupsRequest.php | 0 .../ListMirroringEndpointGroupsResponse.php | 0 .../V1/ListSecurityProfileGroupsRequest.php | 0 .../V1/ListSecurityProfileGroupsResponse.php | 0 .../src}/V1/ListSecurityProfilesRequest.php | 0 .../src}/V1/ListSecurityProfilesResponse.php | 0 .../src/V1/ListServerTlsPoliciesRequest.php | 50 + .../src/V1/ListServerTlsPoliciesResponse.php | 42 + .../V1/ListTlsInspectionPoliciesRequest.php | 0 .../V1/ListTlsInspectionPoliciesResponse.php | 0 .../src}/V1/ListUrlListsRequest.php | 0 .../src}/V1/ListUrlListsResponse.php | 0 .../src}/V1/MirroringDeployment.php | 0 .../src}/V1/MirroringDeployment/State.php | 0 .../src}/V1/MirroringDeploymentGroup.php | 0 .../ConnectedEndpointGroup.php | 0 .../MirroringDeploymentGroup/Deployment.php | 0 .../V1/MirroringDeploymentGroup/State.php | 0 .../src}/V1/MirroringEndpointGroup.php | 0 .../AssociationDetails.php | 0 .../ConnectedDeploymentGroup.php | 0 .../src}/V1/MirroringEndpointGroup/State.php | 0 .../src}/V1/MirroringEndpointGroup/Type.php | 0 .../V1/MirroringEndpointGroupAssociation.php | 0 .../LocationDetails.php | 0 .../LocationDetails/State.php | 0 .../State.php | 0 .../src}/V1/MirroringLocation.php | 0 .../src}/V1/MirroringLocation/State.php | 0 NetworkSecurity/src/V1/OperationMetadata.php | 20 +- .../src}/V1/Protocol.php | 0 .../src}/V1/SecurityProfile.php | 0 .../src}/V1/SecurityProfile/ProfileType.php | 0 .../src}/V1/SecurityProfileGroup.php | 0 NetworkSecurity/src/V1/ServerTlsPolicy.php | 31 +- .../src/V1/ServerTlsPolicy/MTLSPolicy.php | 112 + .../MTLSPolicy/ClientValidationMode.php | 0 .../src}/V1/Severity.php | 0 .../src}/V1/SeverityOverride.php | 0 .../src}/V1/ThreatAction.php | 0 .../src}/V1/ThreatOverride.php | 0 .../src}/V1/ThreatPreventionProfile.php | 0 .../src}/V1/ThreatType.php | 0 .../src}/V1/TlsInspectionPolicy.php | 0 .../src}/V1/TlsInspectionPolicy/Profile.php | 0 .../V1/TlsInspectionPolicy/TlsVersion.php | 0 .../src}/V1/UpdateAuthzPolicyRequest.php | 0 ...dateBackendAuthenticationConfigRequest.php | 0 .../V1/UpdateDnsThreatDetectorRequest.php | 0 ...dateFirewallEndpointAssociationRequest.php | 0 .../src}/V1/UpdateFirewallEndpointRequest.php | 0 .../V1/UpdateGatewaySecurityPolicyRequest.php | 0 ...UpdateGatewaySecurityPolicyRuleRequest.php | 0 .../UpdateInterceptDeploymentGroupRequest.php | 0 .../V1/UpdateInterceptDeploymentRequest.php | 0 ...terceptEndpointGroupAssociationRequest.php | 0 .../UpdateInterceptEndpointGroupRequest.php | 0 .../UpdateMirroringDeploymentGroupRequest.php | 0 .../V1/UpdateMirroringDeploymentRequest.php | 0 ...rroringEndpointGroupAssociationRequest.php | 0 .../UpdateMirroringEndpointGroupRequest.php | 0 .../V1/UpdateSecurityProfileGroupRequest.php | 0 .../src}/V1/UpdateSecurityProfileRequest.php | 0 .../V1/UpdateTlsInspectionPolicyRequest.php | 0 .../src}/V1/UpdateUrlListRequest.php | 0 .../src}/V1/UrlFilter.php | 0 .../src}/V1/UrlFilter/UrlFilteringAction.php | 0 .../src}/V1/UrlFilteringProfile.php | 0 .../src}/V1/UrlList.php | 0 NetworkSecurity/src/V1/gapic_metadata.json | 645 ++ ...dress_group_service_rest_client_config.php | 26 +- ...threat_detector_service_client_config.json | 0 ...eat_detector_service_descriptor_config.php | 0 ...at_detector_service_rest_client_config.php | 0 .../firewall_activation_client_config.json | 0 .../firewall_activation_descriptor_config.php | 0 ...firewall_activation_rest_client_config.php | 0 .../V1/resources/intercept_client_config.json | 0 .../resources/intercept_descriptor_config.php | 0 .../intercept_rest_client_config.php | 0 .../V1/resources/mirroring_client_config.json | 0 .../resources/mirroring_descriptor_config.php | 0 .../mirroring_rest_client_config.php | 0 .../network_security_client_config.json | 150 + .../network_security_descriptor_config.php | 549 ++ .../network_security_rest_client_config.php | 392 +- ...dress_group_service_rest_client_config.php | 26 +- ...y_profile_group_service_client_config.json | 0 ...rofile_group_service_descriptor_config.php | 0 ...ofile_group_service_rest_client_config.php | 0 .../DnsThreatDetectorServiceClientTest.php | 238 +- .../Client/FirewallActivationClientTest.php | 368 +- .../Unit/V1/Client/InterceptClientTest.php | 746 ++- .../Unit/V1/Client/MirroringClientTest.php | 682 +- .../V1/Client/NetworkSecurityClientTest.php | 4270 +++++++++++-- ...nSecurityProfileGroupServiceClientTest.php | 378 +- .../Cloud/Networksecurity/V1/AddressGroup.php | 34 - .../V1/AuthorizationPolicy.php | 28 - .../Networksecurity/V1/ClientTlsPolicy.php | 29 - .../Cloud/Networksecurity/V1/Common.php | 26 - .../Networksecurity/V1/NetworkSecurity.php | 38 - .../Networksecurity/V1/ServerTlsPolicy.php | 29 - .../Google/Cloud/Networksecurity/V1/Tls.php | 25 - .../V1/AddAddressGroupItemsRequest.php | 196 - .../Cloud/NetworkSecurity/V1/AddressGroup.php | 402 -- .../V1/AddressGroup/Purpose.php | 66 - .../NetworkSecurity/V1/AddressGroup/Type.php | 61 - .../V1/AuthorizationPolicy.php | 322 - .../V1/AuthorizationPolicy/Action.php | 63 - .../V1/AuthorizationPolicy/Rule.php | 129 - .../AuthorizationPolicy/Rule/Destination.php | 215 - .../Rule/Destination/HttpHeaderMatch.php | 139 - .../V1/AuthorizationPolicy/Rule/Source.php | 137 - .../V1/CertificateProvider.php | 118 - .../V1/CertificateProviderInstance.php | 78 - .../NetworkSecurity/V1/ClientTlsPolicy.php | 361 -- .../V1/CloneAddressGroupItemsRequest.php | 197 - .../V1/CreateAddressGroupRequest.php | 257 - .../V1/CreateAuthorizationPolicyRequest.php | 183 - .../V1/CreateClientTlsPolicyRequest.php | 183 - .../V1/CreateServerTlsPolicyRequest.php | 183 - .../V1/DeleteAddressGroupRequest.php | 160 - .../V1/DeleteAuthorizationPolicyRequest.php | 86 - .../V1/DeleteClientTlsPolicyRequest.php | 86 - .../V1/DeleteServerTlsPolicyRequest.php | 86 - .../V1/GetAddressGroupRequest.php | 86 - .../V1/GetAuthorizationPolicyRequest.php | 86 - .../V1/GetClientTlsPolicyRequest.php | 86 - .../V1/GetServerTlsPolicyRequest.php | 86 - .../Cloud/NetworkSecurity/V1/GrpcEndpoint.php | 71 - .../V1/ListAddressGroupReferencesRequest.php | 174 - .../V1/ListAddressGroupReferencesResponse.php | 109 - .../AddressGroupReference.php | 135 - .../V1/ListAddressGroupsRequest.php | 209 - .../V1/ListAddressGroupsResponse.php | 143 - .../V1/ListAuthorizationPoliciesRequest.php | 171 - .../V1/ListAuthorizationPoliciesResponse.php | 109 - .../V1/ListClientTlsPoliciesRequest.php | 166 - .../V1/ListClientTlsPoliciesResponse.php | 109 - .../V1/ListServerTlsPoliciesRequest.php | 216 - .../V1/ListServerTlsPoliciesResponse.php | 151 - .../NetworkSecurity/V1/OperationMetadata.php | 307 - .../V1/RemoveAddressGroupItemsRequest.php | 196 - .../NetworkSecurity/V1/ServerTlsPolicy.php | 432 -- .../V1/ServerTlsPolicy/MTLSPolicy.php | 183 - .../V1/UpdateAddressGroupRequest.php | 230 - .../V1/UpdateAuthorizationPolicyRequest.php | 156 - .../V1/UpdateClientTlsPolicyRequest.php | 161 - .../V1/UpdateServerTlsPolicyRequest.php | 161 - .../Cloud/NetworkSecurity/V1/ValidationCA.php | 118 - .../add_address_group_items.php | 92 - .../clone_address_group_items.php | 98 - .../create_address_group.php | 118 - .../delete_address_group.php | 85 - .../get_address_group.php | 76 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_address_group_references.php | 81 - .../list_address_groups.php | 78 - .../list_locations.php | 78 - .../remove_address_group_items.php | 94 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_address_group.php | 96 - .../create_authorization_policy.php | 110 - .../create_client_tls_policy.php | 99 - .../create_server_tls_policy.php | 99 - .../delete_authorization_policy.php | 85 - .../delete_client_tls_policy.php | 85 - .../delete_server_tls_policy.php | 85 - .../get_authorization_policy.php | 76 - .../get_client_tls_policy.php | 76 - .../NetworkSecurityClient/get_iam_policy.php | 72 - .../V1/NetworkSecurityClient/get_location.php | 57 - .../get_server_tls_policy.php | 76 - .../list_authorization_policies.php | 78 - .../list_client_tls_policies.php | 77 - .../NetworkSecurityClient/list_locations.php | 78 - .../list_server_tls_policies.php | 77 - .../NetworkSecurityClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_authorization_policy.php | 92 - .../update_client_tls_policy.php | 85 - .../update_server_tls_policy.php | 85 - .../add_address_group_items.php | 92 - .../clone_address_group_items.php | 98 - .../create_address_group.php | 118 - .../delete_address_group.php | 85 - .../get_address_group.php | 76 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_address_group_references.php | 81 - .../list_address_groups.php | 78 - .../list_locations.php | 78 - .../remove_address_group_items.php | 94 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_address_group.php | 96 - .../V1/Client/AddressGroupServiceClient.php | 791 --- .../src/V1/Client/NetworkSecurityClient.php | 1998 ------ .../OrganizationAddressGroupServiceClient.php | 797 --- .../v1/src/V1/gapic_metadata.json | 921 --- .../address_group_service_client_config.json | 92 - ...ddress_group_service_descriptor_config.php | 275 - ...dress_group_service_rest_client_config.php | 358 -- .../network_security_client_config.json | 282 - .../network_security_descriptor_config.php | 926 --- .../network_security_rest_client_config.php | 799 --- ...n_address_group_service_client_config.json | 92 - ...ddress_group_service_descriptor_config.php | 275 - ...dress_group_service_rest_client_config.php | 358 -- .../Client/AddressGroupServiceClientTest.php | 1528 ----- .../V1/Client/NetworkSecurityClientTest.php | 5477 ----------------- ...anizationAddressGroupServiceClientTest.php | 1528 ----- 519 files changed, 9277 insertions(+), 30363 deletions(-) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/AuthzPolicy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/BackendAuthenticationConfig.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/DnsThreatDetector.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/FirewallActivation.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/GatewaySecurityPolicy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/GatewaySecurityPolicyRule.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/Intercept.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/Mirroring.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/SecurityProfileGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/SecurityProfileGroupIntercept.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/SecurityProfileGroupMirroring.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/SecurityProfileGroupService.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/SecurityProfileGroupThreatprevention.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/SecurityProfileGroupUrlfiltering.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/TlsInspectionPolicy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity => NetworkSecurity/metadata}/V1/UrlList.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/get_location.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/list_locations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/create_firewall_endpoint.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/get_firewall_endpoint.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/get_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/get_location.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/list_firewall_endpoints.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/list_locations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/set_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/test_iam_permissions.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/update_firewall_endpoint.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/create_intercept_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/create_intercept_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/create_intercept_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/delete_intercept_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/delete_intercept_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/delete_intercept_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/get_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/get_intercept_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/get_intercept_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/get_intercept_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/get_location.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/list_intercept_deployment_groups.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/list_intercept_deployments.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/list_intercept_endpoint_groups.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/list_locations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/set_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/test_iam_permissions.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/update_intercept_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/update_intercept_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/update_intercept_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/create_mirroring_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/create_mirroring_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/create_mirroring_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/delete_mirroring_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/delete_mirroring_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/get_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/get_location.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/get_mirroring_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/get_mirroring_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/get_mirroring_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/list_locations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/list_mirroring_deployment_groups.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/list_mirroring_deployments.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/set_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/test_iam_permissions.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/update_mirroring_deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/update_mirroring_deployment_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/update_mirroring_endpoint_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/create_authz_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/create_url_list.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/delete_authz_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/delete_url_list.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/get_authz_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/get_url_list.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/list_authz_policies.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/list_url_lists.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/update_authz_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/NetworkSecurityClient/update_url_list.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AntivirusOverride.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzAction.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/From.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/From/RequestSource.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/HeaderMatch.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/IpBlock.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/Principal.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/RequestResource.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/StringMatch.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/To.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/CustomProvider.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/CustomProvider/AuthzExtension.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/CustomProvider/CloudIap.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/LoadBalancingScheme.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/PolicyProfile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/AuthzPolicy/Target.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/BackendAuthenticationConfig.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/BackendAuthenticationConfig/WellKnownRoots.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/Client/DnsThreatDetectorServiceClient.php (96%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/Client/FirewallActivationClient.php (93%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/Client/InterceptClient.php (92%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/Client/MirroringClient.php (92%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php (92%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateAuthzPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateBackendAuthenticationConfigRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateDnsThreatDetectorRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateFirewallEndpointAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateFirewallEndpointRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateGatewaySecurityPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateGatewaySecurityPolicyRuleRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateInterceptDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateInterceptDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateInterceptEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateInterceptEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateMirroringDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateMirroringDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateMirroringEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateMirroringEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateSecurityProfileGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateSecurityProfileRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateTlsInspectionPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CreateUrlListRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CustomInterceptProfile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/CustomMirroringProfile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteAuthzPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteBackendAuthenticationConfigRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteDnsThreatDetectorRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteFirewallEndpointAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteFirewallEndpointRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteGatewaySecurityPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteGatewaySecurityPolicyRuleRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteInterceptDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteInterceptDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteInterceptEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteInterceptEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteMirroringDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteMirroringDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteMirroringEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteMirroringEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteSecurityProfileGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteSecurityProfileRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteTlsInspectionPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DeleteUrlListRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DnsThreatDetector.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/DnsThreatDetector/Provider.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/FirewallEndpoint.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/FirewallEndpoint/AssociationReference.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/FirewallEndpoint/EndpointSettings.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/FirewallEndpoint/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/FirewallEndpointAssociation.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/FirewallEndpointAssociation/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GatewaySecurityPolicy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GatewaySecurityPolicyRule.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GatewaySecurityPolicyRule/BasicProfile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetAuthzPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetBackendAuthenticationConfigRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetDnsThreatDetectorRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetFirewallEndpointAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetFirewallEndpointRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetGatewaySecurityPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetGatewaySecurityPolicyRuleRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetInterceptDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetInterceptDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetInterceptEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetInterceptEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetMirroringDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetMirroringDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetMirroringEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetMirroringEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetSecurityProfileGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetSecurityProfileRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetTlsInspectionPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/GetUrlListRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptDeployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptDeployment/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptDeploymentGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptDeploymentGroup/Deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptDeploymentGroup/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroup/AssociationDetails.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroup/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroupAssociation.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroupAssociation/LocationDetails.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptEndpointGroupAssociation/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptLocation.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/InterceptLocation/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListAuthzPoliciesRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListAuthzPoliciesResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListBackendAuthenticationConfigsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListBackendAuthenticationConfigsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListDnsThreatDetectorsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListDnsThreatDetectorsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListFirewallEndpointAssociationsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListFirewallEndpointAssociationsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListFirewallEndpointsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListFirewallEndpointsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListGatewaySecurityPoliciesRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListGatewaySecurityPoliciesResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListGatewaySecurityPolicyRulesRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListGatewaySecurityPolicyRulesResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptDeploymentGroupsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptDeploymentGroupsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptDeploymentsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptDeploymentsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptEndpointGroupAssociationsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptEndpointGroupAssociationsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptEndpointGroupsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListInterceptEndpointGroupsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringDeploymentGroupsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringDeploymentGroupsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringDeploymentsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringDeploymentsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringEndpointGroupAssociationsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringEndpointGroupAssociationsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringEndpointGroupsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListMirroringEndpointGroupsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListSecurityProfileGroupsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListSecurityProfileGroupsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListSecurityProfilesRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListSecurityProfilesResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListTlsInspectionPoliciesRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListTlsInspectionPoliciesResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListUrlListsRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ListUrlListsResponse.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringDeployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringDeployment/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringDeploymentGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringDeploymentGroup/Deployment.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringDeploymentGroup/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroup/AssociationDetails.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroup/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroup/Type.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroupAssociation.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroupAssociation/LocationDetails.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringEndpointGroupAssociation/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringLocation.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/MirroringLocation/State.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/Protocol.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/SecurityProfile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/SecurityProfile/ProfileType.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/SecurityProfileGroup.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/Severity.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/SeverityOverride.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ThreatAction.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ThreatOverride.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ThreatPreventionProfile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/ThreatType.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/TlsInspectionPolicy.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/TlsInspectionPolicy/Profile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/TlsInspectionPolicy/TlsVersion.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateAuthzPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateBackendAuthenticationConfigRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateDnsThreatDetectorRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateFirewallEndpointAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateFirewallEndpointRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateGatewaySecurityPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateGatewaySecurityPolicyRuleRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateInterceptDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateInterceptDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateInterceptEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateInterceptEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateMirroringDeploymentGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateMirroringDeploymentRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateMirroringEndpointGroupAssociationRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateMirroringEndpointGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateSecurityProfileGroupRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateSecurityProfileRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateTlsInspectionPolicyRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UpdateUrlListRequest.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UrlFilter.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UrlFilter/UrlFilteringAction.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UrlFilteringProfile.php (100%) rename {owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity => NetworkSecurity/src}/V1/UrlList.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/dns_threat_detector_service_client_config.json (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/dns_threat_detector_service_descriptor_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/dns_threat_detector_service_rest_client_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/firewall_activation_client_config.json (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/firewall_activation_descriptor_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/firewall_activation_rest_client_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/intercept_client_config.json (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/intercept_descriptor_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/intercept_rest_client_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/mirroring_client_config.json (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/mirroring_descriptor_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/mirroring_rest_client_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/organization_security_profile_group_service_client_config.json (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/organization_security_profile_group_service_descriptor_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/src/V1/resources/organization_security_profile_group_service_rest_client_config.php (100%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php (84%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/tests/Unit/V1/Client/FirewallActivationClientTest.php (90%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/tests/Unit/V1/Client/InterceptClientTest.php (88%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/tests/Unit/V1/Client/MirroringClientTest.php (89%) rename {owl-bot-staging/NetworkSecurity/v1 => NetworkSecurity}/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php (89%) delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_location.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_location.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php diff --git a/NetworkSecurity/metadata/V1/AddressGroup.php b/NetworkSecurity/metadata/V1/AddressGroup.php index 0812084e16a6..8c79b85819fd 100644 --- a/NetworkSecurity/metadata/V1/AddressGroup.php +++ b/NetworkSecurity/metadata/V1/AddressGroup.php @@ -17,12 +17,15 @@ public static function initOnce() { \GPBMetadata\Google\Api\Annotations::initOnce(); \GPBMetadata\Google\Api\Client::initOnce(); \GPBMetadata\Google\Api\FieldBehavior::initOnce(); + \GPBMetadata\Google\Api\FieldInfo::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\Common::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xA0B\x0A3google/cloud/networksecurity/v1/address_group.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x06\x0A\x0CAddressGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x05 \x03(\x0B29.google.cloud.networksecurity.v1.AddressGroup.LabelsEntryB\x03\xE0A\x01\x12E\x0A\x04type\x18\x06 \x01(\x0E22.google.cloud.networksecurity.v1.AddressGroup.TypeB\x03\xE0A\x02\x12\x12\x0A\x05items\x18\x07 \x03(\x09B\x03\xE0A\x01\x12\x15\x0A\x08capacity\x18\x08 \x01(\x05B\x03\xE0A\x02\x12\x16\x0A\x09self_link\x18\x09 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x07purpose\x18\x0A \x03(\x0E25.google.cloud.networksecurity.v1.AddressGroup.PurposeB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"0\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04IPV4\x10\x01\x12\x08\x0A\x04IPV6\x10\x02\"@\x0A\x07Purpose\x12\x17\x0A\x13PURPOSE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07DEFAULT\x10\x01\x12\x0F\x0A\x0BCLOUD_ARMOR\x10\x02:\xC9\x01\xEAA\xC5\x01\x0A+networksecurity.googleapis.com/AddressGroup\x12Eprojects/{project}/locations/{location}/addressGroups/{address_group}\x12Oorganizations/{organization}/locations/{location}/addressGroups/{address_group}\"\xA1\x01\x0A\x18ListAddressGroupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12#\x0A\x16return_partial_success\x18\x04 \x01(\x08B\x03\xE0A\x01\"\x90\x01\x0A\x19ListAddressGroupsResponse\x12E\x0A\x0Eaddress_groups\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.AddressGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"[\x0A\x16GetAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\"\xE3\x01\x0A\x19CreateAddressGroupRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+networksecurity.googleapis.com/AddressGroup\x12\x1D\x0A\x10address_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12I\x0A\x0Daddress_group\x18\x03 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xB5\x01\x0A\x19UpdateAddressGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12I\x0A\x0Daddress_group\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"w\x0A\x19DeleteAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A\x1BAddAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x99\x01\x0A\x1ERemoveAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xD7\x01\x0A\x1DCloneAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12Q\x0A\x14source_address_group\x18\x02 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A!ListAddressGroupReferencesRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x9C\x02\x0A\"ListAddressGroupReferencesResponse\x12{\x0A\x18address_group_references\x18\x01 \x03(\x0B2Y.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x1A`\x0A\x15AddressGroupReference\x12\x17\x0A\x0Ffirewall_policy\x18\x01 \x01(\x09\x12\x17\x0A\x0Fsecurity_policy\x18\x04 \x01(\x09\x12\x15\x0A\x0Drule_priority\x18\x02 \x01(\x052\xDA\x13\x0A\x13AddressGroupService\x12\xCE\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"B\xDAA\x06parent\x82\xD3\xE4\x93\x023\x121/v1/{parent=projects/*/locations/*}/addressGroups\x12\xBB\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"@\xDAA\x04name\x82\xD3\xE4\x93\x023\x121/v1/{name=projects/*/locations/*/addressGroups/*}\x12\xA6\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB4\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02B\"1/v1/{parent=projects/*/locations/*}/addressGroups:\x0Daddress_group\x12\xA8\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB6\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02P2?/v1/{address_group.name=projects/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\x9E\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xA8\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02H\"C/v1/{address_group=projects/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xA7\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02K\"F/v1/{address_group=projects/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB3\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02J\"E/v1/{address_group=projects/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\xFF\x01\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x023*1/v1/{name=projects/*/locations/*/addressGroups/*}\x12\x88\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"a\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02K\x12I/v1/{address_group=projects/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platform2\x93\x14\x0A\x1FOrganizationAddressGroupService\x12\xD3\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v1/{parent=organizations/*/locations/*}/addressGroups\x12\xC0\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\xAB\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02G\"6/v1/{parent=organizations/*/locations/*}/addressGroups:\x0Daddress_group\x12\xAD\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xBB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02U2D/v1/{address_group.name=organizations/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\xA3\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAD\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02M\"H/v1/{address_group=organizations/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xAC\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB0\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02P\"K/v1/{address_group=organizations/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB8\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xBE\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02O\"J/v1/{address_group=organizations/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\x84\x02\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\x8D\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"f\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02P\x12N/v1/{address_group=organizations/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDD\x02\x0A#com.google.cloud.networksecurity.v1B\x11AddressGroupProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1\xEAAh\x0A3networksecurity.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}b\x06proto3" + "\x0A\x9DB\x0A3google/cloud/networksecurity/v1/address_group.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x06\x0A\x0CAddressGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x05 \x03(\x0B29.google.cloud.networksecurity.v1.AddressGroup.LabelsEntryB\x03\xE0A\x01\x12E\x0A\x04type\x18\x06 \x01(\x0E22.google.cloud.networksecurity.v1.AddressGroup.TypeB\x03\xE0A\x02\x12\x12\x0A\x05items\x18\x07 \x03(\x09B\x03\xE0A\x01\x12\x15\x0A\x08capacity\x18\x08 \x01(\x05B\x03\xE0A\x02\x12\x16\x0A\x09self_link\x18\x09 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x07purpose\x18\x0A \x03(\x0E25.google.cloud.networksecurity.v1.AddressGroup.PurposeB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"0\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04IPV4\x10\x01\x12\x08\x0A\x04IPV6\x10\x02\"@\x0A\x07Purpose\x12\x17\x0A\x13PURPOSE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07DEFAULT\x10\x01\x12\x0F\x0A\x0BCLOUD_ARMOR\x10\x02:\xC9\x01\xEAA\xC5\x01\x0A+networksecurity.googleapis.com/AddressGroup\x12Eprojects/{project}/locations/{location}/addressGroups/{address_group}\x12Oorganizations/{organization}/locations/{location}/addressGroups/{address_group}\"\xA1\x01\x0A\x18ListAddressGroupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12#\x0A\x16return_partial_success\x18\x04 \x01(\x08B\x03\xE0A\x01\"\x90\x01\x0A\x19ListAddressGroupsResponse\x12E\x0A\x0Eaddress_groups\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.AddressGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"[\x0A\x16GetAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\"\xE3\x01\x0A\x19CreateAddressGroupRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+networksecurity.googleapis.com/AddressGroup\x12\x1D\x0A\x10address_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12I\x0A\x0Daddress_group\x18\x03 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xB5\x01\x0A\x19UpdateAddressGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12I\x0A\x0Daddress_group\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"w\x0A\x19DeleteAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A\x1BAddAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x99\x01\x0A\x1ERemoveAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xD7\x01\x0A\x1DCloneAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12Q\x0A\x14source_address_group\x18\x02 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A!ListAddressGroupReferencesRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x9C\x02\x0A\"ListAddressGroupReferencesResponse\x12{\x0A\x18address_group_references\x18\x01 \x03(\x0B2Y.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x1A`\x0A\x15AddressGroupReference\x12\x17\x0A\x0Ffirewall_policy\x18\x01 \x01(\x09\x12\x17\x0A\x0Fsecurity_policy\x18\x04 \x01(\x09\x12\x15\x0A\x0Drule_priority\x18\x02 \x01(\x052\xDA\x13\x0A\x13AddressGroupService\x12\xCE\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"B\xDAA\x06parent\x82\xD3\xE4\x93\x023\x121/v1/{parent=projects/*/locations/*}/addressGroups\x12\xBB\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"@\xDAA\x04name\x82\xD3\xE4\x93\x023\x121/v1/{name=projects/*/locations/*/addressGroups/*}\x12\xA6\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB4\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02B\"1/v1/{parent=projects/*/locations/*}/addressGroups:\x0Daddress_group\x12\xA8\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB6\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02P2?/v1/{address_group.name=projects/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\x9E\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xA8\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02H\"C/v1/{address_group=projects/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xA7\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02K\"F/v1/{address_group=projects/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB3\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02J\"E/v1/{address_group=projects/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\xFF\x01\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x023*1/v1/{name=projects/*/locations/*/addressGroups/*}\x12\x88\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"a\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02K\x12I/v1/{address_group=projects/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platform2\x93\x14\x0A\x1FOrganizationAddressGroupService\x12\xD3\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v1/{parent=organizations/*/locations/*}/addressGroups\x12\xC0\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\xAB\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02G\"6/v1/{parent=organizations/*/locations/*}/addressGroups:\x0Daddress_group\x12\xAD\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xBB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02U2D/v1/{address_group.name=organizations/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\xA3\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAD\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02M\"H/v1/{address_group=organizations/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xAC\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB0\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02P\"K/v1/{address_group=organizations/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB8\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xBE\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02O\"J/v1/{address_group=organizations/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\x84\x02\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\x8D\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"f\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02P\x12N/v1/{address_group=organizations/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xF2\x01\x0A#com.google.cloud.networksecurity.v1B\x11AddressGroupProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthzPolicy.php b/NetworkSecurity/metadata/V1/AuthzPolicy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthzPolicy.php rename to NetworkSecurity/metadata/V1/AuthzPolicy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/BackendAuthenticationConfig.php b/NetworkSecurity/metadata/V1/BackendAuthenticationConfig.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/BackendAuthenticationConfig.php rename to NetworkSecurity/metadata/V1/BackendAuthenticationConfig.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/DnsThreatDetector.php b/NetworkSecurity/metadata/V1/DnsThreatDetector.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/DnsThreatDetector.php rename to NetworkSecurity/metadata/V1/DnsThreatDetector.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/FirewallActivation.php b/NetworkSecurity/metadata/V1/FirewallActivation.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/FirewallActivation.php rename to NetworkSecurity/metadata/V1/FirewallActivation.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicy.php b/NetworkSecurity/metadata/V1/GatewaySecurityPolicy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicy.php rename to NetworkSecurity/metadata/V1/GatewaySecurityPolicy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicyRule.php b/NetworkSecurity/metadata/V1/GatewaySecurityPolicyRule.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/GatewaySecurityPolicyRule.php rename to NetworkSecurity/metadata/V1/GatewaySecurityPolicyRule.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Intercept.php b/NetworkSecurity/metadata/V1/Intercept.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Intercept.php rename to NetworkSecurity/metadata/V1/Intercept.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Mirroring.php b/NetworkSecurity/metadata/V1/Mirroring.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Mirroring.php rename to NetworkSecurity/metadata/V1/Mirroring.php diff --git a/NetworkSecurity/metadata/V1/NetworkSecurity.php b/NetworkSecurity/metadata/V1/NetworkSecurity.php index fb9fd7fc99b5..df30623dc988 100644 --- a/NetworkSecurity/metadata/V1/NetworkSecurity.php +++ b/NetworkSecurity/metadata/V1/NetworkSecurity.php @@ -17,11 +17,19 @@ public static function initOnce() { \GPBMetadata\Google\Api\Annotations::initOnce(); \GPBMetadata\Google\Api\Client::initOnce(); \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthzPolicy::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\BackendAuthenticationConfig::initOnce(); \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\Common::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicy::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\GatewaySecurityPolicyRule::initOnce(); \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\TlsInspectionPolicy::initOnce(); + \GPBMetadata\Google\Cloud\Networksecurity\V1\UrlList::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xAF%\x0A6google/cloud/networksecurity/v1/network_security.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A:google/cloud/networksecurity/v1/authorization_policy.proto\x1A7google/cloud/networksecurity/v1/client_tls_policy.proto\x1A7google/cloud/networksecurity/v1/server_tls_policy.proto\x1A#google/longrunning/operations.proto2\xFD \x0A\x0FNetworkSecurity\x12\xEE\x01\x0A\x19ListAuthorizationPolicies\x12A.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest\x1AB.google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*}/authorizationPolicies\x12\xD8\x01\x0A\x16GetAuthorizationPolicy\x12>.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest\x1A4.google.cloud.networksecurity.v1.AuthorizationPolicy\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\xD8\x02\x0A\x19CreateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xD8\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA3parent,authorization_policy,authorization_policy_id\x82\xD3\xE4\x93\x02Q\"9/v1/{parent=projects/*/locations/*}/authorizationPolicies:\x14authorization_policy\x12\xDA\x02\x0A\x19UpdateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDA\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA authorization_policy,update_mask\x82\xD3\xE4\x93\x02f2N/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}:\x14authorization_policy\x12\x95\x02\x0A\x19DeleteAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\xDE\x01\x0A\x15ListServerTlsPolicies\x12=.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/serverTlsPolicies\x12\xC8\x01\x0A\x12GetServerTlsPolicy\x12:.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ServerTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,server_tls_policy,server_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serverTlsPolicies:\x11server_tls_policy\x12\xC1\x02\x0A\x15UpdateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dserver_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}:\x11server_tls_policy\x12\x89\x02\x0A\x15DeleteServerTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xDE\x01\x0A\x15ListClientTlsPolicies\x12=.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/clientTlsPolicies\x12\xC8\x01\x0A\x12GetClientTlsPolicy\x12:.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ClientTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,client_tls_policy,client_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/clientTlsPolicies:\x11client_tls_policy\x12\xC1\x02\x0A\x15UpdateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dclient_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}:\x11client_tls_policy\x12\x89\x02\x0A\x15DeleteClientTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDF\x01\x0A#com.google.cloud.networksecurity.v1P\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + "\x0A\xC7k\x0A6google/cloud/networksecurity/v1/network_security.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A:google/cloud/networksecurity/v1/authorization_policy.proto\x1A2google/cloud/networksecurity/v1/authz_policy.proto\x1ACgoogle/cloud/networksecurity/v1/backend_authentication_config.proto\x1A7google/cloud/networksecurity/v1/client_tls_policy.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A=google/cloud/networksecurity/v1/gateway_security_policy.proto\x1ABgoogle/cloud/networksecurity/v1/gateway_security_policy_rule.proto\x1A7google/cloud/networksecurity/v1/server_tls_policy.proto\x1A;google/cloud/networksecurity/v1/tls_inspection_policy.proto\x1A.google/cloud/networksecurity/v1/url_list.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto2\xE1c\x0A\x0FNetworkSecurity\x12\xEE\x01\x0A\x19ListAuthorizationPolicies\x12A.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest\x1AB.google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*}/authorizationPolicies\x12\xD8\x01\x0A\x16GetAuthorizationPolicy\x12>.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest\x1A4.google.cloud.networksecurity.v1.AuthorizationPolicy\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\xD8\x02\x0A\x19CreateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xD8\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA3parent,authorization_policy,authorization_policy_id\x82\xD3\xE4\x93\x02Q\"9/v1/{parent=projects/*/locations/*}/authorizationPolicies:\x14authorization_policy\x12\xDA\x02\x0A\x19UpdateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDA\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA authorization_policy,update_mask\x82\xD3\xE4\x93\x02f2N/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}:\x14authorization_policy\x12\x95\x02\x0A\x19DeleteAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\x8A\x02\x0A ListBackendAuthenticationConfigs\x12H.google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsRequest\x1AI.google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs\x12\xF7\x01\x0A\x1EGetBackendAuthenticationConfig\x12F.google.cloud.networksecurity.v1.GetBackendAuthenticationConfigRequest\x1A<.google.cloud.networksecurity.v1.BackendAuthenticationConfig\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}\x12\x92\x03\x0A!CreateBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.CreateBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x82\x02\xCAAP\x0A\x1BBackendAuthenticationConfig\x121google.cloud.networksecurity.v1.OperationMetadata\xDAAEparent,backend_authentication_config,backend_authentication_config_id\x82\xD3\xE4\x93\x02a\"@/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs:\x1Dbackend_authentication_config\x12\x94\x03\x0A!UpdateBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.UpdateBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x84\x02\xCAAP\x0A\x1BBackendAuthenticationConfig\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA)backend_authentication_config,update_mask\x82\xD3\xE4\x93\x02\x7F2^/v1/{backend_authentication_config.name=projects/*/locations/*/backendAuthenticationConfigs/*}:\x1Dbackend_authentication_config\x12\xAC\x02\x0A!DeleteBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.DeleteBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x9C\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}\x12\xDE\x01\x0A\x15ListServerTlsPolicies\x12=.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/serverTlsPolicies\x12\xC8\x01\x0A\x12GetServerTlsPolicy\x12:.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ServerTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,server_tls_policy,server_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serverTlsPolicies:\x11server_tls_policy\x12\xC1\x02\x0A\x15UpdateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dserver_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}:\x11server_tls_policy\x12\x89\x02\x0A\x15DeleteServerTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xDE\x01\x0A\x15ListClientTlsPolicies\x12=.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/clientTlsPolicies\x12\xC8\x01\x0A\x12GetClientTlsPolicy\x12:.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ClientTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,client_tls_policy,client_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/clientTlsPolicies:\x11client_tls_policy\x12\xC1\x02\x0A\x15UpdateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dclient_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}:\x11client_tls_policy\x12\x89\x02\x0A\x15DeleteClientTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x12\xF6\x01\x0A\x1BListGatewaySecurityPolicies\x12C.google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesRequest\x1AD.google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesResponse\"L\xDAA\x06parent\x82\xD3\xE4\x93\x02=\x12;/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies\x12\xE0\x01\x0A\x18GetGatewaySecurityPolicy\x12@.google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRequest\x1A6.google.cloud.networksecurity.v1.GatewaySecurityPolicy\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=\x12;/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}\x12\xE9\x02\x0A\x1BCreateGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xE5\x01\xCAAJ\x0A\x15GatewaySecurityPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA9parent,gateway_security_policy,gateway_security_policy_id\x82\xD3\xE4\x93\x02V\";/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies:\x17gateway_security_policy\x12\xEB\x02\x0A\x1BUpdateGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xE7\x01\xCAAJ\x0A\x15GatewaySecurityPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA#gateway_security_policy,update_mask\x82\xD3\xE4\x93\x02n2S/v1/{gateway_security_policy.name=projects/*/locations/*/gatewaySecurityPolicies/*}:\x17gateway_security_policy\x12\x9B\x02\x0A\x1BDeleteGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x97\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02=*;/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}\x12\x87\x02\x0A\x1EListGatewaySecurityPolicyRules\x12F.google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesRequest\x1AG.google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12C/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules\x12\xF4\x01\x0A\x1CGetGatewaySecurityPolicyRule\x12D.google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRuleRequest\x1A:.google.cloud.networksecurity.v1.GatewaySecurityPolicyRule\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12C/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}\x12\x8C\x03\x0A\x1FCreateGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x80\x02\xCAAN\x0A\x19GatewaySecurityPolicyRule\x121google.cloud.networksecurity.v1.OperationMetadata\xDAACparent,gateway_security_policy_rule,gateway_security_policy_rule_id\x82\xD3\xE4\x93\x02c\"C/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules:\x1Cgateway_security_policy_rule\x12\x8F\x03\x0A\x1FUpdateGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x83\x02\xCAAN\x0A\x19GatewaySecurityPolicyRule\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA(gateway_security_policy_rule,update_mask\x82\xD3\xE4\x93\x02\x80\x012`/v1/{gateway_security_policy_rule.name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}:\x1Cgateway_security_policy_rule\x12\xAB\x02\x0A\x1FDeleteGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x9F\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02E*C/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}\x12\xBA\x01\x0A\x0CListUrlLists\x124.google.cloud.networksecurity.v1.ListUrlListsRequest\x1A5.google.cloud.networksecurity.v1.ListUrlListsResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/urlLists\x12\xA7\x01\x0A\x0AGetUrlList\x122.google.cloud.networksecurity.v1.GetUrlListRequest\x1A(.google.cloud.networksecurity.v1.UrlList\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/urlLists/*}\x12\x83\x02\x0A\x0DCreateUrlList\x125.google.cloud.networksecurity.v1.CreateUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA<\x0A\x07UrlList\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Bparent,url_list,url_list_id\x82\xD3\xE4\x93\x028\",/v1/{parent=projects/*/locations/*}/urlLists:\x08url_list\x12\x85\x02\x0A\x0DUpdateUrlList\x125.google.cloud.networksecurity.v1.UpdateUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x9D\x01\xCAA<\x0A\x07UrlList\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x14url_list,update_mask\x82\xD3\xE4\x93\x02A25/v1/{url_list.name=projects/*/locations/*/urlLists/*}:\x08url_list\x12\xF0\x01\x0A\x0DDeleteUrlList\x125.google.cloud.networksecurity.v1.DeleteUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x88\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/urlLists/*}\x12\xEE\x01\x0A\x19ListTlsInspectionPolicies\x12A.google.cloud.networksecurity.v1.ListTlsInspectionPoliciesRequest\x1AB.google.cloud.networksecurity.v1.ListTlsInspectionPoliciesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies\x12\xD8\x01\x0A\x16GetTlsInspectionPolicy\x12>.google.cloud.networksecurity.v1.GetTlsInspectionPolicyRequest\x1A4.google.cloud.networksecurity.v1.TlsInspectionPolicy\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}\x12\xDB\x02\x0A\x19CreateTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.CreateTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDB\x01\xCAAH\x0A\x13TlsInspectionPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA5parent,tls_inspection_policy,tls_inspection_policy_id\x82\xD3\xE4\x93\x02R\"9/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies:\x15tls_inspection_policy\x12\xDD\x02\x0A\x19UpdateTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.UpdateTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDD\x01\xCAAH\x0A\x13TlsInspectionPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA!tls_inspection_policy,update_mask\x82\xD3\xE4\x93\x02h2O/v1/{tls_inspection_policy.name=projects/*/locations/*/tlsInspectionPolicies/*}:\x15tls_inspection_policy\x12\x95\x02\x0A\x19DeleteTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.DeleteTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}\x12\xCE\x01\x0A\x11ListAuthzPolicies\x129.google.cloud.networksecurity.v1.ListAuthzPoliciesRequest\x1A:.google.cloud.networksecurity.v1.ListAuthzPoliciesResponse\"B\xDAA\x06parent\x82\xD3\xE4\x93\x023\x121/v1/{parent=projects/*/locations/*}/authzPolicies\x12\xB8\x01\x0A\x0EGetAuthzPolicy\x126.google.cloud.networksecurity.v1.GetAuthzPolicyRequest\x1A,.google.cloud.networksecurity.v1.AuthzPolicy\"@\xDAA\x04name\x82\xD3\xE4\x93\x023\x121/v1/{name=projects/*/locations/*/authzPolicies/*}\x12\xA0\x02\x0A\x11CreateAuthzPolicy\x129.google.cloud.networksecurity.v1.CreateAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xB0\x01\xCAA@\x0A\x0BAuthzPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA#parent,authz_policy,authz_policy_id\x82\xD3\xE4\x93\x02A\"1/v1/{parent=projects/*/locations/*}/authzPolicies:\x0Cauthz_policy\x12\xA2\x02\x0A\x11UpdateAuthzPolicy\x129.google.cloud.networksecurity.v1.UpdateAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xB2\x01\xCAA@\x0A\x0BAuthzPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x18authz_policy,update_mask\x82\xD3\xE4\x93\x02N2>/v1/{authz_policy.name=projects/*/locations/*/authzPolicies/*}:\x0Cauthz_policy\x12\xFD\x01\x0A\x11DeleteAuthzPolicy\x129.google.cloud.networksecurity.v1.DeleteAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x023*1/v1/{name=projects/*/locations/*/authzPolicies/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDF\x01\x0A#com.google.cloud.networksecurity.v1P\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroup.php b/NetworkSecurity/metadata/V1/SecurityProfileGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroup.php rename to NetworkSecurity/metadata/V1/SecurityProfileGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupIntercept.php b/NetworkSecurity/metadata/V1/SecurityProfileGroupIntercept.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupIntercept.php rename to NetworkSecurity/metadata/V1/SecurityProfileGroupIntercept.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupMirroring.php b/NetworkSecurity/metadata/V1/SecurityProfileGroupMirroring.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupMirroring.php rename to NetworkSecurity/metadata/V1/SecurityProfileGroupMirroring.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupService.php b/NetworkSecurity/metadata/V1/SecurityProfileGroupService.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupService.php rename to NetworkSecurity/metadata/V1/SecurityProfileGroupService.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupThreatprevention.php b/NetworkSecurity/metadata/V1/SecurityProfileGroupThreatprevention.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupThreatprevention.php rename to NetworkSecurity/metadata/V1/SecurityProfileGroupThreatprevention.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupUrlfiltering.php b/NetworkSecurity/metadata/V1/SecurityProfileGroupUrlfiltering.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/SecurityProfileGroupUrlfiltering.php rename to NetworkSecurity/metadata/V1/SecurityProfileGroupUrlfiltering.php diff --git a/NetworkSecurity/metadata/V1/ServerTlsPolicy.php b/NetworkSecurity/metadata/V1/ServerTlsPolicy.php index 892c30dc6259..cac87937fa47 100644 --- a/NetworkSecurity/metadata/V1/ServerTlsPolicy.php +++ b/NetworkSecurity/metadata/V1/ServerTlsPolicy.php @@ -20,7 +20,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xFD\x0F\x0A7google/cloud/networksecurity/v1/server_tls_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A)google/cloud/networksecurity/v1/tls.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBA\x05\x0A\x0FServerTlsPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12L\x0A\x06labels\x18\x05 \x03(\x0B2<.google.cloud.networksecurity.v1.ServerTlsPolicy.LabelsEntry\x12\x12\x0A\x0Aallow_open\x18\x06 \x01(\x08\x12P\x0A\x12server_certificate\x18\x07 \x01(\x0B24.google.cloud.networksecurity.v1.CertificateProvider\x12P\x0A\x0Bmtls_policy\x18\x08 \x01(\x0B2;.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy\x1AY\x0A\x0AMTLSPolicy\x12K\x0A\x14client_validation_ca\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.ValidationCA\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x82\x01\xEAA\x7F\x0A.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\"\x80\x01\x0A\x1CListServerTlsPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x87\x01\x0A\x1DListServerTlsPoliciesResponse\x12M\x0A\x13server_tls_policies\x18\x01 \x03(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x19GetServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicy\"\xDB\x01\x0A\x1CCreateServerTlsPolicyRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.networksecurity.googleapis.com/ServerTlsPolicy\x12!\x0A\x14server_tls_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12P\x0A\x11server_tls_policy\x18\x03 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"\xA6\x01\x0A\x1CUpdateServerTlsPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12P\x0A\x11server_tls_policy\x18\x02 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"d\x0A\x1CDeleteServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicyB\xF5\x01\x0A#com.google.cloud.networksecurity.v1B\x14ServerTlsPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" + "\x0A\x84\x13\x0A7google/cloud/networksecurity/v1/server_tls_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A)google/cloud/networksecurity/v1/tls.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x87\x08\x0A\x0FServerTlsPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12L\x0A\x06labels\x18\x05 \x03(\x0B2<.google.cloud.networksecurity.v1.ServerTlsPolicy.LabelsEntry\x12\x12\x0A\x0Aallow_open\x18\x06 \x01(\x08\x12P\x0A\x12server_certificate\x18\x07 \x01(\x0B24.google.cloud.networksecurity.v1.CertificateProvider\x12P\x0A\x0Bmtls_policy\x18\x08 \x01(\x0B2;.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy\x1A\xA5\x03\x0A\x0AMTLSPolicy\x12p\x0A\x16client_validation_mode\x18\x02 \x01(\x0E2P.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode\x12K\x0A\x14client_validation_ca\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.ValidationCA\x12Z\x0A\x1Eclient_validation_trust_config\x18\x04 \x01(\x09B2\xFAA/\x0A-certificatemanager.googleapis.com/TrustConfig\"|\x0A\x14ClientValidationMode\x12&\x0A\"CLIENT_VALIDATION_MODE_UNSPECIFIED\x10\x00\x12(\x0A\$ALLOW_INVALID_OR_MISSING_CLIENT_CERT\x10\x01\x12\x12\x0A\x0EREJECT_INVALID\x10\x02\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x82\x01\xEAA\x7F\x0A.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\"\xA5\x01\x0A\x1CListServerTlsPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12#\x0A\x16return_partial_success\x18\x04 \x01(\x08B\x03\xE0A\x01\"\x9C\x01\x0A\x1DListServerTlsPoliciesResponse\x12M\x0A\x13server_tls_policies\x18\x01 \x03(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"a\x0A\x19GetServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicy\"\xDB\x01\x0A\x1CCreateServerTlsPolicyRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.networksecurity.googleapis.com/ServerTlsPolicy\x12!\x0A\x14server_tls_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12P\x0A\x11server_tls_policy\x18\x03 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"\xA6\x01\x0A\x1CUpdateServerTlsPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12P\x0A\x11server_tls_policy\x18\x02 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"d\x0A\x1CDeleteServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicyB\xF5\x01\x0A#com.google.cloud.networksecurity.v1B\x14ServerTlsPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/TlsInspectionPolicy.php b/NetworkSecurity/metadata/V1/TlsInspectionPolicy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/TlsInspectionPolicy.php rename to NetworkSecurity/metadata/V1/TlsInspectionPolicy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/UrlList.php b/NetworkSecurity/metadata/V1/UrlList.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/UrlList.php rename to NetworkSecurity/metadata/V1/UrlList.php diff --git a/NetworkSecurity/samples/V1/AddressGroupServiceClient/list_locations.php b/NetworkSecurity/samples/V1/AddressGroupServiceClient/list_locations.php index 1daaaef201f6..a9d2723da7a2 100644 --- a/NetworkSecurity/samples/V1/AddressGroupServiceClient/list_locations.php +++ b/NetworkSecurity/samples/V1/AddressGroupServiceClient/list_locations.php @@ -31,6 +31,22 @@ /** * Lists information about the supported locations for this service. + +This method lists locations based on the resource scope provided in +the [ListLocationsRequest.name] field: + +* **Global locations**: If `name` is empty, the method lists the +public locations available to all projects. * **Project-specific +locations**: If `name` follows the format +`projects/{project}`, the method lists locations visible to that +specific project. This includes public, private, or other +project-specific locations enabled for the project. + +For gRPC and client library implementations, the resource name is +passed as the `name` field. For direct service calls, the resource +name is +incorporated into the request path based on the specific service +implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/create_dns_threat_detector.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/delete_dns_threat_detector.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/get_dns_threat_detector.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/get_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_location.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/get_location.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/get_location.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/get_location.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/list_dns_threat_detectors.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_locations.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/list_locations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/list_locations.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/list_locations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/set_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/test_iam_permissions.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php b/NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php rename to NetworkSecurity/samples/V1/DnsThreatDetectorServiceClient/update_dns_threat_detector.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint.php b/NetworkSecurity/samples/V1/FirewallActivationClient/create_firewall_endpoint.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/create_firewall_endpoint.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php b/NetworkSecurity/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/create_firewall_endpoint_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php b/NetworkSecurity/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/delete_firewall_endpoint.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php b/NetworkSecurity/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/delete_firewall_endpoint_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint.php b/NetworkSecurity/samples/V1/FirewallActivationClient/get_firewall_endpoint.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/get_firewall_endpoint.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php b/NetworkSecurity/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/get_firewall_endpoint_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_iam_policy.php b/NetworkSecurity/samples/V1/FirewallActivationClient/get_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_iam_policy.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/get_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_location.php b/NetworkSecurity/samples/V1/FirewallActivationClient/get_location.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/get_location.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/get_location.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php b/NetworkSecurity/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/list_firewall_endpoint_associations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoints.php b/NetworkSecurity/samples/V1/FirewallActivationClient/list_firewall_endpoints.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_firewall_endpoints.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/list_firewall_endpoints.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_locations.php b/NetworkSecurity/samples/V1/FirewallActivationClient/list_locations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/list_locations.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/list_locations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/set_iam_policy.php b/NetworkSecurity/samples/V1/FirewallActivationClient/set_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/set_iam_policy.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/set_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/test_iam_permissions.php b/NetworkSecurity/samples/V1/FirewallActivationClient/test_iam_permissions.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/test_iam_permissions.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/test_iam_permissions.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint.php b/NetworkSecurity/samples/V1/FirewallActivationClient/update_firewall_endpoint.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/update_firewall_endpoint.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php b/NetworkSecurity/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php rename to NetworkSecurity/samples/V1/FirewallActivationClient/update_firewall_endpoint_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment.php b/NetworkSecurity/samples/V1/InterceptClient/create_intercept_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment.php rename to NetworkSecurity/samples/V1/InterceptClient/create_intercept_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment_group.php b/NetworkSecurity/samples/V1/InterceptClient/create_intercept_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_deployment_group.php rename to NetworkSecurity/samples/V1/InterceptClient/create_intercept_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group.php b/NetworkSecurity/samples/V1/InterceptClient/create_intercept_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group.php rename to NetworkSecurity/samples/V1/InterceptClient/create_intercept_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php b/NetworkSecurity/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php rename to NetworkSecurity/samples/V1/InterceptClient/create_intercept_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment.php b/NetworkSecurity/samples/V1/InterceptClient/delete_intercept_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment.php rename to NetworkSecurity/samples/V1/InterceptClient/delete_intercept_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment_group.php b/NetworkSecurity/samples/V1/InterceptClient/delete_intercept_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_deployment_group.php rename to NetworkSecurity/samples/V1/InterceptClient/delete_intercept_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group.php b/NetworkSecurity/samples/V1/InterceptClient/delete_intercept_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group.php rename to NetworkSecurity/samples/V1/InterceptClient/delete_intercept_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php b/NetworkSecurity/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php rename to NetworkSecurity/samples/V1/InterceptClient/delete_intercept_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_iam_policy.php b/NetworkSecurity/samples/V1/InterceptClient/get_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_iam_policy.php rename to NetworkSecurity/samples/V1/InterceptClient/get_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment.php b/NetworkSecurity/samples/V1/InterceptClient/get_intercept_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment.php rename to NetworkSecurity/samples/V1/InterceptClient/get_intercept_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment_group.php b/NetworkSecurity/samples/V1/InterceptClient/get_intercept_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_deployment_group.php rename to NetworkSecurity/samples/V1/InterceptClient/get_intercept_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group.php b/NetworkSecurity/samples/V1/InterceptClient/get_intercept_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group.php rename to NetworkSecurity/samples/V1/InterceptClient/get_intercept_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php b/NetworkSecurity/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php rename to NetworkSecurity/samples/V1/InterceptClient/get_intercept_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_location.php b/NetworkSecurity/samples/V1/InterceptClient/get_location.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/get_location.php rename to NetworkSecurity/samples/V1/InterceptClient/get_location.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployment_groups.php b/NetworkSecurity/samples/V1/InterceptClient/list_intercept_deployment_groups.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployment_groups.php rename to NetworkSecurity/samples/V1/InterceptClient/list_intercept_deployment_groups.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployments.php b/NetworkSecurity/samples/V1/InterceptClient/list_intercept_deployments.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_deployments.php rename to NetworkSecurity/samples/V1/InterceptClient/list_intercept_deployments.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php b/NetworkSecurity/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php rename to NetworkSecurity/samples/V1/InterceptClient/list_intercept_endpoint_group_associations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_groups.php b/NetworkSecurity/samples/V1/InterceptClient/list_intercept_endpoint_groups.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_intercept_endpoint_groups.php rename to NetworkSecurity/samples/V1/InterceptClient/list_intercept_endpoint_groups.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_locations.php b/NetworkSecurity/samples/V1/InterceptClient/list_locations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/list_locations.php rename to NetworkSecurity/samples/V1/InterceptClient/list_locations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/set_iam_policy.php b/NetworkSecurity/samples/V1/InterceptClient/set_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/set_iam_policy.php rename to NetworkSecurity/samples/V1/InterceptClient/set_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/test_iam_permissions.php b/NetworkSecurity/samples/V1/InterceptClient/test_iam_permissions.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/test_iam_permissions.php rename to NetworkSecurity/samples/V1/InterceptClient/test_iam_permissions.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment.php b/NetworkSecurity/samples/V1/InterceptClient/update_intercept_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment.php rename to NetworkSecurity/samples/V1/InterceptClient/update_intercept_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment_group.php b/NetworkSecurity/samples/V1/InterceptClient/update_intercept_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_deployment_group.php rename to NetworkSecurity/samples/V1/InterceptClient/update_intercept_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group.php b/NetworkSecurity/samples/V1/InterceptClient/update_intercept_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group.php rename to NetworkSecurity/samples/V1/InterceptClient/update_intercept_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php b/NetworkSecurity/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php rename to NetworkSecurity/samples/V1/InterceptClient/update_intercept_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment.php b/NetworkSecurity/samples/V1/MirroringClient/create_mirroring_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment.php rename to NetworkSecurity/samples/V1/MirroringClient/create_mirroring_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment_group.php b/NetworkSecurity/samples/V1/MirroringClient/create_mirroring_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_deployment_group.php rename to NetworkSecurity/samples/V1/MirroringClient/create_mirroring_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group.php b/NetworkSecurity/samples/V1/MirroringClient/create_mirroring_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group.php rename to NetworkSecurity/samples/V1/MirroringClient/create_mirroring_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php b/NetworkSecurity/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php rename to NetworkSecurity/samples/V1/MirroringClient/create_mirroring_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment.php b/NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment.php rename to NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment_group.php b/NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_deployment_group.php rename to NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php b/NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php rename to NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php b/NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php rename to NetworkSecurity/samples/V1/MirroringClient/delete_mirroring_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_iam_policy.php b/NetworkSecurity/samples/V1/MirroringClient/get_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_iam_policy.php rename to NetworkSecurity/samples/V1/MirroringClient/get_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_location.php b/NetworkSecurity/samples/V1/MirroringClient/get_location.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_location.php rename to NetworkSecurity/samples/V1/MirroringClient/get_location.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment.php b/NetworkSecurity/samples/V1/MirroringClient/get_mirroring_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment.php rename to NetworkSecurity/samples/V1/MirroringClient/get_mirroring_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment_group.php b/NetworkSecurity/samples/V1/MirroringClient/get_mirroring_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_deployment_group.php rename to NetworkSecurity/samples/V1/MirroringClient/get_mirroring_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group.php b/NetworkSecurity/samples/V1/MirroringClient/get_mirroring_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group.php rename to NetworkSecurity/samples/V1/MirroringClient/get_mirroring_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php b/NetworkSecurity/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php rename to NetworkSecurity/samples/V1/MirroringClient/get_mirroring_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_locations.php b/NetworkSecurity/samples/V1/MirroringClient/list_locations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_locations.php rename to NetworkSecurity/samples/V1/MirroringClient/list_locations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployment_groups.php b/NetworkSecurity/samples/V1/MirroringClient/list_mirroring_deployment_groups.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployment_groups.php rename to NetworkSecurity/samples/V1/MirroringClient/list_mirroring_deployment_groups.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployments.php b/NetworkSecurity/samples/V1/MirroringClient/list_mirroring_deployments.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_deployments.php rename to NetworkSecurity/samples/V1/MirroringClient/list_mirroring_deployments.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php b/NetworkSecurity/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php rename to NetworkSecurity/samples/V1/MirroringClient/list_mirroring_endpoint_group_associations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php b/NetworkSecurity/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php rename to NetworkSecurity/samples/V1/MirroringClient/list_mirroring_endpoint_groups.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/set_iam_policy.php b/NetworkSecurity/samples/V1/MirroringClient/set_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/set_iam_policy.php rename to NetworkSecurity/samples/V1/MirroringClient/set_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/test_iam_permissions.php b/NetworkSecurity/samples/V1/MirroringClient/test_iam_permissions.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/test_iam_permissions.php rename to NetworkSecurity/samples/V1/MirroringClient/test_iam_permissions.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment.php b/NetworkSecurity/samples/V1/MirroringClient/update_mirroring_deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment.php rename to NetworkSecurity/samples/V1/MirroringClient/update_mirroring_deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment_group.php b/NetworkSecurity/samples/V1/MirroringClient/update_mirroring_deployment_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_deployment_group.php rename to NetworkSecurity/samples/V1/MirroringClient/update_mirroring_deployment_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group.php b/NetworkSecurity/samples/V1/MirroringClient/update_mirroring_endpoint_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group.php rename to NetworkSecurity/samples/V1/MirroringClient/update_mirroring_endpoint_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php b/NetworkSecurity/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php rename to NetworkSecurity/samples/V1/MirroringClient/update_mirroring_endpoint_group_association.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authz_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_authz_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authz_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/create_authz_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/create_backend_authentication_config.php diff --git a/NetworkSecurity/samples/V1/NetworkSecurityClient/create_client_tls_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_client_tls_policy.php index b37ab6b62815..01d0de3e9815 100644 --- a/NetworkSecurity/samples/V1/NetworkSecurityClient/create_client_tls_policy.php +++ b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_client_tls_policy.php @@ -36,11 +36,12 @@ * @param string $formattedParent The parent resource of the ClientTlsPolicy. Must be in * the format `projects/*/locations/{location}`. Please see * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param string $clientTlsPolicyId Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". + * @param string $clientTlsPolicyId Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". * @param string $clientTlsPolicyName Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` */ function create_client_tls_policy_sample( string $formattedParent, diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/create_gateway_security_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php diff --git a/NetworkSecurity/samples/V1/NetworkSecurityClient/create_server_tls_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_server_tls_policy.php index a6678ab12382..e9b7cb543e90 100644 --- a/NetworkSecurity/samples/V1/NetworkSecurityClient/create_server_tls_policy.php +++ b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_server_tls_policy.php @@ -36,9 +36,10 @@ * @param string $formattedParent The parent resource of the ServerTlsPolicy. Must be in * the format `projects/*/locations/{location}`. Please see * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param string $serverTlsPolicyId Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". + * @param string $serverTlsPolicyId Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". * @param string $serverTlsPolicyName Name of the ServerTlsPolicy resource. It matches the pattern * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` */ diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_url_list.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/create_url_list.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_url_list.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/create_url_list.php diff --git a/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_authorization_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_authorization_policy.php index 2d3ec68d2401..afd924497083 100644 --- a/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_authorization_policy.php +++ b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_authorization_policy.php @@ -32,8 +32,8 @@ /** * Deletes a single AuthorizationPolicy. * - * @param string $formattedName A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see + * @param string $formattedName A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. */ function delete_authorization_policy_sample(string $formattedName): void diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authz_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_authz_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authz_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/delete_authz_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_url_list.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/delete_url_list.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_url_list.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/delete_url_list.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authz_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/get_authz_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authz_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/get_authz_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/get_backend_authentication_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/get_gateway_security_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_url_list.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/get_url_list.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_url_list.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/get_url_list.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authz_policies.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_authz_policies.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authz_policies.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/list_authz_policies.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/list_gateway_security_policies.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php diff --git a/NetworkSecurity/samples/V1/NetworkSecurityClient/list_locations.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_locations.php index 9befeb7d8b15..0ce4a0c29514 100644 --- a/NetworkSecurity/samples/V1/NetworkSecurityClient/list_locations.php +++ b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_locations.php @@ -31,6 +31,22 @@ /** * Lists information about the supported locations for this service. + +This method lists locations based on the resource scope provided in +the [ListLocationsRequest.name] field: + +* **Global locations**: If `name` is empty, the method lists the +public locations available to all projects. * **Project-specific +locations**: If `name` follows the format +`projects/{project}`, the method lists locations visible to that +specific project. This includes public, private, or other +project-specific locations enabled for the project. + +For gRPC and client library implementations, the resource name is +passed as the `name` field. For direct service calls, the resource +name is +incorporated into the request path based on the specific service +implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_url_lists.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/list_url_lists.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_url_lists.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/list_url_lists.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authz_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_authz_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authz_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/update_authz_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/update_backend_authentication_config.php diff --git a/NetworkSecurity/samples/V1/NetworkSecurityClient/update_client_tls_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_client_tls_policy.php index b0f9eb9c7e8b..60660928b882 100644 --- a/NetworkSecurity/samples/V1/NetworkSecurityClient/update_client_tls_policy.php +++ b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_client_tls_policy.php @@ -34,7 +34,7 @@ * Updates the parameters of a single ClientTlsPolicy. * * @param string $clientTlsPolicyName Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` */ function update_client_tls_policy_sample(string $clientTlsPolicyName): void { diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/update_gateway_security_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_url_list.php b/NetworkSecurity/samples/V1/NetworkSecurityClient/update_url_list.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_url_list.php rename to NetworkSecurity/samples/V1/NetworkSecurityClient/update_url_list.php diff --git a/NetworkSecurity/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php b/NetworkSecurity/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php index fa3cfaea2d74..51c0d23b6fda 100644 --- a/NetworkSecurity/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php +++ b/NetworkSecurity/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php @@ -31,6 +31,22 @@ /** * Lists information about the supported locations for this service. + +This method lists locations based on the resource scope provided in +the [ListLocationsRequest.name] field: + +* **Global locations**: If `name` is empty, the method lists the +public locations available to all projects. * **Project-specific +locations**: If `name` follows the format +`projects/{project}`, the method lists locations visible to that +specific project. This includes public, private, or other +project-specific locations enabled for the project. + +For gRPC and client library implementations, the resource name is +passed as the `name` field. For direct service calls, the resource +name is +incorporated into the request path based on the specific service +implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/create_security_profile_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/delete_security_profile_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_location.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/get_security_profile_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_locations.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profile_groups.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/list_security_profiles.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/set_iam_policy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/test_iam_permissions.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php b/NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php rename to NetworkSecurity/samples/V1/OrganizationSecurityProfileGroupServiceClient/update_security_profile_group.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AntivirusOverride.php b/NetworkSecurity/src/V1/AntivirusOverride.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AntivirusOverride.php rename to NetworkSecurity/src/V1/AntivirusOverride.php diff --git a/NetworkSecurity/src/V1/AuthorizationPolicy.php b/NetworkSecurity/src/V1/AuthorizationPolicy.php index c4a78a5c0f51..d0c6d5e204f1 100644 --- a/NetworkSecurity/src/V1/AuthorizationPolicy.php +++ b/NetworkSecurity/src/V1/AuthorizationPolicy.php @@ -44,7 +44,8 @@ class AuthorizationPolicy extends \Google\Protobuf\Internal\Message */ protected $update_time = null; /** - * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. * * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -57,10 +58,11 @@ class AuthorizationPolicy extends \Google\Protobuf\Internal\Message */ protected $action = 0; /** - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -82,15 +84,17 @@ class AuthorizationPolicy extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Timestamp $update_time * Output only. The timestamp when the resource was updated. * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. * @type int $action * Required. The action to take when a rule match is found. Possible values * are "ALLOW" or "DENY". * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule[] $rules - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. * } */ public function __construct($data = NULL) { @@ -225,7 +229,8 @@ public function setUpdateTime($var) } /** - * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. * * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -236,7 +241,8 @@ public function getLabels() } /** - * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * Optional. Set of label tags associated with the AuthorizationPolicy + * resource. * * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var @@ -279,10 +285,11 @@ public function setAction($var) } /** - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule> @@ -293,10 +300,11 @@ public function getRules() } /** - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. + * Optional. List of rules to match. Note that at least one of the rules must + * match in order for the action specified in the 'action' field to be taken. + * A rule is a match if there is a matching source and destination. If left + * blank, the action specified in the `action` field will be applied on every + * request. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule[] $var diff --git a/NetworkSecurity/src/V1/AuthorizationPolicy/Rule.php b/NetworkSecurity/src/V1/AuthorizationPolicy/Rule.php index 62d95f0e5cda..d4ff5d81975c 100644 --- a/NetworkSecurity/src/V1/AuthorizationPolicy/Rule.php +++ b/NetworkSecurity/src/V1/AuthorizationPolicy/Rule.php @@ -16,18 +16,18 @@ class Rule extends \Google\Protobuf\Internal\Message { /** - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $sources; /** - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the * action specified in the 'action' field will be applied without any rule * checks for the destination. * @@ -42,14 +42,14 @@ class Rule extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source[] $sources - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination[] $destinations - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the * action specified in the 'action' field will be applied without any rule * checks for the destination. * } @@ -60,10 +60,10 @@ public function __construct($data = NULL) { } /** - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source> @@ -74,10 +74,10 @@ public function getSources() } /** - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. + * Optional. List of attributes for the traffic source. All of the sources + * must match. A source is a match if both principals and ip_blocks match. + * If not set, the action specified in the 'action' field will be applied + * without any rule checks for the source. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source[] $var @@ -92,9 +92,9 @@ public function setSources($var) } /** - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the * action specified in the 'action' field will be applied without any rule * checks for the destination. * @@ -107,9 +107,9 @@ public function getDestinations() } /** - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the + * Optional. List of attributes for the traffic destination. All of the + * destinations must match. A destination is a match if a request matches + * all the specified hosts, ports, methods and headers. If not set, the * action specified in the 'action' field will be applied without any rule * checks for the destination. * diff --git a/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Destination.php b/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Destination.php index 92fc3e46847f..f1cb65a10a06 100644 --- a/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Destination.php +++ b/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Destination.php @@ -16,16 +16,17 @@ class Destination extends \Google\Protobuf\Internal\Message { /** - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix * match (example "*.myorg.com") or a presence (any) match "*". * * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; */ private $hosts; /** - * Required. List of destination ports to match. At least one port should match. + * Required. List of destination ports to match. At least one port should + * match. * * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -38,11 +39,11 @@ class Destination extends \Google\Protobuf\Internal\Message */ private $methods; /** - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. * * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -55,21 +56,22 @@ class Destination extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string[] $hosts - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix * match (example "*.myorg.com") or a presence (any) match "*". * @type int[] $ports - * Required. List of destination ports to match. At least one port should match. + * Required. List of destination ports to match. At least one port should + * match. * @type string[] $methods * Optional. A list of HTTP methods to match. At least one method should * match. Should not be set for gRPC services. * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $http_header_match - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. * } */ public function __construct($data = NULL) { @@ -78,9 +80,9 @@ public function __construct($data = NULL) { } /** - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix * match (example "*.myorg.com") or a presence (any) match "*". * * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -92,9 +94,9 @@ public function getHosts() } /** - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix + * Required. List of host names to match. Matched against the ":authority" + * header in http requests. At least one host should match. Each host can + * be an exact match, or a prefix match (example "mydomain.*") or a suffix * match (example "*.myorg.com") or a presence (any) match "*". * * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -110,7 +112,8 @@ public function setHosts($var) } /** - * Required. List of destination ports to match. At least one port should match. + * Required. List of destination ports to match. At least one port should + * match. * * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; * @return RepeatedField @@ -121,7 +124,8 @@ public function getPorts() } /** - * Required. List of destination ports to match. At least one port should match. + * Required. List of destination ports to match. At least one port should + * match. * * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; * @param int[] $var @@ -164,11 +168,11 @@ public function setMethods($var) } /** - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. * * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch|null @@ -189,11 +193,11 @@ public function clearHttpHeaderMatch() } /** - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. + * Optional. Match against key:value pair in http header. Provides a + * flexible match based on HTTP headers, for potentially advanced use + * cases. At least one header should match. Avoid using header matches to + * make authorization decisions unless there is a strong guarantee that + * requests arrive through a trusted client or proxy. * * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $var diff --git a/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Source.php b/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Source.php index 83c8549205aa..5509049c7899 100644 --- a/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Source.php +++ b/NetworkSecurity/src/V1/AuthorizationPolicy/Rule/Source.php @@ -16,9 +16,9 @@ class Source extends \Google\Protobuf\Internal\Message { /** - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, * "{@*}service-account") or a presence match "*". Authorization based on * the principal name without certificate validation (configured by * ServerTlsPolicy resource) is considered insecure. @@ -27,11 +27,11 @@ class Source extends \Google\Protobuf\Internal\Message */ private $principals; /** - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. * * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -44,18 +44,18 @@ class Source extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string[] $principals - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, * "{@*}service-account") or a presence match "*". Authorization based on * the principal name without certificate validation (configured by * ServerTlsPolicy resource) is considered insecure. * @type string[] $ip_blocks - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. * } */ public function __construct($data = NULL) { @@ -64,9 +64,9 @@ public function __construct($data = NULL) { } /** - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, * "{@*}service-account") or a presence match "*". Authorization based on * the principal name without certificate validation (configured by * ServerTlsPolicy resource) is considered insecure. @@ -80,9 +80,9 @@ public function getPrincipals() } /** - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, + * Optional. List of peer identities to match for authorization. At least + * one principal should match. Each peer can be an exact match, or a + * prefix match (example, "namespace/*") or a suffix match (example, * "{@*}service-account") or a presence match "*". Authorization based on * the principal name without certificate validation (configured by * ServerTlsPolicy resource) is considered insecure. @@ -100,11 +100,11 @@ public function setPrincipals($var) } /** - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. * * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return RepeatedField @@ -115,11 +115,11 @@ public function getIpBlocks() } /** - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. + * Optional. List of CIDR ranges to match based on source IP address. At + * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR + * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP + * alone should be avoided. The IP addresses of any load balancers or + * proxies should be considered untrusted. * * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string[] $var diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy.php b/NetworkSecurity/src/V1/AuthzPolicy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy.php rename to NetworkSecurity/src/V1/AuthzPolicy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzAction.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzAction.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzAction.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzAction.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/From.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/From.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From/RequestSource.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/From/RequestSource.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/From/RequestSource.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/From/RequestSource.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/HeaderMatch.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/HeaderMatch.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/HeaderMatch.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/HeaderMatch.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/IpBlock.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/IpBlock.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/IpBlock.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/IpBlock.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/Principal.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/Principal.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/Principal/PrincipalSelector.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/RequestResource.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/RequestResource.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/RequestResource/TagValueIdSet.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/StringMatch.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/StringMatch.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/StringMatch.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/StringMatch.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/BaseProtocolMethodsOption.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/HeaderSet.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCP.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php b/NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php rename to NetworkSecurity/src/V1/AuthzPolicy/AuthzRule/To/RequestOperation/MCPMethod.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider.php b/NetworkSecurity/src/V1/AuthzPolicy/CustomProvider.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider.php rename to NetworkSecurity/src/V1/AuthzPolicy/CustomProvider.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/AuthzExtension.php b/NetworkSecurity/src/V1/AuthzPolicy/CustomProvider/AuthzExtension.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/AuthzExtension.php rename to NetworkSecurity/src/V1/AuthzPolicy/CustomProvider/AuthzExtension.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/CloudIap.php b/NetworkSecurity/src/V1/AuthzPolicy/CustomProvider/CloudIap.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/CustomProvider/CloudIap.php rename to NetworkSecurity/src/V1/AuthzPolicy/CustomProvider/CloudIap.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/LoadBalancingScheme.php b/NetworkSecurity/src/V1/AuthzPolicy/LoadBalancingScheme.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/LoadBalancingScheme.php rename to NetworkSecurity/src/V1/AuthzPolicy/LoadBalancingScheme.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/PolicyProfile.php b/NetworkSecurity/src/V1/AuthzPolicy/PolicyProfile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/PolicyProfile.php rename to NetworkSecurity/src/V1/AuthzPolicy/PolicyProfile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/Target.php b/NetworkSecurity/src/V1/AuthzPolicy/Target.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthzPolicy/Target.php rename to NetworkSecurity/src/V1/AuthzPolicy/Target.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig.php b/NetworkSecurity/src/V1/BackendAuthenticationConfig.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig.php rename to NetworkSecurity/src/V1/BackendAuthenticationConfig.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig/WellKnownRoots.php b/NetworkSecurity/src/V1/BackendAuthenticationConfig/WellKnownRoots.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/BackendAuthenticationConfig/WellKnownRoots.php rename to NetworkSecurity/src/V1/BackendAuthenticationConfig/WellKnownRoots.php diff --git a/NetworkSecurity/src/V1/CertificateProviderInstance.php b/NetworkSecurity/src/V1/CertificateProviderInstance.php index 3cc5970d1ce9..488fad2f1a92 100644 --- a/NetworkSecurity/src/V1/CertificateProviderInstance.php +++ b/NetworkSecurity/src/V1/CertificateProviderInstance.php @@ -19,9 +19,9 @@ class CertificateProviderInstance extends \Google\Protobuf\Internal\Message { /** - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. * * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -34,9 +34,9 @@ class CertificateProviderInstance extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $plugin_instance - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. * } */ public function __construct($data = NULL) { @@ -45,9 +45,9 @@ public function __construct($data = NULL) { } /** - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. * * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -58,9 +58,9 @@ public function getPluginInstance() } /** - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. + * Required. Plugin instance name, used to locate and load CertificateProvider + * instance configuration. Set to "google_cloud_private_spiffe" to use + * Certificate Authority Service certificate provider instance. * * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/NetworkSecurity/src/V1/Client/AddressGroupServiceClient.php b/NetworkSecurity/src/V1/Client/AddressGroupServiceClient.php index 69cbdcb467bb..2970138c021f 100644 --- a/NetworkSecurity/src/V1/Client/AddressGroupServiceClient.php +++ b/NetworkSecurity/src/V1/Client/AddressGroupServiceClient.php @@ -671,6 +671,22 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. * * The async variant is {@see AddressGroupServiceClient::listLocationsAsync()} . * diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/DnsThreatDetectorServiceClient.php b/NetworkSecurity/src/V1/Client/DnsThreatDetectorServiceClient.php similarity index 96% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/Client/DnsThreatDetectorServiceClient.php rename to NetworkSecurity/src/V1/Client/DnsThreatDetectorServiceClient.php index bb27439d6ffc..b131aab53609 100644 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/DnsThreatDetectorServiceClient.php +++ b/NetworkSecurity/src/V1/Client/DnsThreatDetectorServiceClient.php @@ -98,9 +98,7 @@ final class DnsThreatDetectorServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private static function getClientDefaults() { @@ -115,7 +113,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/dns_threat_detector_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/dns_threat_detector_service_rest_client_config.php', ], ], ]; @@ -307,8 +306,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function createDnsThreatDetector(CreateDnsThreatDetectorRequest $request, array $callOptions = []): DnsThreatDetector - { + public function createDnsThreatDetector( + CreateDnsThreatDetectorRequest $request, + array $callOptions = [] + ): DnsThreatDetector { return $this->startApiCall('CreateDnsThreatDetector', $request, $callOptions)->wait(); } @@ -359,8 +360,10 @@ public function deleteDnsThreatDetector(DeleteDnsThreatDetectorRequest $request, * * @throws ApiException Thrown if the API call fails. */ - public function getDnsThreatDetector(GetDnsThreatDetectorRequest $request, array $callOptions = []): DnsThreatDetector - { + public function getDnsThreatDetector( + GetDnsThreatDetectorRequest $request, + array $callOptions = [] + ): DnsThreatDetector { return $this->startApiCall('GetDnsThreatDetector', $request, $callOptions)->wait(); } @@ -386,8 +389,10 @@ public function getDnsThreatDetector(GetDnsThreatDetectorRequest $request, array * * @throws ApiException Thrown if the API call fails. */ - public function listDnsThreatDetectors(ListDnsThreatDetectorsRequest $request, array $callOptions = []): PagedListResponse - { + public function listDnsThreatDetectors( + ListDnsThreatDetectorsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListDnsThreatDetectors', $request, $callOptions); } @@ -413,8 +418,10 @@ public function listDnsThreatDetectors(ListDnsThreatDetectorsRequest $request, a * * @throws ApiException Thrown if the API call fails. */ - public function updateDnsThreatDetector(UpdateDnsThreatDetectorRequest $request, array $callOptions = []): DnsThreatDetector - { + public function updateDnsThreatDetector( + UpdateDnsThreatDetectorRequest $request, + array $callOptions = [] + ): DnsThreatDetector { return $this->startApiCall('UpdateDnsThreatDetector', $request, $callOptions)->wait(); } @@ -574,8 +581,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = * * @throws ApiException Thrown if the API call fails. */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { + public function testIamPermissions( + TestIamPermissionsRequest $request, + array $callOptions = [] + ): TestIamPermissionsResponse { return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); } } diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/FirewallActivationClient.php b/NetworkSecurity/src/V1/Client/FirewallActivationClient.php similarity index 93% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/Client/FirewallActivationClient.php rename to NetworkSecurity/src/V1/Client/FirewallActivationClient.php index 33d819fdd7ca..5ec09e419473 100644 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/FirewallActivationClient.php +++ b/NetworkSecurity/src/V1/Client/FirewallActivationClient.php @@ -112,9 +112,7 @@ final class FirewallActivationClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; @@ -195,8 +193,11 @@ private function createOperationsClient(array $options) * * @return string The formatted firewall_endpoint resource. */ - public static function firewallEndpointName(string $organization, string $location, string $firewallEndpoint): string - { + public static function firewallEndpointName( + string $organization, + string $location, + string $firewallEndpoint + ): string { return self::getPathTemplate('firewallEndpoint')->render([ 'organization' => $organization, 'location' => $location, @@ -214,8 +215,11 @@ public static function firewallEndpointName(string $organization, string $locati * * @return string The formatted firewall_endpoint_association resource. */ - public static function firewallEndpointAssociationName(string $project, string $location, string $firewallEndpointAssociation): string - { + public static function firewallEndpointAssociationName( + string $project, + string $location, + string $firewallEndpointAssociation + ): string { return self::getPathTemplate('firewallEndpointAssociation')->render([ 'project' => $project, 'location' => $location, @@ -284,8 +288,11 @@ public static function organizationLocationName(string $organization, string $lo * * @return string The formatted organization_location_firewall_endpoint resource. */ - public static function organizationLocationFirewallEndpointName(string $organization, string $location, string $firewallEndpoint): string - { + public static function organizationLocationFirewallEndpointName( + string $organization, + string $location, + string $firewallEndpoint + ): string { return self::getPathTemplate('organizationLocationFirewallEndpoint')->render([ 'organization' => $organization, 'location' => $location, @@ -303,8 +310,11 @@ public static function organizationLocationFirewallEndpointName(string $organiza * * @return string The formatted project_location_firewall_endpoint resource. */ - public static function projectLocationFirewallEndpointName(string $project, string $location, string $firewallEndpoint): string - { + public static function projectLocationFirewallEndpointName( + string $project, + string $location, + string $firewallEndpoint + ): string { return self::getPathTemplate('projectLocationFirewallEndpoint')->render([ 'project' => $project, 'location' => $location, @@ -322,8 +332,11 @@ public static function projectLocationFirewallEndpointName(string $project, stri * * @return string The formatted tls_inspection_policy resource. */ - public static function tlsInspectionPolicyName(string $project, string $location, string $tlsInspectionPolicy): string - { + public static function tlsInspectionPolicyName( + string $project, + string $location, + string $tlsInspectionPolicy + ): string { return self::getPathTemplate('tlsInspectionPolicy')->render([ 'project' => $project, 'location' => $location, @@ -470,8 +483,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function createFirewallEndpoint(CreateFirewallEndpointRequest $request, array $callOptions = []): OperationResponse - { + public function createFirewallEndpoint( + CreateFirewallEndpointRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateFirewallEndpoint', $request, $callOptions)->wait(); } @@ -497,8 +512,10 @@ public function createFirewallEndpoint(CreateFirewallEndpointRequest $request, a * * @throws ApiException Thrown if the API call fails. */ - public function createFirewallEndpointAssociation(CreateFirewallEndpointAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function createFirewallEndpointAssociation( + CreateFirewallEndpointAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateFirewallEndpointAssociation', $request, $callOptions)->wait(); } @@ -524,8 +541,10 @@ public function createFirewallEndpointAssociation(CreateFirewallEndpointAssociat * * @throws ApiException Thrown if the API call fails. */ - public function deleteFirewallEndpoint(DeleteFirewallEndpointRequest $request, array $callOptions = []): OperationResponse - { + public function deleteFirewallEndpoint( + DeleteFirewallEndpointRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteFirewallEndpoint', $request, $callOptions)->wait(); } @@ -551,8 +570,10 @@ public function deleteFirewallEndpoint(DeleteFirewallEndpointRequest $request, a * * @throws ApiException Thrown if the API call fails. */ - public function deleteFirewallEndpointAssociation(DeleteFirewallEndpointAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function deleteFirewallEndpointAssociation( + DeleteFirewallEndpointAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteFirewallEndpointAssociation', $request, $callOptions)->wait(); } @@ -605,8 +626,10 @@ public function getFirewallEndpoint(GetFirewallEndpointRequest $request, array $ * * @throws ApiException Thrown if the API call fails. */ - public function getFirewallEndpointAssociation(GetFirewallEndpointAssociationRequest $request, array $callOptions = []): FirewallEndpointAssociation - { + public function getFirewallEndpointAssociation( + GetFirewallEndpointAssociationRequest $request, + array $callOptions = [] + ): FirewallEndpointAssociation { return $this->startApiCall('GetFirewallEndpointAssociation', $request, $callOptions)->wait(); } @@ -632,8 +655,10 @@ public function getFirewallEndpointAssociation(GetFirewallEndpointAssociationReq * * @throws ApiException Thrown if the API call fails. */ - public function listFirewallEndpointAssociations(ListFirewallEndpointAssociationsRequest $request, array $callOptions = []): PagedListResponse - { + public function listFirewallEndpointAssociations( + ListFirewallEndpointAssociationsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListFirewallEndpointAssociations', $request, $callOptions); } @@ -659,8 +684,10 @@ public function listFirewallEndpointAssociations(ListFirewallEndpointAssociation * * @throws ApiException Thrown if the API call fails. */ - public function listFirewallEndpoints(ListFirewallEndpointsRequest $request, array $callOptions = []): PagedListResponse - { + public function listFirewallEndpoints( + ListFirewallEndpointsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListFirewallEndpoints', $request, $callOptions); } @@ -686,8 +713,10 @@ public function listFirewallEndpoints(ListFirewallEndpointsRequest $request, arr * * @throws ApiException Thrown if the API call fails. */ - public function updateFirewallEndpoint(UpdateFirewallEndpointRequest $request, array $callOptions = []): OperationResponse - { + public function updateFirewallEndpoint( + UpdateFirewallEndpointRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateFirewallEndpoint', $request, $callOptions)->wait(); } @@ -713,8 +742,10 @@ public function updateFirewallEndpoint(UpdateFirewallEndpointRequest $request, a * * @throws ApiException Thrown if the API call fails. */ - public function updateFirewallEndpointAssociation(UpdateFirewallEndpointAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function updateFirewallEndpointAssociation( + UpdateFirewallEndpointAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateFirewallEndpointAssociation', $request, $callOptions)->wait(); } @@ -871,8 +902,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = * * @throws ApiException Thrown if the API call fails. */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { + public function testIamPermissions( + TestIamPermissionsRequest $request, + array $callOptions = [] + ): TestIamPermissionsResponse { return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); } } diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/InterceptClient.php b/NetworkSecurity/src/V1/Client/InterceptClient.php similarity index 92% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/Client/InterceptClient.php rename to NetworkSecurity/src/V1/Client/InterceptClient.php index 6bf3eb069cfa..ae3cb495ea73 100644 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/InterceptClient.php +++ b/NetworkSecurity/src/V1/Client/InterceptClient.php @@ -135,9 +135,7 @@ final class InterceptClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; @@ -235,8 +233,11 @@ public static function forwardingRuleName(string $project, string $forwardingRul * * @return string The formatted intercept_deployment resource. */ - public static function interceptDeploymentName(string $project, string $location, string $interceptDeployment): string - { + public static function interceptDeploymentName( + string $project, + string $location, + string $interceptDeployment + ): string { return self::getPathTemplate('interceptDeployment')->render([ 'project' => $project, 'location' => $location, @@ -254,8 +255,11 @@ public static function interceptDeploymentName(string $project, string $location * * @return string The formatted intercept_deployment_group resource. */ - public static function interceptDeploymentGroupName(string $project, string $location, string $interceptDeploymentGroup): string - { + public static function interceptDeploymentGroupName( + string $project, + string $location, + string $interceptDeploymentGroup + ): string { return self::getPathTemplate('interceptDeploymentGroup')->render([ 'project' => $project, 'location' => $location, @@ -273,8 +277,11 @@ public static function interceptDeploymentGroupName(string $project, string $loc * * @return string The formatted intercept_endpoint_group resource. */ - public static function interceptEndpointGroupName(string $project, string $location, string $interceptEndpointGroup): string - { + public static function interceptEndpointGroupName( + string $project, + string $location, + string $interceptEndpointGroup + ): string { return self::getPathTemplate('interceptEndpointGroup')->render([ 'project' => $project, 'location' => $location, @@ -292,8 +299,11 @@ public static function interceptEndpointGroupName(string $project, string $locat * * @return string The formatted intercept_endpoint_group_association resource. */ - public static function interceptEndpointGroupAssociationName(string $project, string $location, string $interceptEndpointGroupAssociation): string - { + public static function interceptEndpointGroupAssociationName( + string $project, + string $location, + string $interceptEndpointGroupAssociation + ): string { return self::getPathTemplate('interceptEndpointGroupAssociation')->render([ 'project' => $project, 'location' => $location, @@ -473,8 +483,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function createInterceptDeployment(CreateInterceptDeploymentRequest $request, array $callOptions = []): OperationResponse - { + public function createInterceptDeployment( + CreateInterceptDeploymentRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateInterceptDeployment', $request, $callOptions)->wait(); } @@ -501,8 +513,10 @@ public function createInterceptDeployment(CreateInterceptDeploymentRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function createInterceptDeploymentGroup(CreateInterceptDeploymentGroupRequest $request, array $callOptions = []): OperationResponse - { + public function createInterceptDeploymentGroup( + CreateInterceptDeploymentGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateInterceptDeploymentGroup', $request, $callOptions)->wait(); } @@ -529,8 +543,10 @@ public function createInterceptDeploymentGroup(CreateInterceptDeploymentGroupReq * * @throws ApiException Thrown if the API call fails. */ - public function createInterceptEndpointGroup(CreateInterceptEndpointGroupRequest $request, array $callOptions = []): OperationResponse - { + public function createInterceptEndpointGroup( + CreateInterceptEndpointGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateInterceptEndpointGroup', $request, $callOptions)->wait(); } @@ -557,8 +573,10 @@ public function createInterceptEndpointGroup(CreateInterceptEndpointGroupRequest * * @throws ApiException Thrown if the API call fails. */ - public function createInterceptEndpointGroupAssociation(CreateInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function createInterceptEndpointGroupAssociation( + CreateInterceptEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -584,8 +602,10 @@ public function createInterceptEndpointGroupAssociation(CreateInterceptEndpointG * * @throws ApiException Thrown if the API call fails. */ - public function deleteInterceptDeployment(DeleteInterceptDeploymentRequest $request, array $callOptions = []): OperationResponse - { + public function deleteInterceptDeployment( + DeleteInterceptDeploymentRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteInterceptDeployment', $request, $callOptions)->wait(); } @@ -612,8 +632,10 @@ public function deleteInterceptDeployment(DeleteInterceptDeploymentRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function deleteInterceptDeploymentGroup(DeleteInterceptDeploymentGroupRequest $request, array $callOptions = []): OperationResponse - { + public function deleteInterceptDeploymentGroup( + DeleteInterceptDeploymentGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteInterceptDeploymentGroup', $request, $callOptions)->wait(); } @@ -640,8 +662,10 @@ public function deleteInterceptDeploymentGroup(DeleteInterceptDeploymentGroupReq * * @throws ApiException Thrown if the API call fails. */ - public function deleteInterceptEndpointGroup(DeleteInterceptEndpointGroupRequest $request, array $callOptions = []): OperationResponse - { + public function deleteInterceptEndpointGroup( + DeleteInterceptEndpointGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteInterceptEndpointGroup', $request, $callOptions)->wait(); } @@ -668,8 +692,10 @@ public function deleteInterceptEndpointGroup(DeleteInterceptEndpointGroupRequest * * @throws ApiException Thrown if the API call fails. */ - public function deleteInterceptEndpointGroupAssociation(DeleteInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function deleteInterceptEndpointGroupAssociation( + DeleteInterceptEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -695,8 +721,10 @@ public function deleteInterceptEndpointGroupAssociation(DeleteInterceptEndpointG * * @throws ApiException Thrown if the API call fails. */ - public function getInterceptDeployment(GetInterceptDeploymentRequest $request, array $callOptions = []): InterceptDeployment - { + public function getInterceptDeployment( + GetInterceptDeploymentRequest $request, + array $callOptions = [] + ): InterceptDeployment { return $this->startApiCall('GetInterceptDeployment', $request, $callOptions)->wait(); } @@ -723,8 +751,10 @@ public function getInterceptDeployment(GetInterceptDeploymentRequest $request, a * * @throws ApiException Thrown if the API call fails. */ - public function getInterceptDeploymentGroup(GetInterceptDeploymentGroupRequest $request, array $callOptions = []): InterceptDeploymentGroup - { + public function getInterceptDeploymentGroup( + GetInterceptDeploymentGroupRequest $request, + array $callOptions = [] + ): InterceptDeploymentGroup { return $this->startApiCall('GetInterceptDeploymentGroup', $request, $callOptions)->wait(); } @@ -750,8 +780,10 @@ public function getInterceptDeploymentGroup(GetInterceptDeploymentGroupRequest $ * * @throws ApiException Thrown if the API call fails. */ - public function getInterceptEndpointGroup(GetInterceptEndpointGroupRequest $request, array $callOptions = []): InterceptEndpointGroup - { + public function getInterceptEndpointGroup( + GetInterceptEndpointGroupRequest $request, + array $callOptions = [] + ): InterceptEndpointGroup { return $this->startApiCall('GetInterceptEndpointGroup', $request, $callOptions)->wait(); } @@ -778,8 +810,10 @@ public function getInterceptEndpointGroup(GetInterceptEndpointGroupRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function getInterceptEndpointGroupAssociation(GetInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): InterceptEndpointGroupAssociation - { + public function getInterceptEndpointGroupAssociation( + GetInterceptEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): InterceptEndpointGroupAssociation { return $this->startApiCall('GetInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -806,8 +840,10 @@ public function getInterceptEndpointGroupAssociation(GetInterceptEndpointGroupAs * * @throws ApiException Thrown if the API call fails. */ - public function listInterceptDeploymentGroups(ListInterceptDeploymentGroupsRequest $request, array $callOptions = []): PagedListResponse - { + public function listInterceptDeploymentGroups( + ListInterceptDeploymentGroupsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListInterceptDeploymentGroups', $request, $callOptions); } @@ -833,8 +869,10 @@ public function listInterceptDeploymentGroups(ListInterceptDeploymentGroupsReque * * @throws ApiException Thrown if the API call fails. */ - public function listInterceptDeployments(ListInterceptDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { + public function listInterceptDeployments( + ListInterceptDeploymentsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListInterceptDeployments', $request, $callOptions); } @@ -861,8 +899,10 @@ public function listInterceptDeployments(ListInterceptDeploymentsRequest $reques * * @throws ApiException Thrown if the API call fails. */ - public function listInterceptEndpointGroupAssociations(ListInterceptEndpointGroupAssociationsRequest $request, array $callOptions = []): PagedListResponse - { + public function listInterceptEndpointGroupAssociations( + ListInterceptEndpointGroupAssociationsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListInterceptEndpointGroupAssociations', $request, $callOptions); } @@ -889,8 +929,10 @@ public function listInterceptEndpointGroupAssociations(ListInterceptEndpointGrou * * @throws ApiException Thrown if the API call fails. */ - public function listInterceptEndpointGroups(ListInterceptEndpointGroupsRequest $request, array $callOptions = []): PagedListResponse - { + public function listInterceptEndpointGroups( + ListInterceptEndpointGroupsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListInterceptEndpointGroups', $request, $callOptions); } @@ -916,8 +958,10 @@ public function listInterceptEndpointGroups(ListInterceptEndpointGroupsRequest $ * * @throws ApiException Thrown if the API call fails. */ - public function updateInterceptDeployment(UpdateInterceptDeploymentRequest $request, array $callOptions = []): OperationResponse - { + public function updateInterceptDeployment( + UpdateInterceptDeploymentRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateInterceptDeployment', $request, $callOptions)->wait(); } @@ -944,8 +988,10 @@ public function updateInterceptDeployment(UpdateInterceptDeploymentRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function updateInterceptDeploymentGroup(UpdateInterceptDeploymentGroupRequest $request, array $callOptions = []): OperationResponse - { + public function updateInterceptDeploymentGroup( + UpdateInterceptDeploymentGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateInterceptDeploymentGroup', $request, $callOptions)->wait(); } @@ -972,8 +1018,10 @@ public function updateInterceptDeploymentGroup(UpdateInterceptDeploymentGroupReq * * @throws ApiException Thrown if the API call fails. */ - public function updateInterceptEndpointGroup(UpdateInterceptEndpointGroupRequest $request, array $callOptions = []): OperationResponse - { + public function updateInterceptEndpointGroup( + UpdateInterceptEndpointGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateInterceptEndpointGroup', $request, $callOptions)->wait(); } @@ -1000,8 +1048,10 @@ public function updateInterceptEndpointGroup(UpdateInterceptEndpointGroupRequest * * @throws ApiException Thrown if the API call fails. */ - public function updateInterceptEndpointGroupAssociation(UpdateInterceptEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function updateInterceptEndpointGroupAssociation( + UpdateInterceptEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateInterceptEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -1157,8 +1207,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = * * @throws ApiException Thrown if the API call fails. */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { + public function testIamPermissions( + TestIamPermissionsRequest $request, + array $callOptions = [] + ): TestIamPermissionsResponse { return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); } } diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/MirroringClient.php b/NetworkSecurity/src/V1/Client/MirroringClient.php similarity index 92% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/Client/MirroringClient.php rename to NetworkSecurity/src/V1/Client/MirroringClient.php index 9433a961c37a..26b47408a46a 100644 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/MirroringClient.php +++ b/NetworkSecurity/src/V1/Client/MirroringClient.php @@ -134,9 +134,7 @@ final class MirroringClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; @@ -251,8 +249,11 @@ public static function locationName(string $project, string $location): string * * @return string The formatted mirroring_deployment resource. */ - public static function mirroringDeploymentName(string $project, string $location, string $mirroringDeployment): string - { + public static function mirroringDeploymentName( + string $project, + string $location, + string $mirroringDeployment + ): string { return self::getPathTemplate('mirroringDeployment')->render([ 'project' => $project, 'location' => $location, @@ -270,8 +271,11 @@ public static function mirroringDeploymentName(string $project, string $location * * @return string The formatted mirroring_deployment_group resource. */ - public static function mirroringDeploymentGroupName(string $project, string $location, string $mirroringDeploymentGroup): string - { + public static function mirroringDeploymentGroupName( + string $project, + string $location, + string $mirroringDeploymentGroup + ): string { return self::getPathTemplate('mirroringDeploymentGroup')->render([ 'project' => $project, 'location' => $location, @@ -289,8 +293,11 @@ public static function mirroringDeploymentGroupName(string $project, string $loc * * @return string The formatted mirroring_endpoint_group resource. */ - public static function mirroringEndpointGroupName(string $project, string $location, string $mirroringEndpointGroup): string - { + public static function mirroringEndpointGroupName( + string $project, + string $location, + string $mirroringEndpointGroup + ): string { return self::getPathTemplate('mirroringEndpointGroup')->render([ 'project' => $project, 'location' => $location, @@ -308,8 +315,11 @@ public static function mirroringEndpointGroupName(string $project, string $locat * * @return string The formatted mirroring_endpoint_group_association resource. */ - public static function mirroringEndpointGroupAssociationName(string $project, string $location, string $mirroringEndpointGroupAssociation): string - { + public static function mirroringEndpointGroupAssociationName( + string $project, + string $location, + string $mirroringEndpointGroupAssociation + ): string { return self::getPathTemplate('mirroringEndpointGroupAssociation')->render([ 'project' => $project, 'location' => $location, @@ -472,8 +482,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function createMirroringDeployment(CreateMirroringDeploymentRequest $request, array $callOptions = []): OperationResponse - { + public function createMirroringDeployment( + CreateMirroringDeploymentRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateMirroringDeployment', $request, $callOptions)->wait(); } @@ -500,8 +512,10 @@ public function createMirroringDeployment(CreateMirroringDeploymentRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function createMirroringDeploymentGroup(CreateMirroringDeploymentGroupRequest $request, array $callOptions = []): OperationResponse - { + public function createMirroringDeploymentGroup( + CreateMirroringDeploymentGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateMirroringDeploymentGroup', $request, $callOptions)->wait(); } @@ -528,8 +542,10 @@ public function createMirroringDeploymentGroup(CreateMirroringDeploymentGroupReq * * @throws ApiException Thrown if the API call fails. */ - public function createMirroringEndpointGroup(CreateMirroringEndpointGroupRequest $request, array $callOptions = []): OperationResponse - { + public function createMirroringEndpointGroup( + CreateMirroringEndpointGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateMirroringEndpointGroup', $request, $callOptions)->wait(); } @@ -556,8 +572,10 @@ public function createMirroringEndpointGroup(CreateMirroringEndpointGroupRequest * * @throws ApiException Thrown if the API call fails. */ - public function createMirroringEndpointGroupAssociation(CreateMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function createMirroringEndpointGroupAssociation( + CreateMirroringEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -583,8 +601,10 @@ public function createMirroringEndpointGroupAssociation(CreateMirroringEndpointG * * @throws ApiException Thrown if the API call fails. */ - public function deleteMirroringDeployment(DeleteMirroringDeploymentRequest $request, array $callOptions = []): OperationResponse - { + public function deleteMirroringDeployment( + DeleteMirroringDeploymentRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteMirroringDeployment', $request, $callOptions)->wait(); } @@ -611,8 +631,10 @@ public function deleteMirroringDeployment(DeleteMirroringDeploymentRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function deleteMirroringDeploymentGroup(DeleteMirroringDeploymentGroupRequest $request, array $callOptions = []): OperationResponse - { + public function deleteMirroringDeploymentGroup( + DeleteMirroringDeploymentGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteMirroringDeploymentGroup', $request, $callOptions)->wait(); } @@ -639,8 +661,10 @@ public function deleteMirroringDeploymentGroup(DeleteMirroringDeploymentGroupReq * * @throws ApiException Thrown if the API call fails. */ - public function deleteMirroringEndpointGroup(DeleteMirroringEndpointGroupRequest $request, array $callOptions = []): OperationResponse - { + public function deleteMirroringEndpointGroup( + DeleteMirroringEndpointGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteMirroringEndpointGroup', $request, $callOptions)->wait(); } @@ -667,8 +691,10 @@ public function deleteMirroringEndpointGroup(DeleteMirroringEndpointGroupRequest * * @throws ApiException Thrown if the API call fails. */ - public function deleteMirroringEndpointGroupAssociation(DeleteMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function deleteMirroringEndpointGroupAssociation( + DeleteMirroringEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -694,8 +720,10 @@ public function deleteMirroringEndpointGroupAssociation(DeleteMirroringEndpointG * * @throws ApiException Thrown if the API call fails. */ - public function getMirroringDeployment(GetMirroringDeploymentRequest $request, array $callOptions = []): MirroringDeployment - { + public function getMirroringDeployment( + GetMirroringDeploymentRequest $request, + array $callOptions = [] + ): MirroringDeployment { return $this->startApiCall('GetMirroringDeployment', $request, $callOptions)->wait(); } @@ -722,8 +750,10 @@ public function getMirroringDeployment(GetMirroringDeploymentRequest $request, a * * @throws ApiException Thrown if the API call fails. */ - public function getMirroringDeploymentGroup(GetMirroringDeploymentGroupRequest $request, array $callOptions = []): MirroringDeploymentGroup - { + public function getMirroringDeploymentGroup( + GetMirroringDeploymentGroupRequest $request, + array $callOptions = [] + ): MirroringDeploymentGroup { return $this->startApiCall('GetMirroringDeploymentGroup', $request, $callOptions)->wait(); } @@ -749,8 +779,10 @@ public function getMirroringDeploymentGroup(GetMirroringDeploymentGroupRequest $ * * @throws ApiException Thrown if the API call fails. */ - public function getMirroringEndpointGroup(GetMirroringEndpointGroupRequest $request, array $callOptions = []): MirroringEndpointGroup - { + public function getMirroringEndpointGroup( + GetMirroringEndpointGroupRequest $request, + array $callOptions = [] + ): MirroringEndpointGroup { return $this->startApiCall('GetMirroringEndpointGroup', $request, $callOptions)->wait(); } @@ -777,8 +809,10 @@ public function getMirroringEndpointGroup(GetMirroringEndpointGroupRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function getMirroringEndpointGroupAssociation(GetMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): MirroringEndpointGroupAssociation - { + public function getMirroringEndpointGroupAssociation( + GetMirroringEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): MirroringEndpointGroupAssociation { return $this->startApiCall('GetMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -805,8 +839,10 @@ public function getMirroringEndpointGroupAssociation(GetMirroringEndpointGroupAs * * @throws ApiException Thrown if the API call fails. */ - public function listMirroringDeploymentGroups(ListMirroringDeploymentGroupsRequest $request, array $callOptions = []): PagedListResponse - { + public function listMirroringDeploymentGroups( + ListMirroringDeploymentGroupsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListMirroringDeploymentGroups', $request, $callOptions); } @@ -832,8 +868,10 @@ public function listMirroringDeploymentGroups(ListMirroringDeploymentGroupsReque * * @throws ApiException Thrown if the API call fails. */ - public function listMirroringDeployments(ListMirroringDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { + public function listMirroringDeployments( + ListMirroringDeploymentsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListMirroringDeployments', $request, $callOptions); } @@ -860,8 +898,10 @@ public function listMirroringDeployments(ListMirroringDeploymentsRequest $reques * * @throws ApiException Thrown if the API call fails. */ - public function listMirroringEndpointGroupAssociations(ListMirroringEndpointGroupAssociationsRequest $request, array $callOptions = []): PagedListResponse - { + public function listMirroringEndpointGroupAssociations( + ListMirroringEndpointGroupAssociationsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListMirroringEndpointGroupAssociations', $request, $callOptions); } @@ -888,8 +928,10 @@ public function listMirroringEndpointGroupAssociations(ListMirroringEndpointGrou * * @throws ApiException Thrown if the API call fails. */ - public function listMirroringEndpointGroups(ListMirroringEndpointGroupsRequest $request, array $callOptions = []): PagedListResponse - { + public function listMirroringEndpointGroups( + ListMirroringEndpointGroupsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListMirroringEndpointGroups', $request, $callOptions); } @@ -915,8 +957,10 @@ public function listMirroringEndpointGroups(ListMirroringEndpointGroupsRequest $ * * @throws ApiException Thrown if the API call fails. */ - public function updateMirroringDeployment(UpdateMirroringDeploymentRequest $request, array $callOptions = []): OperationResponse - { + public function updateMirroringDeployment( + UpdateMirroringDeploymentRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateMirroringDeployment', $request, $callOptions)->wait(); } @@ -943,8 +987,10 @@ public function updateMirroringDeployment(UpdateMirroringDeploymentRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function updateMirroringDeploymentGroup(UpdateMirroringDeploymentGroupRequest $request, array $callOptions = []): OperationResponse - { + public function updateMirroringDeploymentGroup( + UpdateMirroringDeploymentGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateMirroringDeploymentGroup', $request, $callOptions)->wait(); } @@ -971,8 +1017,10 @@ public function updateMirroringDeploymentGroup(UpdateMirroringDeploymentGroupReq * * @throws ApiException Thrown if the API call fails. */ - public function updateMirroringEndpointGroup(UpdateMirroringEndpointGroupRequest $request, array $callOptions = []): OperationResponse - { + public function updateMirroringEndpointGroup( + UpdateMirroringEndpointGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateMirroringEndpointGroup', $request, $callOptions)->wait(); } @@ -999,8 +1047,10 @@ public function updateMirroringEndpointGroup(UpdateMirroringEndpointGroupRequest * * @throws ApiException Thrown if the API call fails. */ - public function updateMirroringEndpointGroupAssociation(UpdateMirroringEndpointGroupAssociationRequest $request, array $callOptions = []): OperationResponse - { + public function updateMirroringEndpointGroupAssociation( + UpdateMirroringEndpointGroupAssociationRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateMirroringEndpointGroupAssociation', $request, $callOptions)->wait(); } @@ -1156,8 +1206,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = * * @throws ApiException Thrown if the API call fails. */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { + public function testIamPermissions( + TestIamPermissionsRequest $request, + array $callOptions = [] + ): TestIamPermissionsResponse { return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); } } diff --git a/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php b/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php index 7f56503d5340..0167c4942479 100644 --- a/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php +++ b/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php @@ -44,23 +44,59 @@ use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\Location; use Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy; +use Google\Cloud\NetworkSecurity\V1\AuthzPolicy; +use Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig; use Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy; use Google\Cloud\NetworkSecurity\V1\CreateAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\CreateClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\CreateServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateUrlListRequest; use Google\Cloud\NetworkSecurity\V1\DeleteAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\DeleteClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\DeleteServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteUrlListRequest; +use Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy; +use Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule; use Google\Cloud\NetworkSecurity\V1\GetAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\GetClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\GetServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetUrlListRequest; use Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListAuthzPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListBackendAuthenticationConfigsRequest; use Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPolicyRulesRequest; use Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListTlsInspectionPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListUrlListsRequest; use Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy; +use Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy; use Google\Cloud\NetworkSecurity\V1\UpdateAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\UpdateClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\UpdateServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateUrlListRequest; +use Google\Cloud\NetworkSecurity\V1\UrlList; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; @@ -80,20 +116,50 @@ * contained within formatted names that are returned by the API. * * @method PromiseInterface createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAuthzPolicyAsync(CreateAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackendAuthenticationConfigAsync(CreateBackendAuthenticationConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface createClientTlsPolicyAsync(CreateClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGatewaySecurityPolicyAsync(CreateGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGatewaySecurityPolicyRuleAsync(CreateGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) * @method PromiseInterface createServerTlsPolicyAsync(CreateServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTlsInspectionPolicyAsync(CreateTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUrlListAsync(CreateUrlListRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAuthzPolicyAsync(DeleteAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackendAuthenticationConfigAsync(DeleteBackendAuthenticationConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGatewaySecurityPolicyAsync(DeleteGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGatewaySecurityPolicyRuleAsync(DeleteGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTlsInspectionPolicyAsync(DeleteTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUrlListAsync(DeleteUrlListRequest $request, array $optionalArgs = []) * @method PromiseInterface getAuthorizationPolicyAsync(GetAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuthzPolicyAsync(GetAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackendAuthenticationConfigAsync(GetBackendAuthenticationConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface getClientTlsPolicyAsync(GetClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGatewaySecurityPolicyAsync(GetGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGatewaySecurityPolicyRuleAsync(GetGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) * @method PromiseInterface getServerTlsPolicyAsync(GetServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTlsInspectionPolicyAsync(GetTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUrlListAsync(GetUrlListRequest $request, array $optionalArgs = []) * @method PromiseInterface listAuthorizationPoliciesAsync(ListAuthorizationPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuthzPoliciesAsync(ListAuthzPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackendAuthenticationConfigsAsync(ListBackendAuthenticationConfigsRequest $request, array $optionalArgs = []) * @method PromiseInterface listClientTlsPoliciesAsync(ListClientTlsPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGatewaySecurityPoliciesAsync(ListGatewaySecurityPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGatewaySecurityPolicyRulesAsync(ListGatewaySecurityPolicyRulesRequest $request, array $optionalArgs = []) * @method PromiseInterface listServerTlsPoliciesAsync(ListServerTlsPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTlsInspectionPoliciesAsync(ListTlsInspectionPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUrlListsAsync(ListUrlListsRequest $request, array $optionalArgs = []) * @method PromiseInterface updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAuthzPolicyAsync(UpdateAuthzPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackendAuthenticationConfigAsync(UpdateBackendAuthenticationConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGatewaySecurityPolicyAsync(UpdateGatewaySecurityPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGatewaySecurityPolicyRuleAsync(UpdateGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) * @method PromiseInterface updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTlsInspectionPolicyAsync(UpdateTlsInspectionPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUrlListAsync(UpdateUrlListRequest $request, array $optionalArgs = []) * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) @@ -218,6 +284,85 @@ public static function authorizationPolicyName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a authz_policy + * resource. + * + * @param string $project + * @param string $location + * @param string $authzPolicy + * + * @return string The formatted authz_policy resource. + */ + public static function authzPolicyName(string $project, string $location, string $authzPolicy): string + { + return self::getPathTemplate('authzPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'authz_policy' => $authzPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backend_authentication_config resource. + * + * @param string $project + * @param string $location + * @param string $backendAuthenticationConfig + * + * @return string The formatted backend_authentication_config resource. + */ + public static function backendAuthenticationConfigName( + string $project, + string $location, + string $backendAuthenticationConfig + ): string { + return self::getPathTemplate('backendAuthenticationConfig')->render([ + 'project' => $project, + 'location' => $location, + 'backend_authentication_config' => $backendAuthenticationConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a ca_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $caPool + * + * @return string The formatted ca_pool resource. + */ + public static function caPoolName(string $project, string $location, string $caPool): string + { + return self::getPathTemplate('caPool')->render([ + 'project' => $project, + 'location' => $location, + 'ca_pool' => $caPool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a certificate + * resource. + * + * @param string $project + * @param string $location + * @param string $certificate + * + * @return string The formatted certificate resource. + */ + public static function certificateName(string $project, string $location, string $certificate): string + { + return self::getPathTemplate('certificate')->render([ + 'project' => $project, + 'location' => $location, + 'certificate' => $certificate, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * client_tls_policy resource. @@ -237,6 +382,53 @@ public static function clientTlsPolicyName(string $project, string $location, st ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * gateway_security_policy resource. + * + * @param string $project + * @param string $location + * @param string $gatewaySecurityPolicy + * + * @return string The formatted gateway_security_policy resource. + */ + public static function gatewaySecurityPolicyName( + string $project, + string $location, + string $gatewaySecurityPolicy + ): string { + return self::getPathTemplate('gatewaySecurityPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'gateway_security_policy' => $gatewaySecurityPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * gateway_security_policy_rule resource. + * + * @param string $project + * @param string $location + * @param string $gatewaySecurityPolicy + * @param string $rule + * + * @return string The formatted gateway_security_policy_rule resource. + */ + public static function gatewaySecurityPolicyRuleName( + string $project, + string $location, + string $gatewaySecurityPolicy, + string $rule + ): string { + return self::getPathTemplate('gatewaySecurityPolicyRule')->render([ + 'project' => $project, + 'location' => $location, + 'gateway_security_policy' => $gatewaySecurityPolicy, + 'rule' => $rule, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a location * resource. @@ -273,14 +465,83 @@ public static function serverTlsPolicyName(string $project, string $location, st ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * tls_inspection_policy resource. + * + * @param string $project + * @param string $location + * @param string $tlsInspectionPolicy + * + * @return string The formatted tls_inspection_policy resource. + */ + public static function tlsInspectionPolicyName( + string $project, + string $location, + string $tlsInspectionPolicy + ): string { + return self::getPathTemplate('tlsInspectionPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'tls_inspection_policy' => $tlsInspectionPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a trust_config + * resource. + * + * @param string $project + * @param string $location + * @param string $trustConfig + * + * @return string The formatted trust_config resource. + */ + public static function trustConfigName(string $project, string $location, string $trustConfig): string + { + return self::getPathTemplate('trustConfig')->render([ + 'project' => $project, + 'location' => $location, + 'trust_config' => $trustConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a url_list + * resource. + * + * @param string $project + * @param string $location + * @param string $urlList + * + * @return string The formatted url_list resource. + */ + public static function urlListName(string $project, string $location, string $urlList): string + { + return self::getPathTemplate('urlList')->render([ + 'project' => $project, + 'location' => $location, + 'url_list' => $urlList, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern * - authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy} + * - authzPolicy: projects/{project}/locations/{location}/authzPolicies/{authz_policy} + * - backendAuthenticationConfig: projects/{project}/locations/{location}/backendAuthenticationConfigs/{backend_authentication_config} + * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} + * - certificate: projects/{project}/locations/{location}/certificates/{certificate} * - clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy} + * - gatewaySecurityPolicy: projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} + * - gatewaySecurityPolicyRule: projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} * - location: projects/{project}/locations/{location} * - serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy} + * - tlsInspectionPolicy: projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} + * - trustConfig: projects/{project}/locations/{location}/trustConfigs/{trust_config} + * - urlList: projects/{project}/locations/{location}/urlLists/{url_list} * * 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 @@ -416,15 +677,14 @@ public function createAuthorizationPolicy( } /** - * Creates a new ClientTlsPolicy in a given project and location. + * Creates a new AuthzPolicy in a given project and location. * - * The async variant is {@see NetworkSecurityClient::createClientTlsPolicyAsync()} - * . + * The async variant is {@see NetworkSecurityClient::createAuthzPolicyAsync()} . * - * @example samples/V1/NetworkSecurityClient/create_client_tls_policy.php + * @example samples/V1/NetworkSecurityClient/create_authz_policy.php * - * @param CreateClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateAuthzPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -433,27 +693,25 @@ public function createAuthorizationPolicy( * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function createClientTlsPolicy( - CreateClientTlsPolicyRequest $request, - array $callOptions = [] - ): OperationResponse { - return $this->startApiCall('CreateClientTlsPolicy', $request, $callOptions)->wait(); + public function createAuthzPolicy(CreateAuthzPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAuthzPolicy', $request, $callOptions)->wait(); } /** - * Creates a new ServerTlsPolicy in a given project and location. + * Creates a new BackendAuthenticationConfig in a given project and location. * - * The async variant is {@see NetworkSecurityClient::createServerTlsPolicyAsync()} - * . + * The async variant is + * {@see NetworkSecurityClient::createBackendAuthenticationConfigAsync()} . * - * @example samples/V1/NetworkSecurityClient/create_server_tls_policy.php + * @example samples/V1/NetworkSecurityClient/create_backend_authentication_config.php * - * @param CreateServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateBackendAuthenticationConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -462,27 +720,27 @@ public function createClientTlsPolicy( * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function createServerTlsPolicy( - CreateServerTlsPolicyRequest $request, + public function createBackendAuthenticationConfig( + CreateBackendAuthenticationConfigRequest $request, array $callOptions = [] ): OperationResponse { - return $this->startApiCall('CreateServerTlsPolicy', $request, $callOptions)->wait(); + return $this->startApiCall('CreateBackendAuthenticationConfig', $request, $callOptions)->wait(); } /** - * Deletes a single AuthorizationPolicy. + * Creates a new ClientTlsPolicy in a given project and location. * - * The async variant is - * {@see NetworkSecurityClient::deleteAuthorizationPolicyAsync()} . + * The async variant is {@see NetworkSecurityClient::createClientTlsPolicyAsync()} + * . * - * @example samples/V1/NetworkSecurityClient/delete_authorization_policy.php + * @example samples/V1/NetworkSecurityClient/create_client_tls_policy.php * - * @param DeleteAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -491,27 +749,27 @@ public function createServerTlsPolicy( * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function deleteAuthorizationPolicy( - DeleteAuthorizationPolicyRequest $request, + public function createClientTlsPolicy( + CreateClientTlsPolicyRequest $request, array $callOptions = [] ): OperationResponse { - return $this->startApiCall('DeleteAuthorizationPolicy', $request, $callOptions)->wait(); + return $this->startApiCall('CreateClientTlsPolicy', $request, $callOptions)->wait(); } /** - * Deletes a single ClientTlsPolicy. + * Creates a new GatewaySecurityPolicy in a given project and location. * - * The async variant is {@see NetworkSecurityClient::deleteClientTlsPolicyAsync()} - * . + * The async variant is + * {@see NetworkSecurityClient::createGatewaySecurityPolicyAsync()} . * - * @example samples/V1/NetworkSecurityClient/delete_client_tls_policy.php + * @example samples/V1/NetworkSecurityClient/create_gateway_security_policy.php * - * @param DeleteClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateGatewaySecurityPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -520,27 +778,27 @@ public function deleteAuthorizationPolicy( * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function deleteClientTlsPolicy( - DeleteClientTlsPolicyRequest $request, + public function createGatewaySecurityPolicy( + CreateGatewaySecurityPolicyRequest $request, array $callOptions = [] ): OperationResponse { - return $this->startApiCall('DeleteClientTlsPolicy', $request, $callOptions)->wait(); + return $this->startApiCall('CreateGatewaySecurityPolicy', $request, $callOptions)->wait(); } /** - * Deletes a single ServerTlsPolicy. + * Creates a new GatewaySecurityPolicy in a given project and location. * - * The async variant is {@see NetworkSecurityClient::deleteServerTlsPolicyAsync()} - * . + * The async variant is + * {@see NetworkSecurityClient::createGatewaySecurityPolicyRuleAsync()} . * - * @example samples/V1/NetworkSecurityClient/delete_server_tls_policy.php + * @example samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php * - * @param DeleteServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -549,27 +807,27 @@ public function deleteClientTlsPolicy( * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function deleteServerTlsPolicy( - DeleteServerTlsPolicyRequest $request, + public function createGatewaySecurityPolicyRule( + CreateGatewaySecurityPolicyRuleRequest $request, array $callOptions = [] ): OperationResponse { - return $this->startApiCall('DeleteServerTlsPolicy', $request, $callOptions)->wait(); + return $this->startApiCall('CreateGatewaySecurityPolicyRule', $request, $callOptions)->wait(); } /** - * Gets details of a single AuthorizationPolicy. + * Creates a new ServerTlsPolicy in a given project and location. * - * The async variant is {@see NetworkSecurityClient::getAuthorizationPolicyAsync()} + * The async variant is {@see NetworkSecurityClient::createServerTlsPolicyAsync()} * . * - * @example samples/V1/NetworkSecurityClient/get_authorization_policy.php + * @example samples/V1/NetworkSecurityClient/create_server_tls_policy.php * - * @param GetAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -578,26 +836,27 @@ public function deleteServerTlsPolicy( * {@see RetrySettings} for example usage. * } * - * @return AuthorizationPolicy + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function getAuthorizationPolicy( - GetAuthorizationPolicyRequest $request, + public function createServerTlsPolicy( + CreateServerTlsPolicyRequest $request, array $callOptions = [] - ): AuthorizationPolicy { - return $this->startApiCall('GetAuthorizationPolicy', $request, $callOptions)->wait(); + ): OperationResponse { + return $this->startApiCall('CreateServerTlsPolicy', $request, $callOptions)->wait(); } /** - * Gets details of a single ClientTlsPolicy. + * Creates a new TlsInspectionPolicy in a given project and location. * - * The async variant is {@see NetworkSecurityClient::getClientTlsPolicyAsync()} . + * The async variant is + * {@see NetworkSecurityClient::createTlsInspectionPolicyAsync()} . * - * @example samples/V1/NetworkSecurityClient/get_client_tls_policy.php + * @example samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php * - * @param GetClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateTlsInspectionPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -606,24 +865,26 @@ public function getAuthorizationPolicy( * {@see RetrySettings} for example usage. * } * - * @return ClientTlsPolicy + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function getClientTlsPolicy(GetClientTlsPolicyRequest $request, array $callOptions = []): ClientTlsPolicy - { - return $this->startApiCall('GetClientTlsPolicy', $request, $callOptions)->wait(); + public function createTlsInspectionPolicy( + CreateTlsInspectionPolicyRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('CreateTlsInspectionPolicy', $request, $callOptions)->wait(); } /** - * Gets details of a single ServerTlsPolicy. + * Creates a new UrlList in a given project and location. * - * The async variant is {@see NetworkSecurityClient::getServerTlsPolicyAsync()} . + * The async variant is {@see NetworkSecurityClient::createUrlListAsync()} . * - * @example samples/V1/NetworkSecurityClient/get_server_tls_policy.php + * @example samples/V1/NetworkSecurityClient/create_url_list.php * - * @param GetServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateUrlListRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -632,24 +893,24 @@ public function getClientTlsPolicy(GetClientTlsPolicyRequest $request, array $ca * {@see RetrySettings} for example usage. * } * - * @return ServerTlsPolicy + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function getServerTlsPolicy(GetServerTlsPolicyRequest $request, array $callOptions = []): ServerTlsPolicy + public function createUrlList(CreateUrlListRequest $request, array $callOptions = []): OperationResponse { - return $this->startApiCall('GetServerTlsPolicy', $request, $callOptions)->wait(); + return $this->startApiCall('CreateUrlList', $request, $callOptions)->wait(); } /** - * Lists AuthorizationPolicies in a given project and location. + * Deletes a single AuthorizationPolicy. * * The async variant is - * {@see NetworkSecurityClient::listAuthorizationPoliciesAsync()} . + * {@see NetworkSecurityClient::deleteAuthorizationPolicyAsync()} . * - * @example samples/V1/NetworkSecurityClient/list_authorization_policies.php + * @example samples/V1/NetworkSecurityClient/delete_authorization_policy.php * - * @param ListAuthorizationPoliciesRequest $request A request to house fields associated with the call. + * @param DeleteAuthorizationPolicyRequest $request A request to house fields associated with the call. * @param array $callOptions { * Optional. * @@ -659,26 +920,587 @@ public function getServerTlsPolicy(GetServerTlsPolicyRequest $request, array $ca * {@see RetrySettings} for example usage. * } * - * @return PagedListResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function listAuthorizationPolicies( - ListAuthorizationPoliciesRequest $request, + public function deleteAuthorizationPolicy( + DeleteAuthorizationPolicyRequest $request, array $callOptions = [] - ): PagedListResponse { - return $this->startApiCall('ListAuthorizationPolicies', $request, $callOptions); + ): OperationResponse { + return $this->startApiCall('DeleteAuthorizationPolicy', $request, $callOptions)->wait(); } /** - * Lists ClientTlsPolicies in a given project and location. + * Deletes a single AuthzPolicy. * - * The async variant is {@see NetworkSecurityClient::listClientTlsPoliciesAsync()} - * . + * The async variant is {@see NetworkSecurityClient::deleteAuthzPolicyAsync()} . * - * @example samples/V1/NetworkSecurityClient/list_client_tls_policies.php + * @example samples/V1/NetworkSecurityClient/delete_authz_policy.php * - * @param ListClientTlsPoliciesRequest $request A request to house fields associated with the call. + * @param DeleteAuthzPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAuthzPolicy(DeleteAuthzPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAuthzPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single BackendAuthenticationConfig to + * BackendAuthenticationConfig. + * + * The async variant is + * {@see NetworkSecurityClient::deleteBackendAuthenticationConfigAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php + * + * @param DeleteBackendAuthenticationConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackendAuthenticationConfig( + DeleteBackendAuthenticationConfigRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteBackendAuthenticationConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::deleteClientTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/delete_client_tls_policy.php + * + * @param DeleteClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteClientTlsPolicy( + DeleteClientTlsPolicyRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single GatewaySecurityPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::deleteGatewaySecurityPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php + * + * @param DeleteGatewaySecurityPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGatewaySecurityPolicy( + DeleteGatewaySecurityPolicyRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteGatewaySecurityPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single GatewaySecurityPolicyRule. + * + * The async variant is + * {@see NetworkSecurityClient::deleteGatewaySecurityPolicyRuleAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php + * + * @param DeleteGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGatewaySecurityPolicyRule( + DeleteGatewaySecurityPolicyRuleRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteGatewaySecurityPolicyRule', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::deleteServerTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/delete_server_tls_policy.php + * + * @param DeleteServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteServerTlsPolicy( + DeleteServerTlsPolicyRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single TlsInspectionPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::deleteTlsInspectionPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php + * + * @param DeleteTlsInspectionPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTlsInspectionPolicy( + DeleteTlsInspectionPolicyRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteTlsInspectionPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single UrlList. + * + * The async variant is {@see NetworkSecurityClient::deleteUrlListAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_url_list.php + * + * @param DeleteUrlListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteUrlList(DeleteUrlListRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteUrlList', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AuthorizationPolicy. + * + * The async variant is {@see NetworkSecurityClient::getAuthorizationPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/get_authorization_policy.php + * + * @param GetAuthorizationPolicyRequest $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 AuthorizationPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuthorizationPolicy( + GetAuthorizationPolicyRequest $request, + array $callOptions = [] + ): AuthorizationPolicy { + return $this->startApiCall('GetAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AuthzPolicy. + * + * The async variant is {@see NetworkSecurityClient::getAuthzPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_authz_policy.php + * + * @param GetAuthzPolicyRequest $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 AuthzPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuthzPolicy(GetAuthzPolicyRequest $request, array $callOptions = []): AuthzPolicy + { + return $this->startApiCall('GetAuthzPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single BackendAuthenticationConfig to + * BackendAuthenticationConfig. + * + * The async variant is + * {@see NetworkSecurityClient::getBackendAuthenticationConfigAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_backend_authentication_config.php + * + * @param GetBackendAuthenticationConfigRequest $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 BackendAuthenticationConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackendAuthenticationConfig( + GetBackendAuthenticationConfigRequest $request, + array $callOptions = [] + ): BackendAuthenticationConfig { + return $this->startApiCall('GetBackendAuthenticationConfig', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::getClientTlsPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_client_tls_policy.php + * + * @param GetClientTlsPolicyRequest $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 ClientTlsPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getClientTlsPolicy(GetClientTlsPolicyRequest $request, array $callOptions = []): ClientTlsPolicy + { + return $this->startApiCall('GetClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single GatewaySecurityPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::getGatewaySecurityPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_gateway_security_policy.php + * + * @param GetGatewaySecurityPolicyRequest $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 GatewaySecurityPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGatewaySecurityPolicy( + GetGatewaySecurityPolicyRequest $request, + array $callOptions = [] + ): GatewaySecurityPolicy { + return $this->startApiCall('GetGatewaySecurityPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single GatewaySecurityPolicyRule. + * + * The async variant is + * {@see NetworkSecurityClient::getGatewaySecurityPolicyRuleAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php + * + * @param GetGatewaySecurityPolicyRuleRequest $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 GatewaySecurityPolicyRule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGatewaySecurityPolicyRule( + GetGatewaySecurityPolicyRuleRequest $request, + array $callOptions = [] + ): GatewaySecurityPolicyRule { + return $this->startApiCall('GetGatewaySecurityPolicyRule', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::getServerTlsPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_server_tls_policy.php + * + * @param GetServerTlsPolicyRequest $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 ServerTlsPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getServerTlsPolicy(GetServerTlsPolicyRequest $request, array $callOptions = []): ServerTlsPolicy + { + return $this->startApiCall('GetServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single TlsInspectionPolicy. + * + * The async variant is {@see NetworkSecurityClient::getTlsInspectionPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php + * + * @param GetTlsInspectionPolicyRequest $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 TlsInspectionPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTlsInspectionPolicy( + GetTlsInspectionPolicyRequest $request, + array $callOptions = [] + ): TlsInspectionPolicy { + return $this->startApiCall('GetTlsInspectionPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single UrlList. + * + * The async variant is {@see NetworkSecurityClient::getUrlListAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_url_list.php + * + * @param GetUrlListRequest $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 UrlList + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUrlList(GetUrlListRequest $request, array $callOptions = []): UrlList + { + return $this->startApiCall('GetUrlList', $request, $callOptions)->wait(); + } + + /** + * Lists AuthorizationPolicies in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listAuthorizationPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_authorization_policies.php + * + * @param ListAuthorizationPoliciesRequest $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 listAuthorizationPolicies( + ListAuthorizationPoliciesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListAuthorizationPolicies', $request, $callOptions); + } + + /** + * Lists AuthzPolicies in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listAuthzPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_authz_policies.php + * + * @param ListAuthzPoliciesRequest $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 listAuthzPolicies(ListAuthzPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuthzPolicies', $request, $callOptions); + } + + /** + * Lists BackendAuthenticationConfigs in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listBackendAuthenticationConfigsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php + * + * @param ListBackendAuthenticationConfigsRequest $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 listBackendAuthenticationConfigs( + ListBackendAuthenticationConfigsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListBackendAuthenticationConfigs', $request, $callOptions); + } + + /** + * Lists ClientTlsPolicies in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listClientTlsPoliciesAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/list_client_tls_policies.php + * + * @param ListClientTlsPoliciesRequest $request A request to house fields associated with the call. * @param array $callOptions { * Optional. * @@ -699,6 +1521,64 @@ public function listClientTlsPolicies( return $this->startApiCall('ListClientTlsPolicies', $request, $callOptions); } + /** + * Lists GatewaySecurityPolicies in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listGatewaySecurityPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_gateway_security_policies.php + * + * @param ListGatewaySecurityPoliciesRequest $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 listGatewaySecurityPolicies( + ListGatewaySecurityPoliciesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListGatewaySecurityPolicies', $request, $callOptions); + } + + /** + * Lists GatewaySecurityPolicyRules in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listGatewaySecurityPolicyRulesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php + * + * @param ListGatewaySecurityPolicyRulesRequest $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 listGatewaySecurityPolicyRules( + ListGatewaySecurityPolicyRulesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListGatewaySecurityPolicyRules', $request, $callOptions); + } + /** * Lists ServerTlsPolicies in a given project and location. * @@ -728,6 +1608,61 @@ public function listServerTlsPolicies( return $this->startApiCall('ListServerTlsPolicies', $request, $callOptions); } + /** + * Lists TlsInspectionPolicies in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listTlsInspectionPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php + * + * @param ListTlsInspectionPoliciesRequest $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 listTlsInspectionPolicies( + ListTlsInspectionPoliciesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListTlsInspectionPolicies', $request, $callOptions); + } + + /** + * Lists UrlLists in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listUrlListsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_url_lists.php + * + * @param ListUrlListsRequest $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 listUrlLists(ListUrlListsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUrlLists', $request, $callOptions); + } + /** * Updates the parameters of a single AuthorizationPolicy. * @@ -757,6 +1692,62 @@ public function updateAuthorizationPolicy( return $this->startApiCall('UpdateAuthorizationPolicy', $request, $callOptions)->wait(); } + /** + * Updates the parameters of a single AuthzPolicy. + * + * The async variant is {@see NetworkSecurityClient::updateAuthzPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_authz_policy.php + * + * @param UpdateAuthzPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAuthzPolicy(UpdateAuthzPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAuthzPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single BackendAuthenticationConfig to + * BackendAuthenticationConfig. + * + * The async variant is + * {@see NetworkSecurityClient::updateBackendAuthenticationConfigAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_backend_authentication_config.php + * + * @param UpdateBackendAuthenticationConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackendAuthenticationConfig( + UpdateBackendAuthenticationConfigRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateBackendAuthenticationConfig', $request, $callOptions)->wait(); + } + /** * Updates the parameters of a single ClientTlsPolicy. * @@ -786,6 +1777,64 @@ public function updateClientTlsPolicy( return $this->startApiCall('UpdateClientTlsPolicy', $request, $callOptions)->wait(); } + /** + * Updates the parameters of a single GatewaySecurityPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::updateGatewaySecurityPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_gateway_security_policy.php + * + * @param UpdateGatewaySecurityPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGatewaySecurityPolicy( + UpdateGatewaySecurityPolicyRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateGatewaySecurityPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single GatewaySecurityPolicyRule. + * + * The async variant is + * {@see NetworkSecurityClient::updateGatewaySecurityPolicyRuleAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php + * + * @param UpdateGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGatewaySecurityPolicyRule( + UpdateGatewaySecurityPolicyRuleRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateGatewaySecurityPolicyRule', $request, $callOptions)->wait(); + } + /** * Updates the parameters of a single ServerTlsPolicy. * @@ -815,6 +1864,61 @@ public function updateServerTlsPolicy( return $this->startApiCall('UpdateServerTlsPolicy', $request, $callOptions)->wait(); } + /** + * Updates the parameters of a single TlsInspectionPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::updateTlsInspectionPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php + * + * @param UpdateTlsInspectionPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTlsInspectionPolicy( + UpdateTlsInspectionPolicyRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateTlsInspectionPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single UrlList. + * + * The async variant is {@see NetworkSecurityClient::updateUrlListAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_url_list.php + * + * @param UpdateUrlListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUrlList(UpdateUrlListRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateUrlList', $request, $callOptions)->wait(); + } + /** * Gets information about a location. * @@ -843,6 +1947,22 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. * * The async variant is {@see NetworkSecurityClient::listLocationsAsync()} . * diff --git a/NetworkSecurity/src/V1/Client/OrganizationAddressGroupServiceClient.php b/NetworkSecurity/src/V1/Client/OrganizationAddressGroupServiceClient.php index 03c94f798e16..a05dbe7f67c4 100644 --- a/NetworkSecurity/src/V1/Client/OrganizationAddressGroupServiceClient.php +++ b/NetworkSecurity/src/V1/Client/OrganizationAddressGroupServiceClient.php @@ -676,6 +676,22 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. * * The async variant is * {@see OrganizationAddressGroupServiceClient::listLocationsAsync()} . diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php b/NetworkSecurity/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php similarity index 92% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php rename to NetworkSecurity/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php index d7bd28424722..48f89e6d3b74 100644 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php +++ b/NetworkSecurity/src/V1/Client/OrganizationSecurityProfileGroupServiceClient.php @@ -112,9 +112,7 @@ final class OrganizationSecurityProfileGroupServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; @@ -124,14 +122,17 @@ private static function getClientDefaults() 'serviceName' => self::SERVICE_NAME, 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, 'clientConfig' => __DIR__ . '/../resources/organization_security_profile_group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/organization_security_profile_group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/organization_security_profile_group_service_grpc_config.json', + 'descriptorsConfigPath' => + __DIR__ . '/../resources/organization_security_profile_group_service_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . '/../resources/organization_security_profile_group_service_grpc_config.json', 'credentialsConfig' => [ 'defaultScopes' => self::$serviceScopes, ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/organization_security_profile_group_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/organization_security_profile_group_service_rest_client_config.php', ], ], ]; @@ -195,8 +196,11 @@ private function createOperationsClient(array $options) * * @return string The formatted intercept_endpoint_group resource. */ - public static function interceptEndpointGroupName(string $project, string $location, string $interceptEndpointGroup): string - { + public static function interceptEndpointGroupName( + string $project, + string $location, + string $interceptEndpointGroup + ): string { return self::getPathTemplate('interceptEndpointGroup')->render([ 'project' => $project, 'location' => $location, @@ -231,8 +235,11 @@ public static function locationName(string $project, string $location): string * * @return string The formatted mirroring_endpoint_group resource. */ - public static function mirroringEndpointGroupName(string $project, string $location, string $mirroringEndpointGroup): string - { + public static function mirroringEndpointGroupName( + string $project, + string $location, + string $mirroringEndpointGroup + ): string { return self::getPathTemplate('mirroringEndpointGroup')->render([ 'project' => $project, 'location' => $location, @@ -267,8 +274,11 @@ public static function organizationLocationName(string $organization, string $lo * * @return string The formatted organization_location_security_profile resource. */ - public static function organizationLocationSecurityProfileName(string $organization, string $location, string $securityProfile): string - { + public static function organizationLocationSecurityProfileName( + string $organization, + string $location, + string $securityProfile + ): string { return self::getPathTemplate('organizationLocationSecurityProfile')->render([ 'organization' => $organization, 'location' => $location, @@ -286,8 +296,11 @@ public static function organizationLocationSecurityProfileName(string $organizat * * @return string The formatted organization_location_security_profile_group resource. */ - public static function organizationLocationSecurityProfileGroupName(string $organization, string $location, string $securityProfileGroup): string - { + public static function organizationLocationSecurityProfileGroupName( + string $organization, + string $location, + string $securityProfileGroup + ): string { return self::getPathTemplate('organizationLocationSecurityProfileGroup')->render([ 'organization' => $organization, 'location' => $location, @@ -305,8 +318,11 @@ public static function organizationLocationSecurityProfileGroupName(string $orga * * @return string The formatted project_location_security_profile resource. */ - public static function projectLocationSecurityProfileName(string $project, string $location, string $securityProfile): string - { + public static function projectLocationSecurityProfileName( + string $project, + string $location, + string $securityProfile + ): string { return self::getPathTemplate('projectLocationSecurityProfile')->render([ 'project' => $project, 'location' => $location, @@ -324,8 +340,11 @@ public static function projectLocationSecurityProfileName(string $project, strin * * @return string The formatted project_location_security_profile_group resource. */ - public static function projectLocationSecurityProfileGroupName(string $project, string $location, string $securityProfileGroup): string - { + public static function projectLocationSecurityProfileGroupName( + string $project, + string $location, + string $securityProfileGroup + ): string { return self::getPathTemplate('projectLocationSecurityProfileGroup')->render([ 'project' => $project, 'location' => $location, @@ -362,8 +381,11 @@ public static function securityProfileName(string $organization, string $locatio * * @return string The formatted security_profile_group resource. */ - public static function securityProfileGroupName(string $organization, string $location, string $securityProfileGroup): string - { + public static function securityProfileGroupName( + string $organization, + string $location, + string $securityProfileGroup + ): string { return self::getPathTemplate('securityProfileGroup')->render([ 'organization' => $organization, 'location' => $location, @@ -515,8 +537,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function createSecurityProfile(CreateSecurityProfileRequest $request, array $callOptions = []): OperationResponse - { + public function createSecurityProfile( + CreateSecurityProfileRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateSecurityProfile', $request, $callOptions)->wait(); } @@ -543,8 +567,10 @@ public function createSecurityProfile(CreateSecurityProfileRequest $request, arr * * @throws ApiException Thrown if the API call fails. */ - public function createSecurityProfileGroup(CreateSecurityProfileGroupRequest $request, array $callOptions = []): OperationResponse - { + public function createSecurityProfileGroup( + CreateSecurityProfileGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('CreateSecurityProfileGroup', $request, $callOptions)->wait(); } @@ -571,8 +597,10 @@ public function createSecurityProfileGroup(CreateSecurityProfileGroupRequest $re * * @throws ApiException Thrown if the API call fails. */ - public function deleteSecurityProfile(DeleteSecurityProfileRequest $request, array $callOptions = []): OperationResponse - { + public function deleteSecurityProfile( + DeleteSecurityProfileRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteSecurityProfile', $request, $callOptions)->wait(); } @@ -599,8 +627,10 @@ public function deleteSecurityProfile(DeleteSecurityProfileRequest $request, arr * * @throws ApiException Thrown if the API call fails. */ - public function deleteSecurityProfileGroup(DeleteSecurityProfileGroupRequest $request, array $callOptions = []): OperationResponse - { + public function deleteSecurityProfileGroup( + DeleteSecurityProfileGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('DeleteSecurityProfileGroup', $request, $callOptions)->wait(); } @@ -655,8 +685,10 @@ public function getSecurityProfile(GetSecurityProfileRequest $request, array $ca * * @throws ApiException Thrown if the API call fails. */ - public function getSecurityProfileGroup(GetSecurityProfileGroupRequest $request, array $callOptions = []): SecurityProfileGroup - { + public function getSecurityProfileGroup( + GetSecurityProfileGroupRequest $request, + array $callOptions = [] + ): SecurityProfileGroup { return $this->startApiCall('GetSecurityProfileGroup', $request, $callOptions)->wait(); } @@ -683,8 +715,10 @@ public function getSecurityProfileGroup(GetSecurityProfileGroupRequest $request, * * @throws ApiException Thrown if the API call fails. */ - public function listSecurityProfileGroups(ListSecurityProfileGroupsRequest $request, array $callOptions = []): PagedListResponse - { + public function listSecurityProfileGroups( + ListSecurityProfileGroupsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListSecurityProfileGroups', $request, $callOptions); } @@ -711,8 +745,10 @@ public function listSecurityProfileGroups(ListSecurityProfileGroupsRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function listSecurityProfiles(ListSecurityProfilesRequest $request, array $callOptions = []): PagedListResponse - { + public function listSecurityProfiles( + ListSecurityProfilesRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListSecurityProfiles', $request, $callOptions); } @@ -739,8 +775,10 @@ public function listSecurityProfiles(ListSecurityProfilesRequest $request, array * * @throws ApiException Thrown if the API call fails. */ - public function updateSecurityProfile(UpdateSecurityProfileRequest $request, array $callOptions = []): OperationResponse - { + public function updateSecurityProfile( + UpdateSecurityProfileRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateSecurityProfile', $request, $callOptions)->wait(); } @@ -767,8 +805,10 @@ public function updateSecurityProfile(UpdateSecurityProfileRequest $request, arr * * @throws ApiException Thrown if the API call fails. */ - public function updateSecurityProfileGroup(UpdateSecurityProfileGroupRequest $request, array $callOptions = []): OperationResponse - { + public function updateSecurityProfileGroup( + UpdateSecurityProfileGroupRequest $request, + array $callOptions = [] + ): OperationResponse { return $this->startApiCall('UpdateSecurityProfileGroup', $request, $callOptions)->wait(); } @@ -930,8 +970,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = * * @throws ApiException Thrown if the API call fails. */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { + public function testIamPermissions( + TestIamPermissionsRequest $request, + array $callOptions = [] + ): TestIamPermissionsResponse { return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); } } diff --git a/NetworkSecurity/src/V1/ClientTlsPolicy.php b/NetworkSecurity/src/V1/ClientTlsPolicy.php index 54d663adc943..9560803735cf 100644 --- a/NetworkSecurity/src/V1/ClientTlsPolicy.php +++ b/NetworkSecurity/src/V1/ClientTlsPolicy.php @@ -19,7 +19,7 @@ class ClientTlsPolicy extends \Google\Protobuf\Internal\Message { /** * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/clientTlsPolicies/{client_tls_policy}` + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -56,16 +56,17 @@ class ClientTlsPolicy extends \Google\Protobuf\Internal\Message */ protected $sni = ''; /** - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. * * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; */ protected $client_certificate = null; /** - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -79,7 +80,7 @@ class ClientTlsPolicy extends \Google\Protobuf\Internal\Message * * @type string $name * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/clientTlsPolicies/{client_tls_policy}` + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` * @type string $description * Optional. Free-text description of the resource. * @type \Google\Protobuf\Timestamp $create_time @@ -92,12 +93,13 @@ class ClientTlsPolicy extends \Google\Protobuf\Internal\Message * Optional. Server Name Indication string to present to the server during TLS * handshake. E.g: "secure.example.com". * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $client_certificate - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. * @type \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $server_validation_ca - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. * } */ public function __construct($data = NULL) { @@ -107,7 +109,7 @@ public function __construct($data = NULL) { /** * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/clientTlsPolicies/{client_tls_policy}` + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -119,7 +121,7 @@ public function getName() /** * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/clientTlsPolicies/{client_tls_policy}` + * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -286,8 +288,9 @@ public function setSni($var) } /** - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. * * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null @@ -308,8 +311,9 @@ public function clearClientCertificate() } /** - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. + * Optional. Defines a mechanism to provision client identity (public and + * private keys) for peer to peer authentication. The presence of this + * dictates mTLS. * * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var @@ -324,9 +328,9 @@ public function setClientCertificate($var) } /** - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ValidationCA> @@ -337,9 +341,9 @@ public function getServerValidationCa() } /** - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. + * Optional. Defines the mechanism to obtain the Certificate Authority + * certificate to validate the server certificate. If empty, client does not + * validate the server certificate. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $var diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthzPolicyRequest.php b/NetworkSecurity/src/V1/CreateAuthzPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthzPolicyRequest.php rename to NetworkSecurity/src/V1/CreateAuthzPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateBackendAuthenticationConfigRequest.php b/NetworkSecurity/src/V1/CreateBackendAuthenticationConfigRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateBackendAuthenticationConfigRequest.php rename to NetworkSecurity/src/V1/CreateBackendAuthenticationConfigRequest.php diff --git a/NetworkSecurity/src/V1/CreateClientTlsPolicyRequest.php b/NetworkSecurity/src/V1/CreateClientTlsPolicyRequest.php index a09edbeb0e3d..8a00e8de7116 100644 --- a/NetworkSecurity/src/V1/CreateClientTlsPolicyRequest.php +++ b/NetworkSecurity/src/V1/CreateClientTlsPolicyRequest.php @@ -23,9 +23,10 @@ class CreateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". * * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -42,9 +43,10 @@ class CreateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message * the format `projects/*/locations/{location}`. Please see * {@see NetworkSecurityClient::locationName()} for help formatting this field. * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. ClientTlsPolicy resource to be created. - * @param string $clientTlsPolicyId Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". + * @param string $clientTlsPolicyId Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". * * @return \Google\Cloud\NetworkSecurity\V1\CreateClientTlsPolicyRequest * @@ -68,9 +70,10 @@ public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\Cl * Required. The parent resource of the ClientTlsPolicy. Must be in * the format `projects/{@*}locations/{location}`. * @type string $client_tls_policy_id - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". * @type \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy * Required. ClientTlsPolicy resource to be created. * } @@ -109,9 +112,10 @@ public function setParent($var) } /** - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". * * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -122,9 +126,10 @@ public function getClientTlsPolicyId() } /** - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". * * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateDnsThreatDetectorRequest.php b/NetworkSecurity/src/V1/CreateDnsThreatDetectorRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateDnsThreatDetectorRequest.php rename to NetworkSecurity/src/V1/CreateDnsThreatDetectorRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointAssociationRequest.php b/NetworkSecurity/src/V1/CreateFirewallEndpointAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointAssociationRequest.php rename to NetworkSecurity/src/V1/CreateFirewallEndpointAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointRequest.php b/NetworkSecurity/src/V1/CreateFirewallEndpointRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateFirewallEndpointRequest.php rename to NetworkSecurity/src/V1/CreateFirewallEndpointRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRequest.php b/NetworkSecurity/src/V1/CreateGatewaySecurityPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRequest.php rename to NetworkSecurity/src/V1/CreateGatewaySecurityPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRuleRequest.php b/NetworkSecurity/src/V1/CreateGatewaySecurityPolicyRuleRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateGatewaySecurityPolicyRuleRequest.php rename to NetworkSecurity/src/V1/CreateGatewaySecurityPolicyRuleRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentGroupRequest.php b/NetworkSecurity/src/V1/CreateInterceptDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/CreateInterceptDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentRequest.php b/NetworkSecurity/src/V1/CreateInterceptDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptDeploymentRequest.php rename to NetworkSecurity/src/V1/CreateInterceptDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/CreateInterceptEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/CreateInterceptEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupRequest.php b/NetworkSecurity/src/V1/CreateInterceptEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateInterceptEndpointGroupRequest.php rename to NetworkSecurity/src/V1/CreateInterceptEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentGroupRequest.php b/NetworkSecurity/src/V1/CreateMirroringDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/CreateMirroringDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentRequest.php b/NetworkSecurity/src/V1/CreateMirroringDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringDeploymentRequest.php rename to NetworkSecurity/src/V1/CreateMirroringDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/CreateMirroringEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/CreateMirroringEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupRequest.php b/NetworkSecurity/src/V1/CreateMirroringEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateMirroringEndpointGroupRequest.php rename to NetworkSecurity/src/V1/CreateMirroringEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileGroupRequest.php b/NetworkSecurity/src/V1/CreateSecurityProfileGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileGroupRequest.php rename to NetworkSecurity/src/V1/CreateSecurityProfileGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileRequest.php b/NetworkSecurity/src/V1/CreateSecurityProfileRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateSecurityProfileRequest.php rename to NetworkSecurity/src/V1/CreateSecurityProfileRequest.php diff --git a/NetworkSecurity/src/V1/CreateServerTlsPolicyRequest.php b/NetworkSecurity/src/V1/CreateServerTlsPolicyRequest.php index 659e03493f8c..bee5acb2ba61 100644 --- a/NetworkSecurity/src/V1/CreateServerTlsPolicyRequest.php +++ b/NetworkSecurity/src/V1/CreateServerTlsPolicyRequest.php @@ -23,9 +23,10 @@ class CreateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". + * Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". * * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -42,9 +43,10 @@ class CreateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message * the format `projects/*/locations/{location}`. Please see * {@see NetworkSecurityClient::locationName()} for help formatting this field. * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. ServerTlsPolicy resource to be created. - * @param string $serverTlsPolicyId Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". + * @param string $serverTlsPolicyId Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". * * @return \Google\Cloud\NetworkSecurity\V1\CreateServerTlsPolicyRequest * @@ -68,9 +70,10 @@ public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\Se * Required. The parent resource of the ServerTlsPolicy. Must be in * the format `projects/{@*}locations/{location}`. * @type string $server_tls_policy_id - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". + * Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy * Required. ServerTlsPolicy resource to be created. * } @@ -109,9 +112,10 @@ public function setParent($var) } /** - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". + * Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". * * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -122,9 +126,10 @@ public function getServerTlsPolicyId() } /** - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". + * Required. Short name of the ServerTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "server_mtls_policy". * * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateTlsInspectionPolicyRequest.php b/NetworkSecurity/src/V1/CreateTlsInspectionPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateTlsInspectionPolicyRequest.php rename to NetworkSecurity/src/V1/CreateTlsInspectionPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateUrlListRequest.php b/NetworkSecurity/src/V1/CreateUrlListRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateUrlListRequest.php rename to NetworkSecurity/src/V1/CreateUrlListRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomInterceptProfile.php b/NetworkSecurity/src/V1/CustomInterceptProfile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomInterceptProfile.php rename to NetworkSecurity/src/V1/CustomInterceptProfile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomMirroringProfile.php b/NetworkSecurity/src/V1/CustomMirroringProfile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CustomMirroringProfile.php rename to NetworkSecurity/src/V1/CustomMirroringProfile.php diff --git a/NetworkSecurity/src/V1/DeleteAuthorizationPolicyRequest.php b/NetworkSecurity/src/V1/DeleteAuthorizationPolicyRequest.php index 004ae63bff40..06679bb78539 100644 --- a/NetworkSecurity/src/V1/DeleteAuthorizationPolicyRequest.php +++ b/NetworkSecurity/src/V1/DeleteAuthorizationPolicyRequest.php @@ -16,16 +16,16 @@ class DeleteAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message { /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $name = ''; /** - * @param string $name Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see + * @param string $name Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. * * @return \Google\Cloud\NetworkSecurity\V1\DeleteAuthorizationPolicyRequest @@ -45,8 +45,8 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. * } */ public function __construct($data = NULL) { @@ -55,8 +55,8 @@ public function __construct($data = NULL) { } /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -67,8 +67,8 @@ public function getName() } /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * Required. A name of the AuthorizationPolicy to delete. Must be in the + * format `projects/{project}/locations/{location}/authorizationPolicies/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthzPolicyRequest.php b/NetworkSecurity/src/V1/DeleteAuthzPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthzPolicyRequest.php rename to NetworkSecurity/src/V1/DeleteAuthzPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteBackendAuthenticationConfigRequest.php b/NetworkSecurity/src/V1/DeleteBackendAuthenticationConfigRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteBackendAuthenticationConfigRequest.php rename to NetworkSecurity/src/V1/DeleteBackendAuthenticationConfigRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteDnsThreatDetectorRequest.php b/NetworkSecurity/src/V1/DeleteDnsThreatDetectorRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteDnsThreatDetectorRequest.php rename to NetworkSecurity/src/V1/DeleteDnsThreatDetectorRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointAssociationRequest.php b/NetworkSecurity/src/V1/DeleteFirewallEndpointAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointAssociationRequest.php rename to NetworkSecurity/src/V1/DeleteFirewallEndpointAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointRequest.php b/NetworkSecurity/src/V1/DeleteFirewallEndpointRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteFirewallEndpointRequest.php rename to NetworkSecurity/src/V1/DeleteFirewallEndpointRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRequest.php b/NetworkSecurity/src/V1/DeleteGatewaySecurityPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRequest.php rename to NetworkSecurity/src/V1/DeleteGatewaySecurityPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRuleRequest.php b/NetworkSecurity/src/V1/DeleteGatewaySecurityPolicyRuleRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteGatewaySecurityPolicyRuleRequest.php rename to NetworkSecurity/src/V1/DeleteGatewaySecurityPolicyRuleRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentGroupRequest.php b/NetworkSecurity/src/V1/DeleteInterceptDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/DeleteInterceptDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentRequest.php b/NetworkSecurity/src/V1/DeleteInterceptDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptDeploymentRequest.php rename to NetworkSecurity/src/V1/DeleteInterceptDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/DeleteInterceptEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/DeleteInterceptEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupRequest.php b/NetworkSecurity/src/V1/DeleteInterceptEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteInterceptEndpointGroupRequest.php rename to NetworkSecurity/src/V1/DeleteInterceptEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentGroupRequest.php b/NetworkSecurity/src/V1/DeleteMirroringDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/DeleteMirroringDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentRequest.php b/NetworkSecurity/src/V1/DeleteMirroringDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringDeploymentRequest.php rename to NetworkSecurity/src/V1/DeleteMirroringDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/DeleteMirroringEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/DeleteMirroringEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupRequest.php b/NetworkSecurity/src/V1/DeleteMirroringEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteMirroringEndpointGroupRequest.php rename to NetworkSecurity/src/V1/DeleteMirroringEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileGroupRequest.php b/NetworkSecurity/src/V1/DeleteSecurityProfileGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileGroupRequest.php rename to NetworkSecurity/src/V1/DeleteSecurityProfileGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileRequest.php b/NetworkSecurity/src/V1/DeleteSecurityProfileRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteSecurityProfileRequest.php rename to NetworkSecurity/src/V1/DeleteSecurityProfileRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteTlsInspectionPolicyRequest.php b/NetworkSecurity/src/V1/DeleteTlsInspectionPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteTlsInspectionPolicyRequest.php rename to NetworkSecurity/src/V1/DeleteTlsInspectionPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteUrlListRequest.php b/NetworkSecurity/src/V1/DeleteUrlListRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteUrlListRequest.php rename to NetworkSecurity/src/V1/DeleteUrlListRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector.php b/NetworkSecurity/src/V1/DnsThreatDetector.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector.php rename to NetworkSecurity/src/V1/DnsThreatDetector.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector/Provider.php b/NetworkSecurity/src/V1/DnsThreatDetector/Provider.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DnsThreatDetector/Provider.php rename to NetworkSecurity/src/V1/DnsThreatDetector/Provider.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint.php b/NetworkSecurity/src/V1/FirewallEndpoint.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint.php rename to NetworkSecurity/src/V1/FirewallEndpoint.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/AssociationReference.php b/NetworkSecurity/src/V1/FirewallEndpoint/AssociationReference.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/AssociationReference.php rename to NetworkSecurity/src/V1/FirewallEndpoint/AssociationReference.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/EndpointSettings.php b/NetworkSecurity/src/V1/FirewallEndpoint/EndpointSettings.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/EndpointSettings.php rename to NetworkSecurity/src/V1/FirewallEndpoint/EndpointSettings.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/State.php b/NetworkSecurity/src/V1/FirewallEndpoint/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpoint/State.php rename to NetworkSecurity/src/V1/FirewallEndpoint/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation.php b/NetworkSecurity/src/V1/FirewallEndpointAssociation.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation.php rename to NetworkSecurity/src/V1/FirewallEndpointAssociation.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation/State.php b/NetworkSecurity/src/V1/FirewallEndpointAssociation/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/FirewallEndpointAssociation/State.php rename to NetworkSecurity/src/V1/FirewallEndpointAssociation/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicy.php b/NetworkSecurity/src/V1/GatewaySecurityPolicy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicy.php rename to NetworkSecurity/src/V1/GatewaySecurityPolicy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule.php b/NetworkSecurity/src/V1/GatewaySecurityPolicyRule.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule.php rename to NetworkSecurity/src/V1/GatewaySecurityPolicyRule.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule/BasicProfile.php b/NetworkSecurity/src/V1/GatewaySecurityPolicyRule/BasicProfile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GatewaySecurityPolicyRule/BasicProfile.php rename to NetworkSecurity/src/V1/GatewaySecurityPolicyRule/BasicProfile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthzPolicyRequest.php b/NetworkSecurity/src/V1/GetAuthzPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthzPolicyRequest.php rename to NetworkSecurity/src/V1/GetAuthzPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetBackendAuthenticationConfigRequest.php b/NetworkSecurity/src/V1/GetBackendAuthenticationConfigRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetBackendAuthenticationConfigRequest.php rename to NetworkSecurity/src/V1/GetBackendAuthenticationConfigRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetDnsThreatDetectorRequest.php b/NetworkSecurity/src/V1/GetDnsThreatDetectorRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetDnsThreatDetectorRequest.php rename to NetworkSecurity/src/V1/GetDnsThreatDetectorRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointAssociationRequest.php b/NetworkSecurity/src/V1/GetFirewallEndpointAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointAssociationRequest.php rename to NetworkSecurity/src/V1/GetFirewallEndpointAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointRequest.php b/NetworkSecurity/src/V1/GetFirewallEndpointRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetFirewallEndpointRequest.php rename to NetworkSecurity/src/V1/GetFirewallEndpointRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRequest.php b/NetworkSecurity/src/V1/GetGatewaySecurityPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRequest.php rename to NetworkSecurity/src/V1/GetGatewaySecurityPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRuleRequest.php b/NetworkSecurity/src/V1/GetGatewaySecurityPolicyRuleRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetGatewaySecurityPolicyRuleRequest.php rename to NetworkSecurity/src/V1/GetGatewaySecurityPolicyRuleRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentGroupRequest.php b/NetworkSecurity/src/V1/GetInterceptDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/GetInterceptDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentRequest.php b/NetworkSecurity/src/V1/GetInterceptDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptDeploymentRequest.php rename to NetworkSecurity/src/V1/GetInterceptDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/GetInterceptEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/GetInterceptEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupRequest.php b/NetworkSecurity/src/V1/GetInterceptEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetInterceptEndpointGroupRequest.php rename to NetworkSecurity/src/V1/GetInterceptEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentGroupRequest.php b/NetworkSecurity/src/V1/GetMirroringDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/GetMirroringDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentRequest.php b/NetworkSecurity/src/V1/GetMirroringDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringDeploymentRequest.php rename to NetworkSecurity/src/V1/GetMirroringDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/GetMirroringEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/GetMirroringEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupRequest.php b/NetworkSecurity/src/V1/GetMirroringEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetMirroringEndpointGroupRequest.php rename to NetworkSecurity/src/V1/GetMirroringEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileGroupRequest.php b/NetworkSecurity/src/V1/GetSecurityProfileGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileGroupRequest.php rename to NetworkSecurity/src/V1/GetSecurityProfileGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileRequest.php b/NetworkSecurity/src/V1/GetSecurityProfileRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetSecurityProfileRequest.php rename to NetworkSecurity/src/V1/GetSecurityProfileRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetTlsInspectionPolicyRequest.php b/NetworkSecurity/src/V1/GetTlsInspectionPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetTlsInspectionPolicyRequest.php rename to NetworkSecurity/src/V1/GetTlsInspectionPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetUrlListRequest.php b/NetworkSecurity/src/V1/GetUrlListRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetUrlListRequest.php rename to NetworkSecurity/src/V1/GetUrlListRequest.php diff --git a/NetworkSecurity/src/V1/GrpcEndpoint.php b/NetworkSecurity/src/V1/GrpcEndpoint.php index af90a9618b64..eeacff27c860 100644 --- a/NetworkSecurity/src/V1/GrpcEndpoint.php +++ b/NetworkSecurity/src/V1/GrpcEndpoint.php @@ -16,8 +16,8 @@ class GrpcEndpoint extends \Google\Protobuf\Internal\Message { /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". * * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -30,8 +30,8 @@ class GrpcEndpoint extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $target_uri - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". * } */ public function __construct($data = NULL) { @@ -40,8 +40,8 @@ public function __construct($data = NULL) { } /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". * * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -52,8 +52,8 @@ public function getTargetUri() } /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, + * and should start with "unix:". * * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment.php b/NetworkSecurity/src/V1/InterceptDeployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment.php rename to NetworkSecurity/src/V1/InterceptDeployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment/State.php b/NetworkSecurity/src/V1/InterceptDeployment/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeployment/State.php rename to NetworkSecurity/src/V1/InterceptDeployment/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup.php b/NetworkSecurity/src/V1/InterceptDeploymentGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup.php rename to NetworkSecurity/src/V1/InterceptDeploymentGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php b/NetworkSecurity/src/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php rename to NetworkSecurity/src/V1/InterceptDeploymentGroup/ConnectedEndpointGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/Deployment.php b/NetworkSecurity/src/V1/InterceptDeploymentGroup/Deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/Deployment.php rename to NetworkSecurity/src/V1/InterceptDeploymentGroup/Deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/State.php b/NetworkSecurity/src/V1/InterceptDeploymentGroup/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptDeploymentGroup/State.php rename to NetworkSecurity/src/V1/InterceptDeploymentGroup/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup.php b/NetworkSecurity/src/V1/InterceptEndpointGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup.php rename to NetworkSecurity/src/V1/InterceptEndpointGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/AssociationDetails.php b/NetworkSecurity/src/V1/InterceptEndpointGroup/AssociationDetails.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/AssociationDetails.php rename to NetworkSecurity/src/V1/InterceptEndpointGroup/AssociationDetails.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php b/NetworkSecurity/src/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php rename to NetworkSecurity/src/V1/InterceptEndpointGroup/ConnectedDeploymentGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/State.php b/NetworkSecurity/src/V1/InterceptEndpointGroup/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroup/State.php rename to NetworkSecurity/src/V1/InterceptEndpointGroup/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation.php b/NetworkSecurity/src/V1/InterceptEndpointGroupAssociation.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation.php rename to NetworkSecurity/src/V1/InterceptEndpointGroupAssociation.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails.php b/NetworkSecurity/src/V1/InterceptEndpointGroupAssociation/LocationDetails.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails.php rename to NetworkSecurity/src/V1/InterceptEndpointGroupAssociation/LocationDetails.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php b/NetworkSecurity/src/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php rename to NetworkSecurity/src/V1/InterceptEndpointGroupAssociation/LocationDetails/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/State.php b/NetworkSecurity/src/V1/InterceptEndpointGroupAssociation/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptEndpointGroupAssociation/State.php rename to NetworkSecurity/src/V1/InterceptEndpointGroupAssociation/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation.php b/NetworkSecurity/src/V1/InterceptLocation.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation.php rename to NetworkSecurity/src/V1/InterceptLocation.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation/State.php b/NetworkSecurity/src/V1/InterceptLocation/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/InterceptLocation/State.php rename to NetworkSecurity/src/V1/InterceptLocation/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesRequest.php b/NetworkSecurity/src/V1/ListAuthzPoliciesRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesRequest.php rename to NetworkSecurity/src/V1/ListAuthzPoliciesRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesResponse.php b/NetworkSecurity/src/V1/ListAuthzPoliciesResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthzPoliciesResponse.php rename to NetworkSecurity/src/V1/ListAuthzPoliciesResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsRequest.php b/NetworkSecurity/src/V1/ListBackendAuthenticationConfigsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsRequest.php rename to NetworkSecurity/src/V1/ListBackendAuthenticationConfigsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsResponse.php b/NetworkSecurity/src/V1/ListBackendAuthenticationConfigsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListBackendAuthenticationConfigsResponse.php rename to NetworkSecurity/src/V1/ListBackendAuthenticationConfigsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsRequest.php b/NetworkSecurity/src/V1/ListDnsThreatDetectorsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsRequest.php rename to NetworkSecurity/src/V1/ListDnsThreatDetectorsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsResponse.php b/NetworkSecurity/src/V1/ListDnsThreatDetectorsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListDnsThreatDetectorsResponse.php rename to NetworkSecurity/src/V1/ListDnsThreatDetectorsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsRequest.php b/NetworkSecurity/src/V1/ListFirewallEndpointAssociationsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsRequest.php rename to NetworkSecurity/src/V1/ListFirewallEndpointAssociationsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsResponse.php b/NetworkSecurity/src/V1/ListFirewallEndpointAssociationsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointAssociationsResponse.php rename to NetworkSecurity/src/V1/ListFirewallEndpointAssociationsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsRequest.php b/NetworkSecurity/src/V1/ListFirewallEndpointsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsRequest.php rename to NetworkSecurity/src/V1/ListFirewallEndpointsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsResponse.php b/NetworkSecurity/src/V1/ListFirewallEndpointsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListFirewallEndpointsResponse.php rename to NetworkSecurity/src/V1/ListFirewallEndpointsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesRequest.php b/NetworkSecurity/src/V1/ListGatewaySecurityPoliciesRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesRequest.php rename to NetworkSecurity/src/V1/ListGatewaySecurityPoliciesRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesResponse.php b/NetworkSecurity/src/V1/ListGatewaySecurityPoliciesResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPoliciesResponse.php rename to NetworkSecurity/src/V1/ListGatewaySecurityPoliciesResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesRequest.php b/NetworkSecurity/src/V1/ListGatewaySecurityPolicyRulesRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesRequest.php rename to NetworkSecurity/src/V1/ListGatewaySecurityPolicyRulesRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesResponse.php b/NetworkSecurity/src/V1/ListGatewaySecurityPolicyRulesResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListGatewaySecurityPolicyRulesResponse.php rename to NetworkSecurity/src/V1/ListGatewaySecurityPolicyRulesResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsRequest.php b/NetworkSecurity/src/V1/ListInterceptDeploymentGroupsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsRequest.php rename to NetworkSecurity/src/V1/ListInterceptDeploymentGroupsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsResponse.php b/NetworkSecurity/src/V1/ListInterceptDeploymentGroupsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentGroupsResponse.php rename to NetworkSecurity/src/V1/ListInterceptDeploymentGroupsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsRequest.php b/NetworkSecurity/src/V1/ListInterceptDeploymentsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsRequest.php rename to NetworkSecurity/src/V1/ListInterceptDeploymentsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsResponse.php b/NetworkSecurity/src/V1/ListInterceptDeploymentsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptDeploymentsResponse.php rename to NetworkSecurity/src/V1/ListInterceptDeploymentsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsRequest.php b/NetworkSecurity/src/V1/ListInterceptEndpointGroupAssociationsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsRequest.php rename to NetworkSecurity/src/V1/ListInterceptEndpointGroupAssociationsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsResponse.php b/NetworkSecurity/src/V1/ListInterceptEndpointGroupAssociationsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupAssociationsResponse.php rename to NetworkSecurity/src/V1/ListInterceptEndpointGroupAssociationsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsRequest.php b/NetworkSecurity/src/V1/ListInterceptEndpointGroupsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsRequest.php rename to NetworkSecurity/src/V1/ListInterceptEndpointGroupsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsResponse.php b/NetworkSecurity/src/V1/ListInterceptEndpointGroupsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListInterceptEndpointGroupsResponse.php rename to NetworkSecurity/src/V1/ListInterceptEndpointGroupsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsRequest.php b/NetworkSecurity/src/V1/ListMirroringDeploymentGroupsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsRequest.php rename to NetworkSecurity/src/V1/ListMirroringDeploymentGroupsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsResponse.php b/NetworkSecurity/src/V1/ListMirroringDeploymentGroupsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentGroupsResponse.php rename to NetworkSecurity/src/V1/ListMirroringDeploymentGroupsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsRequest.php b/NetworkSecurity/src/V1/ListMirroringDeploymentsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsRequest.php rename to NetworkSecurity/src/V1/ListMirroringDeploymentsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsResponse.php b/NetworkSecurity/src/V1/ListMirroringDeploymentsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringDeploymentsResponse.php rename to NetworkSecurity/src/V1/ListMirroringDeploymentsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsRequest.php b/NetworkSecurity/src/V1/ListMirroringEndpointGroupAssociationsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsRequest.php rename to NetworkSecurity/src/V1/ListMirroringEndpointGroupAssociationsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsResponse.php b/NetworkSecurity/src/V1/ListMirroringEndpointGroupAssociationsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupAssociationsResponse.php rename to NetworkSecurity/src/V1/ListMirroringEndpointGroupAssociationsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsRequest.php b/NetworkSecurity/src/V1/ListMirroringEndpointGroupsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsRequest.php rename to NetworkSecurity/src/V1/ListMirroringEndpointGroupsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsResponse.php b/NetworkSecurity/src/V1/ListMirroringEndpointGroupsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListMirroringEndpointGroupsResponse.php rename to NetworkSecurity/src/V1/ListMirroringEndpointGroupsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsRequest.php b/NetworkSecurity/src/V1/ListSecurityProfileGroupsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsRequest.php rename to NetworkSecurity/src/V1/ListSecurityProfileGroupsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsResponse.php b/NetworkSecurity/src/V1/ListSecurityProfileGroupsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfileGroupsResponse.php rename to NetworkSecurity/src/V1/ListSecurityProfileGroupsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesRequest.php b/NetworkSecurity/src/V1/ListSecurityProfilesRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesRequest.php rename to NetworkSecurity/src/V1/ListSecurityProfilesRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesResponse.php b/NetworkSecurity/src/V1/ListSecurityProfilesResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListSecurityProfilesResponse.php rename to NetworkSecurity/src/V1/ListSecurityProfilesResponse.php diff --git a/NetworkSecurity/src/V1/ListServerTlsPoliciesRequest.php b/NetworkSecurity/src/V1/ListServerTlsPoliciesRequest.php index 76d73b31f943..63dd0b8cfe3b 100644 --- a/NetworkSecurity/src/V1/ListServerTlsPoliciesRequest.php +++ b/NetworkSecurity/src/V1/ListServerTlsPoliciesRequest.php @@ -37,6 +37,16 @@ class ListServerTlsPoliciesRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string page_token = 3; */ protected $page_token = ''; + /** + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $return_partial_success = false; /** * @param string $parent Required. The project and location from which the ServerTlsPolicies should @@ -69,6 +79,12 @@ public static function build(string $parent): self * Indicates that this is a continuation of a prior * `ListServerTlsPolicies` call, and that the system * should return the next page of data. + * @type bool $return_partial_success + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. * } */ public function __construct($data = NULL) { @@ -162,5 +178,39 @@ public function setPageToken($var) return $this; } + /** + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getReturnPartialSuccess() + { + return $this->return_partial_success; + } + + /** + * Optional. Setting this field to `true` will opt the request into returning + * the resources that are reachable, and into including the names of those + * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] + * field. This can only be `true` when reading across collections e.g. when + * `parent` is set to `"projects/example/locations/-"`. + * + * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + } diff --git a/NetworkSecurity/src/V1/ListServerTlsPoliciesResponse.php b/NetworkSecurity/src/V1/ListServerTlsPoliciesResponse.php index 81bc15326131..715750ede395 100644 --- a/NetworkSecurity/src/V1/ListServerTlsPoliciesResponse.php +++ b/NetworkSecurity/src/V1/ListServerTlsPoliciesResponse.php @@ -29,6 +29,14 @@ class ListServerTlsPoliciesResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field string next_page_token = 2; */ protected $next_page_token = ''; + /** + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; /** * Constructor. @@ -42,6 +50,10 @@ class ListServerTlsPoliciesResponse extends \Google\Protobuf\Internal\Message * If there might be more results than those appearing in this response, then * `next_page_token` is included. To get the next set of results, call this * method again using the value of `next_page_token` as `page_token`. + * @type string[] $unreachable + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. * } */ public function __construct($data = NULL) { @@ -105,5 +117,35 @@ public function setNextPageToken($var) return $this; } + /** + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. Populated when the request opts into + * `return_partial_success` and reading across collections e.g. when + * attempting to list all resources across all supported locations. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + } diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesRequest.php b/NetworkSecurity/src/V1/ListTlsInspectionPoliciesRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesRequest.php rename to NetworkSecurity/src/V1/ListTlsInspectionPoliciesRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesResponse.php b/NetworkSecurity/src/V1/ListTlsInspectionPoliciesResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListTlsInspectionPoliciesResponse.php rename to NetworkSecurity/src/V1/ListTlsInspectionPoliciesResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsRequest.php b/NetworkSecurity/src/V1/ListUrlListsRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsRequest.php rename to NetworkSecurity/src/V1/ListUrlListsRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsResponse.php b/NetworkSecurity/src/V1/ListUrlListsResponse.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListUrlListsResponse.php rename to NetworkSecurity/src/V1/ListUrlListsResponse.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment.php b/NetworkSecurity/src/V1/MirroringDeployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment.php rename to NetworkSecurity/src/V1/MirroringDeployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment/State.php b/NetworkSecurity/src/V1/MirroringDeployment/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeployment/State.php rename to NetworkSecurity/src/V1/MirroringDeployment/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup.php b/NetworkSecurity/src/V1/MirroringDeploymentGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup.php rename to NetworkSecurity/src/V1/MirroringDeploymentGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php b/NetworkSecurity/src/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php rename to NetworkSecurity/src/V1/MirroringDeploymentGroup/ConnectedEndpointGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/Deployment.php b/NetworkSecurity/src/V1/MirroringDeploymentGroup/Deployment.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/Deployment.php rename to NetworkSecurity/src/V1/MirroringDeploymentGroup/Deployment.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/State.php b/NetworkSecurity/src/V1/MirroringDeploymentGroup/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringDeploymentGroup/State.php rename to NetworkSecurity/src/V1/MirroringDeploymentGroup/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup.php b/NetworkSecurity/src/V1/MirroringEndpointGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup.php rename to NetworkSecurity/src/V1/MirroringEndpointGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/AssociationDetails.php b/NetworkSecurity/src/V1/MirroringEndpointGroup/AssociationDetails.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/AssociationDetails.php rename to NetworkSecurity/src/V1/MirroringEndpointGroup/AssociationDetails.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php b/NetworkSecurity/src/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php rename to NetworkSecurity/src/V1/MirroringEndpointGroup/ConnectedDeploymentGroup.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/State.php b/NetworkSecurity/src/V1/MirroringEndpointGroup/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/State.php rename to NetworkSecurity/src/V1/MirroringEndpointGroup/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/Type.php b/NetworkSecurity/src/V1/MirroringEndpointGroup/Type.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroup/Type.php rename to NetworkSecurity/src/V1/MirroringEndpointGroup/Type.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation.php b/NetworkSecurity/src/V1/MirroringEndpointGroupAssociation.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation.php rename to NetworkSecurity/src/V1/MirroringEndpointGroupAssociation.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails.php b/NetworkSecurity/src/V1/MirroringEndpointGroupAssociation/LocationDetails.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails.php rename to NetworkSecurity/src/V1/MirroringEndpointGroupAssociation/LocationDetails.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php b/NetworkSecurity/src/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php rename to NetworkSecurity/src/V1/MirroringEndpointGroupAssociation/LocationDetails/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/State.php b/NetworkSecurity/src/V1/MirroringEndpointGroupAssociation/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringEndpointGroupAssociation/State.php rename to NetworkSecurity/src/V1/MirroringEndpointGroupAssociation/State.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation.php b/NetworkSecurity/src/V1/MirroringLocation.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation.php rename to NetworkSecurity/src/V1/MirroringLocation.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation/State.php b/NetworkSecurity/src/V1/MirroringLocation/State.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/MirroringLocation/State.php rename to NetworkSecurity/src/V1/MirroringLocation/State.php diff --git a/NetworkSecurity/src/V1/OperationMetadata.php b/NetworkSecurity/src/V1/OperationMetadata.php index 955c0aa5963c..79fda59f7239 100644 --- a/NetworkSecurity/src/V1/OperationMetadata.php +++ b/NetworkSecurity/src/V1/OperationMetadata.php @@ -48,8 +48,9 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message /** * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -80,8 +81,9 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message * @type bool $requested_cancellation * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. * @type string $api_version * Output only. API version used to start the operation. * } @@ -244,8 +246,9 @@ public function setStatusMessage($var) /** * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return bool @@ -258,8 +261,9 @@ public function getRequestedCancellation() /** * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param bool $var diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Protocol.php b/NetworkSecurity/src/V1/Protocol.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Protocol.php rename to NetworkSecurity/src/V1/Protocol.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile.php b/NetworkSecurity/src/V1/SecurityProfile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile.php rename to NetworkSecurity/src/V1/SecurityProfile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile/ProfileType.php b/NetworkSecurity/src/V1/SecurityProfile/ProfileType.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfile/ProfileType.php rename to NetworkSecurity/src/V1/SecurityProfile/ProfileType.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfileGroup.php b/NetworkSecurity/src/V1/SecurityProfileGroup.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SecurityProfileGroup.php rename to NetworkSecurity/src/V1/SecurityProfileGroup.php diff --git a/NetworkSecurity/src/V1/ServerTlsPolicy.php b/NetworkSecurity/src/V1/ServerTlsPolicy.php index db6f74c47bb1..86356418b237 100644 --- a/NetworkSecurity/src/V1/ServerTlsPolicy.php +++ b/NetworkSecurity/src/V1/ServerTlsPolicy.php @@ -11,7 +11,12 @@ /** * ServerTlsPolicy is a resource that specifies how a server should authenticate * incoming requests. This resource itself does not affect configuration unless - * it is attached to a target https proxy or endpoint config selector resource. + * it is attached to a target HTTPS proxy or endpoint config selector resource. + * ServerTlsPolicy in the form accepted by Application Load Balancers can + * be attached only to TargetHttpsProxy with an `EXTERNAL`, `EXTERNAL_MANAGED` + * or `INTERNAL_MANAGED` load balancing scheme. Traffic Director compatible + * ServerTlsPolicies can be attached to EndpointPolicy and TargetHttpsProxy with + * Traffic Director `INTERNAL_SELF_MANAGED` load balancing scheme. * * Generated from protobuf message google.cloud.networksecurity.v1.ServerTlsPolicy */ @@ -49,6 +54,8 @@ class ServerTlsPolicy extends \Google\Protobuf\Internal\Message */ private $labels; /** + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. * Determines if server allows plaintext connections. If set to true, server * allows plain text connections. By default, it is set to false. This setting * is not exclusive of other encryption modes. For example, if `allow_open` @@ -62,6 +69,8 @@ class ServerTlsPolicy extends \Google\Protobuf\Internal\Message */ protected $allow_open = false; /** + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. * Defines a mechanism to provision server identity (public and private keys). * Cannot be combined with `allow_open` as a permissive mode that allows both * plain text and TLS is not supported. @@ -70,6 +79,8 @@ class ServerTlsPolicy extends \Google\Protobuf\Internal\Message */ protected $server_certificate = null; /** + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. * Defines a mechanism to provision peer validation certificates for peer to * peer authentication (Mutual TLS - mTLS). If not specified, client * certificate will not be requested. The connection is treated as TLS and not @@ -98,6 +109,8 @@ class ServerTlsPolicy extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\MapField $labels * Set of label tags associated with the resource. * @type bool $allow_open + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. * Determines if server allows plaintext connections. If set to true, server * allows plain text connections. By default, it is set to false. This setting * is not exclusive of other encryption modes. For example, if `allow_open` @@ -107,10 +120,14 @@ class ServerTlsPolicy extends \Google\Protobuf\Internal\Message * Consider using it if you wish to upgrade in place your deployment to TLS * while having mixed TLS and non-TLS traffic reaching port :80. * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $server_certificate + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. * Defines a mechanism to provision server identity (public and private keys). * Cannot be combined with `allow_open` as a permissive mode that allows both * plain text and TLS is not supported. * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $mtls_policy + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. * Defines a mechanism to provision peer validation certificates for peer to * peer authentication (Mutual TLS - mTLS). If not specified, client * certificate will not be requested. The connection is treated as TLS and not @@ -276,6 +293,8 @@ public function setLabels($var) } /** + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. * Determines if server allows plaintext connections. If set to true, server * allows plain text connections. By default, it is set to false. This setting * is not exclusive of other encryption modes. For example, if `allow_open` @@ -294,6 +313,8 @@ public function getAllowOpen() } /** + * This field applies only for Traffic Director policies. It is must be set to + * false for Application Load Balancer policies. * Determines if server allows plaintext connections. If set to true, server * allows plain text connections. By default, it is set to false. This setting * is not exclusive of other encryption modes. For example, if `allow_open` @@ -316,6 +337,8 @@ public function setAllowOpen($var) } /** + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. * Defines a mechanism to provision server identity (public and private keys). * Cannot be combined with `allow_open` as a permissive mode that allows both * plain text and TLS is not supported. @@ -339,6 +362,8 @@ public function clearServerCertificate() } /** + * Optional if policy is to be used with Traffic Director. For Application + * Load Balancers must be empty. * Defines a mechanism to provision server identity (public and private keys). * Cannot be combined with `allow_open` as a permissive mode that allows both * plain text and TLS is not supported. @@ -356,6 +381,8 @@ public function setServerCertificate($var) } /** + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. * Defines a mechanism to provision peer validation certificates for peer to * peer authentication (Mutual TLS - mTLS). If not specified, client * certificate will not be requested. The connection is treated as TLS and not @@ -381,6 +408,8 @@ public function clearMtlsPolicy() } /** + * This field is required if the policy is used with Application Load + * Balancers. This field can be empty for Traffic Director. * Defines a mechanism to provision peer validation certificates for peer to * peer authentication (Mutual TLS - mTLS). If not specified, client * certificate will not be requested. The connection is treated as TLS and not diff --git a/NetworkSecurity/src/V1/ServerTlsPolicy/MTLSPolicy.php b/NetworkSecurity/src/V1/ServerTlsPolicy/MTLSPolicy.php index d147d742b8a3..cd12e01e6eff 100644 --- a/NetworkSecurity/src/V1/ServerTlsPolicy/MTLSPolicy.php +++ b/NetworkSecurity/src/V1/ServerTlsPolicy/MTLSPolicy.php @@ -16,12 +16,35 @@ class MTLSPolicy extends \Google\Protobuf\Internal\Message { /** + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; + */ + protected $client_validation_mode = 0; + /** + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. * Defines the mechanism to obtain the Certificate Authority certificate to * validate the client certificate. * * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; */ private $client_validation_ca; + /** + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. + * + * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { + */ + protected $client_validation_trust_config = ''; /** * Constructor. @@ -29,9 +52,24 @@ class MTLSPolicy extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type int $client_validation_mode + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. * @type \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $client_validation_ca + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. * Defines the mechanism to obtain the Certificate Authority certificate to * validate the client certificate. + * @type string $client_validation_trust_config + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. * } */ public function __construct($data = NULL) { @@ -40,6 +78,42 @@ public function __construct($data = NULL) { } /** + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; + * @return int + */ + public function getClientValidationMode() + { + return $this->client_validation_mode; + } + + /** + * When the client presents an invalid certificate or no certificate to the + * load balancer, the `client_validation_mode` specifies how the client + * connection is handled. + * Required if the policy is to be used with the Application Load + * Balancers. For Traffic Director it must be empty. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; + * @param int $var + * @return $this + */ + public function setClientValidationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy\ClientValidationMode::class); + $this->client_validation_mode = $var; + + return $this; + } + + /** + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. * Defines the mechanism to obtain the Certificate Authority certificate to * validate the client certificate. * @@ -52,6 +126,8 @@ public function getClientValidationCa() } /** + * Required if the policy is to be used with Traffic Director. For + * Application Load Balancers it must be empty. * Defines the mechanism to obtain the Certificate Authority certificate to * validate the client certificate. * @@ -67,5 +143,41 @@ public function setClientValidationCa($var) return $this; } + /** + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. + * + * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getClientValidationTrustConfig() + { + return $this->client_validation_trust_config; + } + + /** + * Reference to the TrustConfig from certificatemanager.googleapis.com + * namespace. + * If specified, the chain validation will be performed against certificates + * configured in the given TrustConfig. + * Allowed only if the policy is to be used with Application Load + * Balancers. + * + * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setClientValidationTrustConfig($var) + { + GPBUtil::checkString($var, True); + $this->client_validation_trust_config = $var; + + return $this; + } + } diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php b/NetworkSecurity/src/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php rename to NetworkSecurity/src/V1/ServerTlsPolicy/MTLSPolicy/ClientValidationMode.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Severity.php b/NetworkSecurity/src/V1/Severity.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/Severity.php rename to NetworkSecurity/src/V1/Severity.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SeverityOverride.php b/NetworkSecurity/src/V1/SeverityOverride.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/SeverityOverride.php rename to NetworkSecurity/src/V1/SeverityOverride.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatAction.php b/NetworkSecurity/src/V1/ThreatAction.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatAction.php rename to NetworkSecurity/src/V1/ThreatAction.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatOverride.php b/NetworkSecurity/src/V1/ThreatOverride.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatOverride.php rename to NetworkSecurity/src/V1/ThreatOverride.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatPreventionProfile.php b/NetworkSecurity/src/V1/ThreatPreventionProfile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatPreventionProfile.php rename to NetworkSecurity/src/V1/ThreatPreventionProfile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatType.php b/NetworkSecurity/src/V1/ThreatType.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ThreatType.php rename to NetworkSecurity/src/V1/ThreatType.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy.php b/NetworkSecurity/src/V1/TlsInspectionPolicy.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy.php rename to NetworkSecurity/src/V1/TlsInspectionPolicy.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/Profile.php b/NetworkSecurity/src/V1/TlsInspectionPolicy/Profile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/Profile.php rename to NetworkSecurity/src/V1/TlsInspectionPolicy/Profile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/TlsVersion.php b/NetworkSecurity/src/V1/TlsInspectionPolicy/TlsVersion.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/TlsInspectionPolicy/TlsVersion.php rename to NetworkSecurity/src/V1/TlsInspectionPolicy/TlsVersion.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthzPolicyRequest.php b/NetworkSecurity/src/V1/UpdateAuthzPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthzPolicyRequest.php rename to NetworkSecurity/src/V1/UpdateAuthzPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateBackendAuthenticationConfigRequest.php b/NetworkSecurity/src/V1/UpdateBackendAuthenticationConfigRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateBackendAuthenticationConfigRequest.php rename to NetworkSecurity/src/V1/UpdateBackendAuthenticationConfigRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateDnsThreatDetectorRequest.php b/NetworkSecurity/src/V1/UpdateDnsThreatDetectorRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateDnsThreatDetectorRequest.php rename to NetworkSecurity/src/V1/UpdateDnsThreatDetectorRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointAssociationRequest.php b/NetworkSecurity/src/V1/UpdateFirewallEndpointAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointAssociationRequest.php rename to NetworkSecurity/src/V1/UpdateFirewallEndpointAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointRequest.php b/NetworkSecurity/src/V1/UpdateFirewallEndpointRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateFirewallEndpointRequest.php rename to NetworkSecurity/src/V1/UpdateFirewallEndpointRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRequest.php b/NetworkSecurity/src/V1/UpdateGatewaySecurityPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRequest.php rename to NetworkSecurity/src/V1/UpdateGatewaySecurityPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRuleRequest.php b/NetworkSecurity/src/V1/UpdateGatewaySecurityPolicyRuleRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateGatewaySecurityPolicyRuleRequest.php rename to NetworkSecurity/src/V1/UpdateGatewaySecurityPolicyRuleRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentGroupRequest.php b/NetworkSecurity/src/V1/UpdateInterceptDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/UpdateInterceptDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentRequest.php b/NetworkSecurity/src/V1/UpdateInterceptDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptDeploymentRequest.php rename to NetworkSecurity/src/V1/UpdateInterceptDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/UpdateInterceptEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/UpdateInterceptEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupRequest.php b/NetworkSecurity/src/V1/UpdateInterceptEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateInterceptEndpointGroupRequest.php rename to NetworkSecurity/src/V1/UpdateInterceptEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentGroupRequest.php b/NetworkSecurity/src/V1/UpdateMirroringDeploymentGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentGroupRequest.php rename to NetworkSecurity/src/V1/UpdateMirroringDeploymentGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentRequest.php b/NetworkSecurity/src/V1/UpdateMirroringDeploymentRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringDeploymentRequest.php rename to NetworkSecurity/src/V1/UpdateMirroringDeploymentRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupAssociationRequest.php b/NetworkSecurity/src/V1/UpdateMirroringEndpointGroupAssociationRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupAssociationRequest.php rename to NetworkSecurity/src/V1/UpdateMirroringEndpointGroupAssociationRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupRequest.php b/NetworkSecurity/src/V1/UpdateMirroringEndpointGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateMirroringEndpointGroupRequest.php rename to NetworkSecurity/src/V1/UpdateMirroringEndpointGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileGroupRequest.php b/NetworkSecurity/src/V1/UpdateSecurityProfileGroupRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileGroupRequest.php rename to NetworkSecurity/src/V1/UpdateSecurityProfileGroupRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileRequest.php b/NetworkSecurity/src/V1/UpdateSecurityProfileRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateSecurityProfileRequest.php rename to NetworkSecurity/src/V1/UpdateSecurityProfileRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateTlsInspectionPolicyRequest.php b/NetworkSecurity/src/V1/UpdateTlsInspectionPolicyRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateTlsInspectionPolicyRequest.php rename to NetworkSecurity/src/V1/UpdateTlsInspectionPolicyRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateUrlListRequest.php b/NetworkSecurity/src/V1/UpdateUrlListRequest.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateUrlListRequest.php rename to NetworkSecurity/src/V1/UpdateUrlListRequest.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter.php b/NetworkSecurity/src/V1/UrlFilter.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter.php rename to NetworkSecurity/src/V1/UrlFilter.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter/UrlFilteringAction.php b/NetworkSecurity/src/V1/UrlFilter/UrlFilteringAction.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilter/UrlFilteringAction.php rename to NetworkSecurity/src/V1/UrlFilter/UrlFilteringAction.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilteringProfile.php b/NetworkSecurity/src/V1/UrlFilteringProfile.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlFilteringProfile.php rename to NetworkSecurity/src/V1/UrlFilteringProfile.php diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlList.php b/NetworkSecurity/src/V1/UrlList.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UrlList.php rename to NetworkSecurity/src/V1/UrlList.php diff --git a/NetworkSecurity/src/V1/gapic_metadata.json b/NetworkSecurity/src/V1/gapic_metadata.json index 3aa61eb6f3b0..17634b27cc60 100644 --- a/NetworkSecurity/src/V1/gapic_metadata.json +++ b/NetworkSecurity/src/V1/gapic_metadata.json @@ -163,6 +163,417 @@ } } }, + "DnsThreatDetectorService": { + "clients": { + "grpc": { + "libraryClient": "DnsThreatDetectorServiceGapicClient", + "rpcs": { + "CreateDnsThreatDetector": { + "methods": [ + "createDnsThreatDetector" + ] + }, + "DeleteDnsThreatDetector": { + "methods": [ + "deleteDnsThreatDetector" + ] + }, + "GetDnsThreatDetector": { + "methods": [ + "getDnsThreatDetector" + ] + }, + "ListDnsThreatDetectors": { + "methods": [ + "listDnsThreatDetectors" + ] + }, + "UpdateDnsThreatDetector": { + "methods": [ + "updateDnsThreatDetector" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "FirewallActivation": { + "clients": { + "grpc": { + "libraryClient": "FirewallActivationGapicClient", + "rpcs": { + "CreateFirewallEndpoint": { + "methods": [ + "createFirewallEndpoint" + ] + }, + "CreateFirewallEndpointAssociation": { + "methods": [ + "createFirewallEndpointAssociation" + ] + }, + "DeleteFirewallEndpoint": { + "methods": [ + "deleteFirewallEndpoint" + ] + }, + "DeleteFirewallEndpointAssociation": { + "methods": [ + "deleteFirewallEndpointAssociation" + ] + }, + "GetFirewallEndpoint": { + "methods": [ + "getFirewallEndpoint" + ] + }, + "GetFirewallEndpointAssociation": { + "methods": [ + "getFirewallEndpointAssociation" + ] + }, + "ListFirewallEndpointAssociations": { + "methods": [ + "listFirewallEndpointAssociations" + ] + }, + "ListFirewallEndpoints": { + "methods": [ + "listFirewallEndpoints" + ] + }, + "UpdateFirewallEndpoint": { + "methods": [ + "updateFirewallEndpoint" + ] + }, + "UpdateFirewallEndpointAssociation": { + "methods": [ + "updateFirewallEndpointAssociation" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "Intercept": { + "clients": { + "grpc": { + "libraryClient": "InterceptGapicClient", + "rpcs": { + "CreateInterceptDeployment": { + "methods": [ + "createInterceptDeployment" + ] + }, + "CreateInterceptDeploymentGroup": { + "methods": [ + "createInterceptDeploymentGroup" + ] + }, + "CreateInterceptEndpointGroup": { + "methods": [ + "createInterceptEndpointGroup" + ] + }, + "CreateInterceptEndpointGroupAssociation": { + "methods": [ + "createInterceptEndpointGroupAssociation" + ] + }, + "DeleteInterceptDeployment": { + "methods": [ + "deleteInterceptDeployment" + ] + }, + "DeleteInterceptDeploymentGroup": { + "methods": [ + "deleteInterceptDeploymentGroup" + ] + }, + "DeleteInterceptEndpointGroup": { + "methods": [ + "deleteInterceptEndpointGroup" + ] + }, + "DeleteInterceptEndpointGroupAssociation": { + "methods": [ + "deleteInterceptEndpointGroupAssociation" + ] + }, + "GetInterceptDeployment": { + "methods": [ + "getInterceptDeployment" + ] + }, + "GetInterceptDeploymentGroup": { + "methods": [ + "getInterceptDeploymentGroup" + ] + }, + "GetInterceptEndpointGroup": { + "methods": [ + "getInterceptEndpointGroup" + ] + }, + "GetInterceptEndpointGroupAssociation": { + "methods": [ + "getInterceptEndpointGroupAssociation" + ] + }, + "ListInterceptDeploymentGroups": { + "methods": [ + "listInterceptDeploymentGroups" + ] + }, + "ListInterceptDeployments": { + "methods": [ + "listInterceptDeployments" + ] + }, + "ListInterceptEndpointGroupAssociations": { + "methods": [ + "listInterceptEndpointGroupAssociations" + ] + }, + "ListInterceptEndpointGroups": { + "methods": [ + "listInterceptEndpointGroups" + ] + }, + "UpdateInterceptDeployment": { + "methods": [ + "updateInterceptDeployment" + ] + }, + "UpdateInterceptDeploymentGroup": { + "methods": [ + "updateInterceptDeploymentGroup" + ] + }, + "UpdateInterceptEndpointGroup": { + "methods": [ + "updateInterceptEndpointGroup" + ] + }, + "UpdateInterceptEndpointGroupAssociation": { + "methods": [ + "updateInterceptEndpointGroupAssociation" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "Mirroring": { + "clients": { + "grpc": { + "libraryClient": "MirroringGapicClient", + "rpcs": { + "CreateMirroringDeployment": { + "methods": [ + "createMirroringDeployment" + ] + }, + "CreateMirroringDeploymentGroup": { + "methods": [ + "createMirroringDeploymentGroup" + ] + }, + "CreateMirroringEndpointGroup": { + "methods": [ + "createMirroringEndpointGroup" + ] + }, + "CreateMirroringEndpointGroupAssociation": { + "methods": [ + "createMirroringEndpointGroupAssociation" + ] + }, + "DeleteMirroringDeployment": { + "methods": [ + "deleteMirroringDeployment" + ] + }, + "DeleteMirroringDeploymentGroup": { + "methods": [ + "deleteMirroringDeploymentGroup" + ] + }, + "DeleteMirroringEndpointGroup": { + "methods": [ + "deleteMirroringEndpointGroup" + ] + }, + "DeleteMirroringEndpointGroupAssociation": { + "methods": [ + "deleteMirroringEndpointGroupAssociation" + ] + }, + "GetMirroringDeployment": { + "methods": [ + "getMirroringDeployment" + ] + }, + "GetMirroringDeploymentGroup": { + "methods": [ + "getMirroringDeploymentGroup" + ] + }, + "GetMirroringEndpointGroup": { + "methods": [ + "getMirroringEndpointGroup" + ] + }, + "GetMirroringEndpointGroupAssociation": { + "methods": [ + "getMirroringEndpointGroupAssociation" + ] + }, + "ListMirroringDeploymentGroups": { + "methods": [ + "listMirroringDeploymentGroups" + ] + }, + "ListMirroringDeployments": { + "methods": [ + "listMirroringDeployments" + ] + }, + "ListMirroringEndpointGroupAssociations": { + "methods": [ + "listMirroringEndpointGroupAssociations" + ] + }, + "ListMirroringEndpointGroups": { + "methods": [ + "listMirroringEndpointGroups" + ] + }, + "UpdateMirroringDeployment": { + "methods": [ + "updateMirroringDeployment" + ] + }, + "UpdateMirroringDeploymentGroup": { + "methods": [ + "updateMirroringDeploymentGroup" + ] + }, + "UpdateMirroringEndpointGroup": { + "methods": [ + "updateMirroringEndpointGroup" + ] + }, + "UpdateMirroringEndpointGroupAssociation": { + "methods": [ + "updateMirroringEndpointGroupAssociation" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, "NetworkSecurity": { "clients": { "grpc": { @@ -173,76 +584,310 @@ "createAuthorizationPolicy" ] }, + "CreateAuthzPolicy": { + "methods": [ + "createAuthzPolicy" + ] + }, + "CreateBackendAuthenticationConfig": { + "methods": [ + "createBackendAuthenticationConfig" + ] + }, "CreateClientTlsPolicy": { "methods": [ "createClientTlsPolicy" ] }, + "CreateGatewaySecurityPolicy": { + "methods": [ + "createGatewaySecurityPolicy" + ] + }, + "CreateGatewaySecurityPolicyRule": { + "methods": [ + "createGatewaySecurityPolicyRule" + ] + }, "CreateServerTlsPolicy": { "methods": [ "createServerTlsPolicy" ] }, + "CreateTlsInspectionPolicy": { + "methods": [ + "createTlsInspectionPolicy" + ] + }, + "CreateUrlList": { + "methods": [ + "createUrlList" + ] + }, "DeleteAuthorizationPolicy": { "methods": [ "deleteAuthorizationPolicy" ] }, + "DeleteAuthzPolicy": { + "methods": [ + "deleteAuthzPolicy" + ] + }, + "DeleteBackendAuthenticationConfig": { + "methods": [ + "deleteBackendAuthenticationConfig" + ] + }, "DeleteClientTlsPolicy": { "methods": [ "deleteClientTlsPolicy" ] }, + "DeleteGatewaySecurityPolicy": { + "methods": [ + "deleteGatewaySecurityPolicy" + ] + }, + "DeleteGatewaySecurityPolicyRule": { + "methods": [ + "deleteGatewaySecurityPolicyRule" + ] + }, "DeleteServerTlsPolicy": { "methods": [ "deleteServerTlsPolicy" ] }, + "DeleteTlsInspectionPolicy": { + "methods": [ + "deleteTlsInspectionPolicy" + ] + }, + "DeleteUrlList": { + "methods": [ + "deleteUrlList" + ] + }, "GetAuthorizationPolicy": { "methods": [ "getAuthorizationPolicy" ] }, + "GetAuthzPolicy": { + "methods": [ + "getAuthzPolicy" + ] + }, + "GetBackendAuthenticationConfig": { + "methods": [ + "getBackendAuthenticationConfig" + ] + }, "GetClientTlsPolicy": { "methods": [ "getClientTlsPolicy" ] }, + "GetGatewaySecurityPolicy": { + "methods": [ + "getGatewaySecurityPolicy" + ] + }, + "GetGatewaySecurityPolicyRule": { + "methods": [ + "getGatewaySecurityPolicyRule" + ] + }, "GetServerTlsPolicy": { "methods": [ "getServerTlsPolicy" ] }, + "GetTlsInspectionPolicy": { + "methods": [ + "getTlsInspectionPolicy" + ] + }, + "GetUrlList": { + "methods": [ + "getUrlList" + ] + }, "ListAuthorizationPolicies": { "methods": [ "listAuthorizationPolicies" ] }, + "ListAuthzPolicies": { + "methods": [ + "listAuthzPolicies" + ] + }, + "ListBackendAuthenticationConfigs": { + "methods": [ + "listBackendAuthenticationConfigs" + ] + }, "ListClientTlsPolicies": { "methods": [ "listClientTlsPolicies" ] }, + "ListGatewaySecurityPolicies": { + "methods": [ + "listGatewaySecurityPolicies" + ] + }, + "ListGatewaySecurityPolicyRules": { + "methods": [ + "listGatewaySecurityPolicyRules" + ] + }, "ListServerTlsPolicies": { "methods": [ "listServerTlsPolicies" ] }, + "ListTlsInspectionPolicies": { + "methods": [ + "listTlsInspectionPolicies" + ] + }, + "ListUrlLists": { + "methods": [ + "listUrlLists" + ] + }, "UpdateAuthorizationPolicy": { "methods": [ "updateAuthorizationPolicy" ] }, + "UpdateAuthzPolicy": { + "methods": [ + "updateAuthzPolicy" + ] + }, + "UpdateBackendAuthenticationConfig": { + "methods": [ + "updateBackendAuthenticationConfig" + ] + }, "UpdateClientTlsPolicy": { "methods": [ "updateClientTlsPolicy" ] }, + "UpdateGatewaySecurityPolicy": { + "methods": [ + "updateGatewaySecurityPolicy" + ] + }, + "UpdateGatewaySecurityPolicyRule": { + "methods": [ + "updateGatewaySecurityPolicyRule" + ] + }, "UpdateServerTlsPolicy": { "methods": [ "updateServerTlsPolicy" ] }, + "UpdateTlsInspectionPolicy": { + "methods": [ + "updateTlsInspectionPolicy" + ] + }, + "UpdateUrlList": { + "methods": [ + "updateUrlList" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "OrganizationSecurityProfileGroupService": { + "clients": { + "grpc": { + "libraryClient": "OrganizationSecurityProfileGroupServiceGapicClient", + "rpcs": { + "CreateSecurityProfile": { + "methods": [ + "createSecurityProfile" + ] + }, + "CreateSecurityProfileGroup": { + "methods": [ + "createSecurityProfileGroup" + ] + }, + "DeleteSecurityProfile": { + "methods": [ + "deleteSecurityProfile" + ] + }, + "DeleteSecurityProfileGroup": { + "methods": [ + "deleteSecurityProfileGroup" + ] + }, + "GetSecurityProfile": { + "methods": [ + "getSecurityProfile" + ] + }, + "GetSecurityProfileGroup": { + "methods": [ + "getSecurityProfileGroup" + ] + }, + "ListSecurityProfileGroups": { + "methods": [ + "listSecurityProfileGroups" + ] + }, + "ListSecurityProfiles": { + "methods": [ + "listSecurityProfiles" + ] + }, + "UpdateSecurityProfile": { + "methods": [ + "updateSecurityProfile" + ] + }, + "UpdateSecurityProfileGroup": { + "methods": [ + "updateSecurityProfileGroup" + ] + }, "GetLocation": { "methods": [ "getLocation" diff --git a/NetworkSecurity/src/V1/resources/address_group_service_rest_client_config.php b/NetworkSecurity/src/V1/resources/address_group_service_rest_client_config.php index 34ff34c6cc22..b061a0b0b383 100644 --- a/NetworkSecurity/src/V1/resources/address_group_service_rest_client_config.php +++ b/NetworkSecurity/src/V1/resources/address_group_service_rest_client_config.php @@ -171,11 +171,11 @@ 'google.iam.v1.IAMPolicy' => [ 'GetIamPolicy' => [ 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', 'additionalBindings' => [ [ 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', ], [ 'method' => 'get', @@ -189,6 +189,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], ], 'placeholders' => [ 'resource' => [ @@ -200,12 +204,12 @@ ], 'SetIamPolicy' => [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', 'body' => '*', 'additionalBindings' => [ [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', 'body' => '*', ], [ @@ -223,6 +227,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ @@ -234,12 +243,12 @@ ], 'TestIamPermissions' => [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', 'body' => '*', 'additionalBindings' => [ [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', 'body' => '*', ], [ @@ -257,6 +266,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_client_config.json b/NetworkSecurity/src/V1/resources/dns_threat_detector_service_client_config.json similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_client_config.json rename to NetworkSecurity/src/V1/resources/dns_threat_detector_service_client_config.json diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_descriptor_config.php b/NetworkSecurity/src/V1/resources/dns_threat_detector_service_descriptor_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_descriptor_config.php rename to NetworkSecurity/src/V1/resources/dns_threat_detector_service_descriptor_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_rest_client_config.php b/NetworkSecurity/src/V1/resources/dns_threat_detector_service_rest_client_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/dns_threat_detector_service_rest_client_config.php rename to NetworkSecurity/src/V1/resources/dns_threat_detector_service_rest_client_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_client_config.json b/NetworkSecurity/src/V1/resources/firewall_activation_client_config.json similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_client_config.json rename to NetworkSecurity/src/V1/resources/firewall_activation_client_config.json diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_descriptor_config.php b/NetworkSecurity/src/V1/resources/firewall_activation_descriptor_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_descriptor_config.php rename to NetworkSecurity/src/V1/resources/firewall_activation_descriptor_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_rest_client_config.php b/NetworkSecurity/src/V1/resources/firewall_activation_rest_client_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/firewall_activation_rest_client_config.php rename to NetworkSecurity/src/V1/resources/firewall_activation_rest_client_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_client_config.json b/NetworkSecurity/src/V1/resources/intercept_client_config.json similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_client_config.json rename to NetworkSecurity/src/V1/resources/intercept_client_config.json diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_descriptor_config.php b/NetworkSecurity/src/V1/resources/intercept_descriptor_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_descriptor_config.php rename to NetworkSecurity/src/V1/resources/intercept_descriptor_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_rest_client_config.php b/NetworkSecurity/src/V1/resources/intercept_rest_client_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/intercept_rest_client_config.php rename to NetworkSecurity/src/V1/resources/intercept_rest_client_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_client_config.json b/NetworkSecurity/src/V1/resources/mirroring_client_config.json similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_client_config.json rename to NetworkSecurity/src/V1/resources/mirroring_client_config.json diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_descriptor_config.php b/NetworkSecurity/src/V1/resources/mirroring_descriptor_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_descriptor_config.php rename to NetworkSecurity/src/V1/resources/mirroring_descriptor_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_rest_client_config.php b/NetworkSecurity/src/V1/resources/mirroring_rest_client_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/mirroring_rest_client_config.php rename to NetworkSecurity/src/V1/resources/mirroring_rest_client_config.php diff --git a/NetworkSecurity/src/V1/resources/network_security_client_config.json b/NetworkSecurity/src/V1/resources/network_security_client_config.json index b5df05cb5c82..69d95d98d336 100644 --- a/NetworkSecurity/src/V1/resources/network_security_client_config.json +++ b/NetworkSecurity/src/V1/resources/network_security_client_config.json @@ -31,76 +31,226 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "CreateAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "CreateClientTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "CreateGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "CreateServerTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "CreateTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "DeleteAuthorizationPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "DeleteAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "DeleteClientTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "DeleteGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "DeleteServerTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "DeleteTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "GetAuthorizationPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "GetAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "GetClientTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "GetGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "GetServerTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "GetTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "ListAuthorizationPolicies": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "ListAuthzPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListBackendAuthenticationConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "ListClientTlsPolicies": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "ListGatewaySecurityPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListGatewaySecurityPolicyRules": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "ListServerTlsPolicies": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "ListTlsInspectionPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListUrlLists": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "UpdateAuthorizationPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "UpdateAuthzPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackendAuthenticationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "UpdateClientTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "UpdateGatewaySecurityPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGatewaySecurityPolicyRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "UpdateServerTlsPolicy": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "UpdateTlsInspectionPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateUrlList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "GetLocation": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", diff --git a/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php b/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php index 37aaa8d95d71..d58a959a6dd9 100644 --- a/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php +++ b/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php @@ -42,6 +42,44 @@ ], ], ], + 'CreateAuthzPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthzPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackendAuthenticationConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'CreateClientTlsPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', @@ -61,6 +99,44 @@ ], ], ], + 'CreateGatewaySecurityPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGatewaySecurityPolicyRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'CreateServerTlsPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', @@ -80,6 +156,44 @@ ], ], ], + 'CreateTlsInspectionPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUrlList' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\UrlList', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'DeleteAuthorizationPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', @@ -99,6 +213,44 @@ ], ], ], + 'DeleteAuthzPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackendAuthenticationConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'DeleteClientTlsPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', @@ -118,6 +270,44 @@ ], ], ], + 'DeleteGatewaySecurityPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGatewaySecurityPolicyRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'DeleteServerTlsPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', @@ -137,6 +327,44 @@ ], ], ], + 'DeleteTlsInspectionPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUrlList' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'UpdateAuthorizationPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', @@ -157,6 +385,46 @@ ], ], ], + 'UpdateAuthzPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthzPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'authz_policy.name', + 'fieldAccessors' => [ + 'getAuthzPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateBackendAuthenticationConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backend_authentication_config.name', + 'fieldAccessors' => [ + 'getBackendAuthenticationConfig', + 'getName', + ], + ], + ], + ], 'UpdateClientTlsPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', @@ -177,6 +445,46 @@ ], ], ], + 'UpdateGatewaySecurityPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'gateway_security_policy.name', + 'fieldAccessors' => [ + 'getGatewaySecurityPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGatewaySecurityPolicyRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'gateway_security_policy_rule.name', + 'fieldAccessors' => [ + 'getGatewaySecurityPolicyRule', + 'getName', + ], + ], + ], + ], 'UpdateServerTlsPolicy' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', @@ -197,6 +505,46 @@ ], ], ], + 'UpdateTlsInspectionPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'tls_inspection_policy.name', + 'fieldAccessors' => [ + 'getTlsInspectionPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateUrlList' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\UrlList', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'url_list.name', + 'fieldAccessors' => [ + 'getUrlList', + 'getName', + ], + ], + ], + ], 'GetAuthorizationPolicy' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', @@ -209,6 +557,30 @@ ], ], ], + 'GetAuthzPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthzPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackendAuthenticationConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetClientTlsPolicy' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', @@ -221,6 +593,30 @@ ], ], ], + 'GetGatewaySecurityPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGatewaySecurityPolicyRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetServerTlsPolicy' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', @@ -233,6 +629,30 @@ ], ], ], + 'GetTlsInspectionPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUrlList' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\UrlList', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'ListAuthorizationPolicies' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -253,6 +673,46 @@ ], ], ], + 'ListAuthzPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuthzPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAuthzPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackendAuthenticationConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackendAuthenticationConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListBackendAuthenticationConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'ListClientTlsPolicies' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -273,6 +733,46 @@ ], ], ], + 'ListGatewaySecurityPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGatewaySecurityPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGatewaySecurityPolicyRules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGatewaySecurityPolicyRules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPolicyRulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'ListServerTlsPolicies' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -293,6 +793,46 @@ ], ], ], + 'ListTlsInspectionPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTlsInspectionPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListTlsInspectionPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUrlLists' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUrlLists', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListUrlListsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'GetLocation' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\Location\Location', @@ -368,9 +908,18 @@ ], 'templateMap' => [ 'authorizationPolicy' => 'projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}', + 'authzPolicy' => 'projects/{project}/locations/{location}/authzPolicies/{authz_policy}', + 'backendAuthenticationConfig' => 'projects/{project}/locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}', + 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', + 'certificate' => 'projects/{project}/locations/{location}/certificates/{certificate}', 'clientTlsPolicy' => 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}', + 'gatewaySecurityPolicy' => 'projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}', + 'gatewaySecurityPolicyRule' => 'projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}', 'location' => 'projects/{project}/locations/{location}', 'serverTlsPolicy' => 'projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}', + 'tlsInspectionPolicy' => 'projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}', + 'trustConfig' => 'projects/{project}/locations/{location}/trustConfigs/{trust_config}', + 'urlList' => 'projects/{project}/locations/{location}/urlLists/{url_list}', ], ], ], diff --git a/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php b/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php index d41ed5dde517..6d22caeb9540 100644 --- a/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php +++ b/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php @@ -74,6 +74,36 @@ 'authorization_policy_id', ], ], + 'CreateAuthzPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authzPolicies', + 'body' => 'authz_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'authz_policy_id', + ], + ], + 'CreateBackendAuthenticationConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs', + 'body' => 'backend_authentication_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backend_authentication_config_id', + ], + ], 'CreateClientTlsPolicy' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', @@ -89,6 +119,33 @@ 'client_tls_policy_id', ], ], + 'CreateGatewaySecurityPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies', + 'body' => 'gateway_security_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'gateway_security_policy_id', + ], + ], + 'CreateGatewaySecurityPolicyRule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules', + 'body' => 'gateway_security_policy_rule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'CreateServerTlsPolicy' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', @@ -104,6 +161,36 @@ 'server_tls_policy_id', ], ], + 'CreateTlsInspectionPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies', + 'body' => 'tls_inspection_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tls_inspection_policy_id', + ], + ], + 'CreateUrlList' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/urlLists', + 'body' => 'url_list', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'url_list_id', + ], + ], 'DeleteAuthorizationPolicy' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', @@ -115,6 +202,28 @@ ], ], ], + 'DeleteAuthzPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authzPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackendAuthenticationConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'DeleteClientTlsPolicy' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', @@ -126,6 +235,28 @@ ], ], ], + 'DeleteGatewaySecurityPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGatewaySecurityPolicyRule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'DeleteServerTlsPolicy' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', @@ -137,6 +268,28 @@ ], ], ], + 'DeleteTlsInspectionPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUrlList' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/urlLists/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetAuthorizationPolicy' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', @@ -148,6 +301,28 @@ ], ], ], + 'GetAuthzPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authzPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackendAuthenticationConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetClientTlsPolicy' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', @@ -159,6 +334,28 @@ ], ], ], + 'GetGatewaySecurityPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGatewaySecurityPolicyRule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetServerTlsPolicy' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', @@ -170,6 +367,28 @@ ], ], ], + 'GetTlsInspectionPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUrlList' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/urlLists/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'ListAuthorizationPolicies' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', @@ -181,6 +400,28 @@ ], ], ], + 'ListAuthzPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authzPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackendAuthenticationConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'ListClientTlsPolicies' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', @@ -192,6 +433,28 @@ ], ], ], + 'ListGatewaySecurityPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGatewaySecurityPolicyRules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'ListServerTlsPolicies' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', @@ -203,6 +466,28 @@ ], ], ], + 'ListTlsInspectionPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUrlLists' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/urlLists', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'UpdateAuthorizationPolicy' => [ 'method' => 'patch', 'uriTemplate' => '/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}', @@ -216,6 +501,35 @@ ], ], ], + 'UpdateAuthzPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{authz_policy.name=projects/*/locations/*/authzPolicies/*}', + 'body' => 'authz_policy', + 'placeholders' => [ + 'authz_policy.name' => [ + 'getters' => [ + 'getAuthzPolicy', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackendAuthenticationConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backend_authentication_config.name=projects/*/locations/*/backendAuthenticationConfigs/*}', + 'body' => 'backend_authentication_config', + 'placeholders' => [ + 'backend_authentication_config.name' => [ + 'getters' => [ + 'getBackendAuthenticationConfig', + 'getName', + ], + ], + ], + ], 'UpdateClientTlsPolicy' => [ 'method' => 'patch', 'uriTemplate' => '/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}', @@ -229,6 +543,32 @@ ], ], ], + 'UpdateGatewaySecurityPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{gateway_security_policy.name=projects/*/locations/*/gatewaySecurityPolicies/*}', + 'body' => 'gateway_security_policy', + 'placeholders' => [ + 'gateway_security_policy.name' => [ + 'getters' => [ + 'getGatewaySecurityPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGatewaySecurityPolicyRule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{gateway_security_policy_rule.name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', + 'body' => 'gateway_security_policy_rule', + 'placeholders' => [ + 'gateway_security_policy_rule.name' => [ + 'getters' => [ + 'getGatewaySecurityPolicyRule', + 'getName', + ], + ], + ], + ], 'UpdateServerTlsPolicy' => [ 'method' => 'patch', 'uriTemplate' => '/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}', @@ -242,15 +582,41 @@ ], ], ], + 'UpdateTlsInspectionPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tls_inspection_policy.name=projects/*/locations/*/tlsInspectionPolicies/*}', + 'body' => 'tls_inspection_policy', + 'placeholders' => [ + 'tls_inspection_policy.name' => [ + 'getters' => [ + 'getTlsInspectionPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateUrlList' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{url_list.name=projects/*/locations/*/urlLists/*}', + 'body' => 'url_list', + 'placeholders' => [ + 'url_list.name' => [ + 'getters' => [ + 'getUrlList', + 'getName', + ], + ], + ], + ], ], 'google.iam.v1.IAMPolicy' => [ 'GetIamPolicy' => [ 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', 'additionalBindings' => [ [ 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', ], [ 'method' => 'get', @@ -264,6 +630,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], ], 'placeholders' => [ 'resource' => [ @@ -275,12 +645,12 @@ ], 'SetIamPolicy' => [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', 'body' => '*', 'additionalBindings' => [ [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', 'body' => '*', ], [ @@ -298,6 +668,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ @@ -309,12 +684,12 @@ ], 'TestIamPermissions' => [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', 'body' => '*', 'additionalBindings' => [ [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', 'body' => '*', ], [ @@ -332,6 +707,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ diff --git a/NetworkSecurity/src/V1/resources/organization_address_group_service_rest_client_config.php b/NetworkSecurity/src/V1/resources/organization_address_group_service_rest_client_config.php index 139498a8cd84..9fe71d6617dd 100644 --- a/NetworkSecurity/src/V1/resources/organization_address_group_service_rest_client_config.php +++ b/NetworkSecurity/src/V1/resources/organization_address_group_service_rest_client_config.php @@ -171,11 +171,11 @@ 'google.iam.v1.IAMPolicy' => [ 'GetIamPolicy' => [ 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', 'additionalBindings' => [ [ 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', ], [ 'method' => 'get', @@ -189,6 +189,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', + ], ], 'placeholders' => [ 'resource' => [ @@ -200,12 +204,12 @@ ], 'SetIamPolicy' => [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', 'body' => '*', 'additionalBindings' => [ [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', 'body' => '*', ], [ @@ -223,6 +227,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ @@ -234,12 +243,12 @@ ], 'TestIamPermissions' => [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', 'body' => '*', 'additionalBindings' => [ [ 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', 'body' => '*', ], [ @@ -257,6 +266,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_client_config.json b/NetworkSecurity/src/V1/resources/organization_security_profile_group_service_client_config.json similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_client_config.json rename to NetworkSecurity/src/V1/resources/organization_security_profile_group_service_client_config.json diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_descriptor_config.php b/NetworkSecurity/src/V1/resources/organization_security_profile_group_service_descriptor_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_descriptor_config.php rename to NetworkSecurity/src/V1/resources/organization_security_profile_group_service_descriptor_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_rest_client_config.php b/NetworkSecurity/src/V1/resources/organization_security_profile_group_service_rest_client_config.php similarity index 100% rename from owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_security_profile_group_service_rest_client_config.php rename to NetworkSecurity/src/V1/resources/organization_security_profile_group_service_rest_client_config.php diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php b/NetworkSecurity/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php similarity index 84% rename from owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php rename to NetworkSecurity/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php index 437684efab1a..6b4f98675233 100644 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php +++ b/NetworkSecurity/tests/Unit/V1/Client/DnsThreatDetectorServiceClientTest.php @@ -64,7 +64,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return DnsThreatDetectorServiceClient */ @@ -103,7 +105,10 @@ public function createDnsThreatDetectorTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.DnsThreatDetectorService/CreateDnsThreatDetector', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.DnsThreatDetectorService/CreateDnsThreatDetector', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getDnsThreatDetector(); @@ -122,12 +127,15 @@ public function createDnsThreatDetectorExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); @@ -163,14 +171,16 @@ public function deleteDnsThreatDetectorTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); - $request = (new DeleteDnsThreatDetectorRequest()) - ->setName($formattedName); + $request = (new DeleteDnsThreatDetectorRequest())->setName($formattedName); $gapicClient->deleteDnsThreatDetector($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.DnsThreatDetectorService/DeleteDnsThreatDetector', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.DnsThreatDetectorService/DeleteDnsThreatDetector', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -187,17 +197,19 @@ public function deleteDnsThreatDetectorExceptionTest() $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); + $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->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); - $request = (new DeleteDnsThreatDetectorRequest()) - ->setName($formattedName); + $request = (new DeleteDnsThreatDetectorRequest())->setName($formattedName); try { $gapicClient->deleteDnsThreatDetector($request); // If the $gapicClient method call did not throw, fail the test @@ -226,15 +238,17 @@ public function getDnsThreatDetectorTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); - $request = (new GetDnsThreatDetectorRequest()) - ->setName($formattedName); + $request = (new GetDnsThreatDetectorRequest())->setName($formattedName); $response = $gapicClient->getDnsThreatDetector($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.networksecurity.v1.DnsThreatDetectorService/GetDnsThreatDetector', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.DnsThreatDetectorService/GetDnsThreatDetector', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -251,17 +265,19 @@ public function getDnsThreatDetectorExceptionTest() $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); + $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->dnsThreatDetectorName('[PROJECT]', '[LOCATION]', '[DNS_THREAT_DETECTOR]'); - $request = (new GetDnsThreatDetectorRequest()) - ->setName($formattedName); + $request = (new GetDnsThreatDetectorRequest())->setName($formattedName); try { $gapicClient->getDnsThreatDetector($request); // If the $gapicClient method call did not throw, fail the test @@ -286,17 +302,14 @@ public function listDnsThreatDetectorsTest() // Mock response $nextPageToken = ''; $dnsThreatDetectorsElement = new DnsThreatDetector(); - $dnsThreatDetectors = [ - $dnsThreatDetectorsElement, - ]; + $dnsThreatDetectors = [$dnsThreatDetectorsElement]; $expectedResponse = new ListDnsThreatDetectorsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setDnsThreatDetectors($dnsThreatDetectors); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDnsThreatDetectorsRequest()) - ->setParent($formattedParent); + $request = (new ListDnsThreatDetectorsRequest())->setParent($formattedParent); $response = $gapicClient->listDnsThreatDetectors($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -306,7 +319,10 @@ public function listDnsThreatDetectorsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.DnsThreatDetectorService/ListDnsThreatDetectors', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.DnsThreatDetectorService/ListDnsThreatDetectors', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -323,17 +339,19 @@ public function listDnsThreatDetectorsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDnsThreatDetectorsRequest()) - ->setParent($formattedParent); + $request = (new ListDnsThreatDetectorsRequest())->setParent($formattedParent); try { $gapicClient->listDnsThreatDetectors($request); // If the $gapicClient method call did not throw, fail the test @@ -364,15 +382,17 @@ public function updateDnsThreatDetectorTest() $dnsThreatDetector = new DnsThreatDetector(); $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; $dnsThreatDetector->setProvider($dnsThreatDetectorProvider); - $request = (new UpdateDnsThreatDetectorRequest()) - ->setDnsThreatDetector($dnsThreatDetector); + $request = (new UpdateDnsThreatDetectorRequest())->setDnsThreatDetector($dnsThreatDetector); $response = $gapicClient->updateDnsThreatDetector($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.networksecurity.v1.DnsThreatDetectorService/UpdateDnsThreatDetector', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.DnsThreatDetectorService/UpdateDnsThreatDetector', + $actualFuncCall + ); $actualValue = $actualRequestObject->getDnsThreatDetector(); $this->assertProtobufEquals($dnsThreatDetector, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -389,19 +409,21 @@ public function updateDnsThreatDetectorExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $dnsThreatDetector = new DnsThreatDetector(); $dnsThreatDetectorProvider = Provider::PROVIDER_UNSPECIFIED; $dnsThreatDetector->setProvider($dnsThreatDetectorProvider); - $request = (new UpdateDnsThreatDetectorRequest()) - ->setDnsThreatDetector($dnsThreatDetector); + $request = (new UpdateDnsThreatDetectorRequest())->setDnsThreatDetector($dnsThreatDetector); try { $gapicClient->updateDnsThreatDetector($request); // If the $gapicClient method call did not throw, fail the test @@ -454,12 +476,15 @@ public function getLocationExceptionTest() $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); + $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 { @@ -486,9 +511,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -518,12 +541,15 @@ public function listLocationsExceptionTest() $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); + $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 { @@ -556,8 +582,7 @@ public function getIamPolicyTest() $transport->addResponse($expectedResponse); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); $response = $gapicClient->getIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -581,17 +606,19 @@ public function getIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); try { $gapicClient->getIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -623,9 +650,7 @@ public function setIamPolicyTest() // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); $response = $gapicClient->setIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -651,19 +676,20 @@ public function setIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); try { $gapicClient->setIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -691,9 +717,7 @@ public function testIamPermissionsTest() // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); $response = $gapicClient->testIamPermissions($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -719,19 +743,20 @@ public function testIamPermissionsExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); try { $gapicClient->testIamPermissions($request); // If the $gapicClient method call did not throw, fail the test @@ -772,7 +797,10 @@ public function createDnsThreatDetectorAsyncTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.DnsThreatDetectorService/CreateDnsThreatDetector', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.DnsThreatDetectorService/CreateDnsThreatDetector', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getDnsThreatDetector(); diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/FirewallActivationClientTest.php b/NetworkSecurity/tests/Unit/V1/Client/FirewallActivationClientTest.php similarity index 90% rename from owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/FirewallActivationClientTest.php rename to NetworkSecurity/tests/Unit/V1/Client/FirewallActivationClientTest.php index da05962e45c9..40f6a63aeb1f 100644 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/FirewallActivationClientTest.php +++ b/NetworkSecurity/tests/Unit/V1/Client/FirewallActivationClientTest.php @@ -75,7 +75,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return FirewallActivationClient */ @@ -145,7 +147,10 @@ public function createFirewallEndpointTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpoint', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpoint', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getFirewallEndpointId(); @@ -195,12 +200,15 @@ public function createFirewallEndpointExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); @@ -292,7 +300,10 @@ public function createFirewallEndpointAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpointAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpointAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getFirewallEndpointAssociation(); @@ -340,12 +351,15 @@ public function createFirewallEndpointAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -410,8 +424,7 @@ public function deleteFirewallEndpointTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); - $request = (new DeleteFirewallEndpointRequest()) - ->setName($formattedName); + $request = (new DeleteFirewallEndpointRequest())->setName($formattedName); $response = $gapicClient->deleteFirewallEndpoint($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -421,7 +434,10 @@ public function deleteFirewallEndpointTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/DeleteFirewallEndpoint', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/DeleteFirewallEndpoint', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -467,17 +483,19 @@ public function deleteFirewallEndpointExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); - $request = (new DeleteFirewallEndpointRequest()) - ->setName($formattedName); + $request = (new DeleteFirewallEndpointRequest())->setName($formattedName); $response = $gapicClient->deleteFirewallEndpoint($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -530,9 +548,12 @@ public function deleteFirewallEndpointAssociationTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); - $request = (new DeleteFirewallEndpointAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->firewallEndpointAssociationName( + '[PROJECT]', + '[LOCATION]', + '[FIREWALL_ENDPOINT_ASSOCIATION]' + ); + $request = (new DeleteFirewallEndpointAssociationRequest())->setName($formattedName); $response = $gapicClient->deleteFirewallEndpointAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -542,7 +563,10 @@ public function deleteFirewallEndpointAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/DeleteFirewallEndpointAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/DeleteFirewallEndpointAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -588,17 +612,23 @@ public function deleteFirewallEndpointAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); - $request = (new DeleteFirewallEndpointAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->firewallEndpointAssociationName( + '[PROJECT]', + '[LOCATION]', + '[FIREWALL_ENDPOINT_ASSOCIATION]' + ); + $request = (new DeleteFirewallEndpointAssociationRequest())->setName($formattedName); $response = $gapicClient->deleteFirewallEndpointAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -646,8 +676,7 @@ public function getFirewallEndpointTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); - $request = (new GetFirewallEndpointRequest()) - ->setName($formattedName); + $request = (new GetFirewallEndpointRequest())->setName($formattedName); $response = $gapicClient->getFirewallEndpoint($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -671,17 +700,19 @@ public function getFirewallEndpointExceptionTest() $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); + $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->firewallEndpointName('[ORGANIZATION]', '[LOCATION]', '[FIREWALL_ENDPOINT]'); - $request = (new GetFirewallEndpointRequest()) - ->setName($formattedName); + $request = (new GetFirewallEndpointRequest())->setName($formattedName); try { $gapicClient->getFirewallEndpoint($request); // If the $gapicClient method call did not throw, fail the test @@ -719,16 +750,22 @@ public function getFirewallEndpointAssociationTest() $expectedResponse->setDisabled($disabled); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); - $request = (new GetFirewallEndpointAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->firewallEndpointAssociationName( + '[PROJECT]', + '[LOCATION]', + '[FIREWALL_ENDPOINT_ASSOCIATION]' + ); + $request = (new GetFirewallEndpointAssociationRequest())->setName($formattedName); $response = $gapicClient->getFirewallEndpointAssociation($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.networksecurity.v1.FirewallActivation/GetFirewallEndpointAssociation', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/GetFirewallEndpointAssociation', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -745,17 +782,23 @@ public function getFirewallEndpointAssociationExceptionTest() $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); + $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->firewallEndpointAssociationName('[PROJECT]', '[LOCATION]', '[FIREWALL_ENDPOINT_ASSOCIATION]'); - $request = (new GetFirewallEndpointAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->firewallEndpointAssociationName( + '[PROJECT]', + '[LOCATION]', + '[FIREWALL_ENDPOINT_ASSOCIATION]' + ); + $request = (new GetFirewallEndpointAssociationRequest())->setName($formattedName); try { $gapicClient->getFirewallEndpointAssociation($request); // If the $gapicClient method call did not throw, fail the test @@ -780,17 +823,14 @@ public function listFirewallEndpointAssociationsTest() // Mock response $nextPageToken = ''; $firewallEndpointAssociationsElement = new FirewallEndpointAssociation(); - $firewallEndpointAssociations = [ - $firewallEndpointAssociationsElement, - ]; + $firewallEndpointAssociations = [$firewallEndpointAssociationsElement]; $expectedResponse = new ListFirewallEndpointAssociationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setFirewallEndpointAssociations($firewallEndpointAssociations); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListFirewallEndpointAssociationsRequest()) - ->setParent($formattedParent); + $request = (new ListFirewallEndpointAssociationsRequest())->setParent($formattedParent); $response = $gapicClient->listFirewallEndpointAssociations($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -800,7 +840,10 @@ public function listFirewallEndpointAssociationsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/ListFirewallEndpointAssociations', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/ListFirewallEndpointAssociations', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -817,17 +860,19 @@ public function listFirewallEndpointAssociationsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListFirewallEndpointAssociationsRequest()) - ->setParent($formattedParent); + $request = (new ListFirewallEndpointAssociationsRequest())->setParent($formattedParent); try { $gapicClient->listFirewallEndpointAssociations($request); // If the $gapicClient method call did not throw, fail the test @@ -852,17 +897,14 @@ public function listFirewallEndpointsTest() // Mock response $nextPageToken = ''; $firewallEndpointsElement = new FirewallEndpoint(); - $firewallEndpoints = [ - $firewallEndpointsElement, - ]; + $firewallEndpoints = [$firewallEndpointsElement]; $expectedResponse = new ListFirewallEndpointsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setFirewallEndpoints($firewallEndpoints); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListFirewallEndpointsRequest()) - ->setParent($formattedParent); + $request = (new ListFirewallEndpointsRequest())->setParent($formattedParent); $response = $gapicClient->listFirewallEndpoints($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -889,17 +931,19 @@ public function listFirewallEndpointsExceptionTest() $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); + $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 ListFirewallEndpointsRequest()) - ->setParent($formattedParent); + $request = (new ListFirewallEndpointsRequest())->setParent($formattedParent); try { $gapicClient->listFirewallEndpoints($request); // If the $gapicClient method call did not throw, fail the test @@ -969,7 +1013,10 @@ public function updateFirewallEndpointTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/UpdateFirewallEndpoint', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/UpdateFirewallEndpoint', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $actualValue = $actualApiRequestObject->getFirewallEndpoint(); @@ -1017,12 +1064,15 @@ public function updateFirewallEndpointExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); @@ -1112,7 +1162,10 @@ public function updateFirewallEndpointAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/UpdateFirewallEndpointAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/UpdateFirewallEndpointAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $actualValue = $actualApiRequestObject->getFirewallEndpointAssociation(); @@ -1160,12 +1213,15 @@ public function updateFirewallEndpointAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); @@ -1238,12 +1294,15 @@ public function getLocationExceptionTest() $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); + $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 { @@ -1270,9 +1329,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -1302,12 +1359,15 @@ public function listLocationsExceptionTest() $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); + $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 { @@ -1340,8 +1400,7 @@ public function getIamPolicyTest() $transport->addResponse($expectedResponse); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); $response = $gapicClient->getIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1365,17 +1424,19 @@ public function getIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); try { $gapicClient->getIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -1407,9 +1468,7 @@ public function setIamPolicyTest() // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); $response = $gapicClient->setIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1435,19 +1494,20 @@ public function setIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); try { $gapicClient->setIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -1475,9 +1535,7 @@ public function testIamPermissionsTest() // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); $response = $gapicClient->testIamPermissions($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1503,19 +1561,20 @@ public function testIamPermissionsExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); try { $gapicClient->testIamPermissions($request); // If the $gapicClient method call did not throw, fail the test @@ -1587,7 +1646,10 @@ public function createFirewallEndpointAsyncTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpoint', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.FirewallActivation/CreateFirewallEndpoint', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getFirewallEndpointId(); diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/InterceptClientTest.php b/NetworkSecurity/tests/Unit/V1/Client/InterceptClientTest.php similarity index 88% rename from owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/InterceptClientTest.php rename to NetworkSecurity/tests/Unit/V1/Client/InterceptClientTest.php index 4dff956effe0..9058c7376380 100644 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/InterceptClientTest.php +++ b/NetworkSecurity/tests/Unit/V1/Client/InterceptClientTest.php @@ -88,7 +88,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return InterceptClient */ @@ -145,7 +147,11 @@ public function createInterceptDeploymentTest() $interceptDeployment = new InterceptDeployment(); $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); - $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); $request = (new CreateInterceptDeploymentRequest()) ->setParent($formattedParent) @@ -210,12 +216,15 @@ public function createInterceptDeploymentExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -223,7 +232,11 @@ public function createInterceptDeploymentExceptionTest() $interceptDeployment = new InterceptDeployment(); $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); - $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); $request = (new CreateInterceptDeploymentRequest()) ->setParent($formattedParent) @@ -307,7 +320,10 @@ public function createInterceptDeploymentGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptDeploymentGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/CreateInterceptDeploymentGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getInterceptDeploymentGroupId(); @@ -357,12 +373,15 @@ public function createInterceptDeploymentGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -437,7 +456,11 @@ public function createInterceptEndpointGroupTest() $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $interceptEndpointGroupId = 'interceptEndpointGroupId782835720'; $interceptEndpointGroup = new InterceptEndpointGroup(); - $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); $request = (new CreateInterceptEndpointGroupRequest()) ->setParent($formattedParent) @@ -452,7 +475,10 @@ public function createInterceptEndpointGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptEndpointGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/CreateInterceptEndpointGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getInterceptEndpointGroupId(); @@ -502,18 +528,25 @@ public function createInterceptEndpointGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $interceptEndpointGroupId = 'interceptEndpointGroupId782835720'; $interceptEndpointGroup = new InterceptEndpointGroup(); - $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); $request = (new CreateInterceptEndpointGroupRequest()) ->setParent($formattedParent) @@ -583,8 +616,14 @@ public function createInterceptEndpointGroupAssociationTest() // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); - $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup( + $interceptEndpointGroupAssociationInterceptEndpointGroup + ); $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); $request = (new CreateInterceptEndpointGroupAssociationRequest()) @@ -599,7 +638,10 @@ public function createInterceptEndpointGroupAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/CreateInterceptEndpointGroupAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/CreateInterceptEndpointGroupAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getInterceptEndpointGroupAssociation(); @@ -647,18 +689,27 @@ public function createInterceptEndpointGroupAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); - $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup( + $interceptEndpointGroupAssociationInterceptEndpointGroup + ); $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); $request = (new CreateInterceptEndpointGroupAssociationRequest()) @@ -717,8 +768,7 @@ public function deleteInterceptDeploymentTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); - $request = (new DeleteInterceptDeploymentRequest()) - ->setName($formattedName); + $request = (new DeleteInterceptDeploymentRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -774,17 +824,19 @@ public function deleteInterceptDeploymentExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); - $request = (new DeleteInterceptDeploymentRequest()) - ->setName($formattedName); + $request = (new DeleteInterceptDeploymentRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -837,9 +889,12 @@ public function deleteInterceptDeploymentGroupTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); - $request = (new DeleteInterceptDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + $request = (new DeleteInterceptDeploymentGroupRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -849,7 +904,10 @@ public function deleteInterceptDeploymentGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/DeleteInterceptDeploymentGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/DeleteInterceptDeploymentGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -895,17 +953,23 @@ public function deleteInterceptDeploymentGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); - $request = (new DeleteInterceptDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + $request = (new DeleteInterceptDeploymentGroupRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -958,9 +1022,12 @@ public function deleteInterceptEndpointGroupTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $request = (new DeleteInterceptEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $request = (new DeleteInterceptEndpointGroupRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -970,7 +1037,10 @@ public function deleteInterceptEndpointGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/DeleteInterceptEndpointGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/DeleteInterceptEndpointGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -1016,17 +1086,23 @@ public function deleteInterceptEndpointGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $request = (new DeleteInterceptEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $request = (new DeleteInterceptEndpointGroupRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1079,9 +1155,12 @@ public function deleteInterceptEndpointGroupAssociationTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new DeleteInterceptEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new DeleteInterceptEndpointGroupAssociationRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1091,7 +1170,10 @@ public function deleteInterceptEndpointGroupAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/DeleteInterceptEndpointGroupAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/DeleteInterceptEndpointGroupAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -1137,17 +1219,23 @@ public function deleteInterceptEndpointGroupAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new DeleteInterceptEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new DeleteInterceptEndpointGroupAssociationRequest())->setName($formattedName); $response = $gapicClient->deleteInterceptEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1193,8 +1281,7 @@ public function getInterceptDeploymentTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); - $request = (new GetInterceptDeploymentRequest()) - ->setName($formattedName); + $request = (new GetInterceptDeploymentRequest())->setName($formattedName); $response = $gapicClient->getInterceptDeployment($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1218,17 +1305,19 @@ public function getInterceptDeploymentExceptionTest() $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); + $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->interceptDeploymentName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT]'); - $request = (new GetInterceptDeploymentRequest()) - ->setName($formattedName); + $request = (new GetInterceptDeploymentRequest())->setName($formattedName); try { $gapicClient->getInterceptDeployment($request); // If the $gapicClient method call did not throw, fail the test @@ -1262,9 +1351,12 @@ public function getInterceptDeploymentGroupTest() $expectedResponse->setDescription($description); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); - $request = (new GetInterceptDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + $request = (new GetInterceptDeploymentGroupRequest())->setName($formattedName); $response = $gapicClient->getInterceptDeploymentGroup($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1288,17 +1380,23 @@ public function getInterceptDeploymentGroupExceptionTest() $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); + $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->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); - $request = (new GetInterceptDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); + $request = (new GetInterceptDeploymentGroupRequest())->setName($formattedName); try { $gapicClient->getInterceptDeploymentGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -1332,9 +1430,12 @@ public function getInterceptEndpointGroupTest() $expectedResponse->setDescription($description); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $request = (new GetInterceptEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $request = (new GetInterceptEndpointGroupRequest())->setName($formattedName); $response = $gapicClient->getInterceptEndpointGroup($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1358,17 +1459,23 @@ public function getInterceptEndpointGroupExceptionTest() $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); + $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->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $request = (new GetInterceptEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $request = (new GetInterceptEndpointGroupRequest())->setName($formattedName); try { $gapicClient->getInterceptEndpointGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -1404,16 +1511,22 @@ public function getInterceptEndpointGroupAssociationTest() $expectedResponse->setNetworkCookie($networkCookie); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new GetInterceptEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new GetInterceptEndpointGroupAssociationRequest())->setName($formattedName); $response = $gapicClient->getInterceptEndpointGroupAssociation($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.networksecurity.v1.Intercept/GetInterceptEndpointGroupAssociation', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/GetInterceptEndpointGroupAssociation', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1430,17 +1543,23 @@ public function getInterceptEndpointGroupAssociationExceptionTest() $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); + $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->interceptEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new GetInterceptEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->interceptEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new GetInterceptEndpointGroupAssociationRequest())->setName($formattedName); try { $gapicClient->getInterceptEndpointGroupAssociation($request); // If the $gapicClient method call did not throw, fail the test @@ -1465,17 +1584,14 @@ public function listInterceptDeploymentGroupsTest() // Mock response $nextPageToken = ''; $interceptDeploymentGroupsElement = new InterceptDeploymentGroup(); - $interceptDeploymentGroups = [ - $interceptDeploymentGroupsElement, - ]; + $interceptDeploymentGroups = [$interceptDeploymentGroupsElement]; $expectedResponse = new ListInterceptDeploymentGroupsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setInterceptDeploymentGroups($interceptDeploymentGroups); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptDeploymentGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptDeploymentGroupsRequest())->setParent($formattedParent); $response = $gapicClient->listInterceptDeploymentGroups($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1502,17 +1618,19 @@ public function listInterceptDeploymentGroupsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptDeploymentGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptDeploymentGroupsRequest())->setParent($formattedParent); try { $gapicClient->listInterceptDeploymentGroups($request); // If the $gapicClient method call did not throw, fail the test @@ -1537,17 +1655,14 @@ public function listInterceptDeploymentsTest() // Mock response $nextPageToken = ''; $interceptDeploymentsElement = new InterceptDeployment(); - $interceptDeployments = [ - $interceptDeploymentsElement, - ]; + $interceptDeployments = [$interceptDeploymentsElement]; $expectedResponse = new ListInterceptDeploymentsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setInterceptDeployments($interceptDeployments); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptDeploymentsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptDeploymentsRequest())->setParent($formattedParent); $response = $gapicClient->listInterceptDeployments($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1574,17 +1689,19 @@ public function listInterceptDeploymentsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptDeploymentsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptDeploymentsRequest())->setParent($formattedParent); try { $gapicClient->listInterceptDeployments($request); // If the $gapicClient method call did not throw, fail the test @@ -1609,17 +1726,14 @@ public function listInterceptEndpointGroupAssociationsTest() // Mock response $nextPageToken = ''; $interceptEndpointGroupAssociationsElement = new InterceptEndpointGroupAssociation(); - $interceptEndpointGroupAssociations = [ - $interceptEndpointGroupAssociationsElement, - ]; + $interceptEndpointGroupAssociations = [$interceptEndpointGroupAssociationsElement]; $expectedResponse = new ListInterceptEndpointGroupAssociationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setInterceptEndpointGroupAssociations($interceptEndpointGroupAssociations); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptEndpointGroupAssociationsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptEndpointGroupAssociationsRequest())->setParent($formattedParent); $response = $gapicClient->listInterceptEndpointGroupAssociations($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1629,7 +1743,10 @@ public function listInterceptEndpointGroupAssociationsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/ListInterceptEndpointGroupAssociations', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/ListInterceptEndpointGroupAssociations', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1646,17 +1763,19 @@ public function listInterceptEndpointGroupAssociationsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptEndpointGroupAssociationsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptEndpointGroupAssociationsRequest())->setParent($formattedParent); try { $gapicClient->listInterceptEndpointGroupAssociations($request); // If the $gapicClient method call did not throw, fail the test @@ -1681,17 +1800,14 @@ public function listInterceptEndpointGroupsTest() // Mock response $nextPageToken = ''; $interceptEndpointGroupsElement = new InterceptEndpointGroup(); - $interceptEndpointGroups = [ - $interceptEndpointGroupsElement, - ]; + $interceptEndpointGroups = [$interceptEndpointGroupsElement]; $expectedResponse = new ListInterceptEndpointGroupsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setInterceptEndpointGroups($interceptEndpointGroups); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptEndpointGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptEndpointGroupsRequest())->setParent($formattedParent); $response = $gapicClient->listInterceptEndpointGroups($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1718,17 +1834,19 @@ public function listInterceptEndpointGroupsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInterceptEndpointGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListInterceptEndpointGroupsRequest())->setParent($formattedParent); try { $gapicClient->listInterceptEndpointGroups($request); // If the $gapicClient method call did not throw, fail the test @@ -1785,10 +1903,13 @@ public function updateInterceptDeploymentTest() $interceptDeployment = new InterceptDeployment(); $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); - $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); - $request = (new UpdateInterceptDeploymentRequest()) - ->setInterceptDeployment($interceptDeployment); + $request = (new UpdateInterceptDeploymentRequest())->setInterceptDeployment($interceptDeployment); $response = $gapicClient->updateInterceptDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1844,21 +1965,27 @@ public function updateInterceptDeploymentExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $interceptDeployment = new InterceptDeployment(); $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); - $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); - $request = (new UpdateInterceptDeploymentRequest()) - ->setInterceptDeployment($interceptDeployment); + $request = (new UpdateInterceptDeploymentRequest())->setInterceptDeployment($interceptDeployment); $response = $gapicClient->updateInterceptDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1922,8 +2049,9 @@ public function updateInterceptDeploymentGroupTest() $interceptDeploymentGroup = new InterceptDeploymentGroup(); $interceptDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $interceptDeploymentGroup->setNetwork($interceptDeploymentGroupNetwork); - $request = (new UpdateInterceptDeploymentGroupRequest()) - ->setInterceptDeploymentGroup($interceptDeploymentGroup); + $request = (new UpdateInterceptDeploymentGroupRequest())->setInterceptDeploymentGroup( + $interceptDeploymentGroup + ); $response = $gapicClient->updateInterceptDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1933,7 +2061,10 @@ public function updateInterceptDeploymentGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/UpdateInterceptDeploymentGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/UpdateInterceptDeploymentGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getInterceptDeploymentGroup(); $this->assertProtobufEquals($interceptDeploymentGroup, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -1979,19 +2110,23 @@ public function updateInterceptDeploymentGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $interceptDeploymentGroup = new InterceptDeploymentGroup(); $interceptDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $interceptDeploymentGroup->setNetwork($interceptDeploymentGroupNetwork); - $request = (new UpdateInterceptDeploymentGroupRequest()) - ->setInterceptDeploymentGroup($interceptDeploymentGroup); + $request = (new UpdateInterceptDeploymentGroupRequest())->setInterceptDeploymentGroup( + $interceptDeploymentGroup + ); $response = $gapicClient->updateInterceptDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2053,10 +2188,13 @@ public function updateInterceptEndpointGroupTest() $operationsTransport->addResponse($completeOperation); // Mock request $interceptEndpointGroup = new InterceptEndpointGroup(); - $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); - $request = (new UpdateInterceptEndpointGroupRequest()) - ->setInterceptEndpointGroup($interceptEndpointGroup); + $request = (new UpdateInterceptEndpointGroupRequest())->setInterceptEndpointGroup($interceptEndpointGroup); $response = $gapicClient->updateInterceptEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2066,7 +2204,10 @@ public function updateInterceptEndpointGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/UpdateInterceptEndpointGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/UpdateInterceptEndpointGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getInterceptEndpointGroup(); $this->assertProtobufEquals($interceptEndpointGroup, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -2112,19 +2253,25 @@ public function updateInterceptEndpointGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $interceptEndpointGroup = new InterceptEndpointGroup(); - $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptEndpointGroupInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptEndpointGroup->setInterceptDeploymentGroup($interceptEndpointGroupInterceptDeploymentGroup); - $request = (new UpdateInterceptEndpointGroupRequest()) - ->setInterceptEndpointGroup($interceptEndpointGroup); + $request = (new UpdateInterceptEndpointGroupRequest())->setInterceptEndpointGroup($interceptEndpointGroup); $response = $gapicClient->updateInterceptEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2188,12 +2335,19 @@ public function updateInterceptEndpointGroupAssociationTest() $operationsTransport->addResponse($completeOperation); // Mock request $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); - $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup( + $interceptEndpointGroupAssociationInterceptEndpointGroup + ); $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); - $request = (new UpdateInterceptEndpointGroupAssociationRequest()) - ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + $request = (new UpdateInterceptEndpointGroupAssociationRequest())->setInterceptEndpointGroupAssociation( + $interceptEndpointGroupAssociation + ); $response = $gapicClient->updateInterceptEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2203,7 +2357,10 @@ public function updateInterceptEndpointGroupAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Intercept/UpdateInterceptEndpointGroupAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Intercept/UpdateInterceptEndpointGroupAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getInterceptEndpointGroupAssociation(); $this->assertProtobufEquals($interceptEndpointGroupAssociation, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -2249,21 +2406,31 @@ public function updateInterceptEndpointGroupAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $interceptEndpointGroupAssociation = new InterceptEndpointGroupAssociation(); - $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_ENDPOINT_GROUP]'); - $interceptEndpointGroupAssociation->setInterceptEndpointGroup($interceptEndpointGroupAssociationInterceptEndpointGroup); + $interceptEndpointGroupAssociationInterceptEndpointGroup = $gapicClient->interceptEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_ENDPOINT_GROUP]' + ); + $interceptEndpointGroupAssociation->setInterceptEndpointGroup( + $interceptEndpointGroupAssociationInterceptEndpointGroup + ); $interceptEndpointGroupAssociationNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $interceptEndpointGroupAssociation->setNetwork($interceptEndpointGroupAssociationNetwork); - $request = (new UpdateInterceptEndpointGroupAssociationRequest()) - ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation); + $request = (new UpdateInterceptEndpointGroupAssociationRequest())->setInterceptEndpointGroupAssociation( + $interceptEndpointGroupAssociation + ); $response = $gapicClient->updateInterceptEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2325,12 +2492,15 @@ public function getLocationExceptionTest() $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); + $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 { @@ -2357,9 +2527,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -2389,12 +2557,15 @@ public function listLocationsExceptionTest() $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); + $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 { @@ -2427,8 +2598,7 @@ public function getIamPolicyTest() $transport->addResponse($expectedResponse); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); $response = $gapicClient->getIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2452,17 +2622,19 @@ public function getIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); try { $gapicClient->getIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -2494,9 +2666,7 @@ public function setIamPolicyTest() // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); $response = $gapicClient->setIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2522,19 +2692,20 @@ public function setIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); try { $gapicClient->setIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -2562,9 +2733,7 @@ public function testIamPermissionsTest() // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); $response = $gapicClient->testIamPermissions($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2590,19 +2759,20 @@ public function testIamPermissionsExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); try { $gapicClient->testIamPermissions($request); // If the $gapicClient method call did not throw, fail the test @@ -2661,7 +2831,11 @@ public function createInterceptDeploymentAsyncTest() $interceptDeployment = new InterceptDeployment(); $interceptDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $interceptDeployment->setForwardingRule($interceptDeploymentForwardingRule); - $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName('[PROJECT]', '[LOCATION]', '[INTERCEPT_DEPLOYMENT_GROUP]'); + $interceptDeploymentInterceptDeploymentGroup = $gapicClient->interceptDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[INTERCEPT_DEPLOYMENT_GROUP]' + ); $interceptDeployment->setInterceptDeploymentGroup($interceptDeploymentInterceptDeploymentGroup); $request = (new CreateInterceptDeploymentRequest()) ->setParent($formattedParent) diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/MirroringClientTest.php b/NetworkSecurity/tests/Unit/V1/Client/MirroringClientTest.php similarity index 89% rename from owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/MirroringClientTest.php rename to NetworkSecurity/tests/Unit/V1/Client/MirroringClientTest.php index 22558e6afa81..52505b82559f 100644 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/MirroringClientTest.php +++ b/NetworkSecurity/tests/Unit/V1/Client/MirroringClientTest.php @@ -88,7 +88,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return MirroringClient */ @@ -145,7 +147,11 @@ public function createMirroringDeploymentTest() $mirroringDeployment = new MirroringDeployment(); $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); - $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); $request = (new CreateMirroringDeploymentRequest()) ->setParent($formattedParent) @@ -210,12 +216,15 @@ public function createMirroringDeploymentExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -223,7 +232,11 @@ public function createMirroringDeploymentExceptionTest() $mirroringDeployment = new MirroringDeployment(); $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); - $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); $request = (new CreateMirroringDeploymentRequest()) ->setParent($formattedParent) @@ -307,7 +320,10 @@ public function createMirroringDeploymentGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringDeploymentGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/CreateMirroringDeploymentGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getMirroringDeploymentGroupId(); @@ -357,12 +373,15 @@ public function createMirroringDeploymentGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -450,7 +469,10 @@ public function createMirroringEndpointGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringEndpointGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/CreateMirroringEndpointGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getMirroringEndpointGroupId(); @@ -500,12 +522,15 @@ public function createMirroringEndpointGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -589,7 +614,10 @@ public function createMirroringEndpointGroupAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/CreateMirroringEndpointGroupAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/CreateMirroringEndpointGroupAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getMirroringEndpointGroupAssociation(); @@ -637,12 +665,15 @@ public function createMirroringEndpointGroupAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -703,8 +734,7 @@ public function deleteMirroringDeploymentTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); - $request = (new DeleteMirroringDeploymentRequest()) - ->setName($formattedName); + $request = (new DeleteMirroringDeploymentRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -760,17 +790,19 @@ public function deleteMirroringDeploymentExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); - $request = (new DeleteMirroringDeploymentRequest()) - ->setName($formattedName); + $request = (new DeleteMirroringDeploymentRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -823,9 +855,12 @@ public function deleteMirroringDeploymentGroupTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); - $request = (new DeleteMirroringDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + $request = (new DeleteMirroringDeploymentGroupRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -835,7 +870,10 @@ public function deleteMirroringDeploymentGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringDeploymentGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringDeploymentGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -881,17 +919,23 @@ public function deleteMirroringDeploymentGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); - $request = (new DeleteMirroringDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + $request = (new DeleteMirroringDeploymentGroupRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -944,9 +988,12 @@ public function deleteMirroringEndpointGroupTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); - $request = (new DeleteMirroringEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP]' + ); + $request = (new DeleteMirroringEndpointGroupRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -956,7 +1003,10 @@ public function deleteMirroringEndpointGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringEndpointGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringEndpointGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -1002,17 +1052,23 @@ public function deleteMirroringEndpointGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); - $request = (new DeleteMirroringEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP]' + ); + $request = (new DeleteMirroringEndpointGroupRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1065,9 +1121,12 @@ public function deleteMirroringEndpointGroupAssociationTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new DeleteMirroringEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new DeleteMirroringEndpointGroupAssociationRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1077,7 +1136,10 @@ public function deleteMirroringEndpointGroupAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringEndpointGroupAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/DeleteMirroringEndpointGroupAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -1123,17 +1185,23 @@ public function deleteMirroringEndpointGroupAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new DeleteMirroringEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new DeleteMirroringEndpointGroupAssociationRequest())->setName($formattedName); $response = $gapicClient->deleteMirroringEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1179,8 +1247,7 @@ public function getMirroringDeploymentTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); - $request = (new GetMirroringDeploymentRequest()) - ->setName($formattedName); + $request = (new GetMirroringDeploymentRequest())->setName($formattedName); $response = $gapicClient->getMirroringDeployment($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1204,17 +1271,19 @@ public function getMirroringDeploymentExceptionTest() $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); + $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->mirroringDeploymentName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT]'); - $request = (new GetMirroringDeploymentRequest()) - ->setName($formattedName); + $request = (new GetMirroringDeploymentRequest())->setName($formattedName); try { $gapicClient->getMirroringDeployment($request); // If the $gapicClient method call did not throw, fail the test @@ -1248,9 +1317,12 @@ public function getMirroringDeploymentGroupTest() $expectedResponse->setDescription($description); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); - $request = (new GetMirroringDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + $request = (new GetMirroringDeploymentGroupRequest())->setName($formattedName); $response = $gapicClient->getMirroringDeploymentGroup($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1274,17 +1346,23 @@ public function getMirroringDeploymentGroupExceptionTest() $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); + $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->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); - $request = (new GetMirroringDeploymentGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); + $request = (new GetMirroringDeploymentGroupRequest())->setName($formattedName); try { $gapicClient->getMirroringDeploymentGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -1318,9 +1396,12 @@ public function getMirroringEndpointGroupTest() $expectedResponse->setDescription($description); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); - $request = (new GetMirroringEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP]' + ); + $request = (new GetMirroringEndpointGroupRequest())->setName($formattedName); $response = $gapicClient->getMirroringEndpointGroup($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1344,17 +1425,23 @@ public function getMirroringEndpointGroupExceptionTest() $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); + $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->mirroringEndpointGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP]'); - $request = (new GetMirroringEndpointGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP]' + ); + $request = (new GetMirroringEndpointGroupRequest())->setName($formattedName); try { $gapicClient->getMirroringEndpointGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -1388,16 +1475,22 @@ public function getMirroringEndpointGroupAssociationTest() $expectedResponse->setReconciling($reconciling); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new GetMirroringEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new GetMirroringEndpointGroupAssociationRequest())->setName($formattedName); $response = $gapicClient->getMirroringEndpointGroupAssociation($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.networksecurity.v1.Mirroring/GetMirroringEndpointGroupAssociation', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/GetMirroringEndpointGroupAssociation', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1414,17 +1507,23 @@ public function getMirroringEndpointGroupAssociationExceptionTest() $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); + $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->mirroringEndpointGroupAssociationName('[PROJECT]', '[LOCATION]', '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'); - $request = (new GetMirroringEndpointGroupAssociationRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->mirroringEndpointGroupAssociationName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]' + ); + $request = (new GetMirroringEndpointGroupAssociationRequest())->setName($formattedName); try { $gapicClient->getMirroringEndpointGroupAssociation($request); // If the $gapicClient method call did not throw, fail the test @@ -1449,17 +1548,14 @@ public function listMirroringDeploymentGroupsTest() // Mock response $nextPageToken = ''; $mirroringDeploymentGroupsElement = new MirroringDeploymentGroup(); - $mirroringDeploymentGroups = [ - $mirroringDeploymentGroupsElement, - ]; + $mirroringDeploymentGroups = [$mirroringDeploymentGroupsElement]; $expectedResponse = new ListMirroringDeploymentGroupsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setMirroringDeploymentGroups($mirroringDeploymentGroups); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringDeploymentGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringDeploymentGroupsRequest())->setParent($formattedParent); $response = $gapicClient->listMirroringDeploymentGroups($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1486,17 +1582,19 @@ public function listMirroringDeploymentGroupsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringDeploymentGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringDeploymentGroupsRequest())->setParent($formattedParent); try { $gapicClient->listMirroringDeploymentGroups($request); // If the $gapicClient method call did not throw, fail the test @@ -1521,17 +1619,14 @@ public function listMirroringDeploymentsTest() // Mock response $nextPageToken = ''; $mirroringDeploymentsElement = new MirroringDeployment(); - $mirroringDeployments = [ - $mirroringDeploymentsElement, - ]; + $mirroringDeployments = [$mirroringDeploymentsElement]; $expectedResponse = new ListMirroringDeploymentsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setMirroringDeployments($mirroringDeployments); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringDeploymentsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringDeploymentsRequest())->setParent($formattedParent); $response = $gapicClient->listMirroringDeployments($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1558,17 +1653,19 @@ public function listMirroringDeploymentsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringDeploymentsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringDeploymentsRequest())->setParent($formattedParent); try { $gapicClient->listMirroringDeployments($request); // If the $gapicClient method call did not throw, fail the test @@ -1593,17 +1690,14 @@ public function listMirroringEndpointGroupAssociationsTest() // Mock response $nextPageToken = ''; $mirroringEndpointGroupAssociationsElement = new MirroringEndpointGroupAssociation(); - $mirroringEndpointGroupAssociations = [ - $mirroringEndpointGroupAssociationsElement, - ]; + $mirroringEndpointGroupAssociations = [$mirroringEndpointGroupAssociationsElement]; $expectedResponse = new ListMirroringEndpointGroupAssociationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setMirroringEndpointGroupAssociations($mirroringEndpointGroupAssociations); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringEndpointGroupAssociationsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringEndpointGroupAssociationsRequest())->setParent($formattedParent); $response = $gapicClient->listMirroringEndpointGroupAssociations($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1613,7 +1707,10 @@ public function listMirroringEndpointGroupAssociationsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/ListMirroringEndpointGroupAssociations', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/ListMirroringEndpointGroupAssociations', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1630,17 +1727,19 @@ public function listMirroringEndpointGroupAssociationsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringEndpointGroupAssociationsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringEndpointGroupAssociationsRequest())->setParent($formattedParent); try { $gapicClient->listMirroringEndpointGroupAssociations($request); // If the $gapicClient method call did not throw, fail the test @@ -1665,17 +1764,14 @@ public function listMirroringEndpointGroupsTest() // Mock response $nextPageToken = ''; $mirroringEndpointGroupsElement = new MirroringEndpointGroup(); - $mirroringEndpointGroups = [ - $mirroringEndpointGroupsElement, - ]; + $mirroringEndpointGroups = [$mirroringEndpointGroupsElement]; $expectedResponse = new ListMirroringEndpointGroupsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setMirroringEndpointGroups($mirroringEndpointGroups); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringEndpointGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringEndpointGroupsRequest())->setParent($formattedParent); $response = $gapicClient->listMirroringEndpointGroups($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1702,17 +1798,19 @@ public function listMirroringEndpointGroupsExceptionTest() $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); + $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMirroringEndpointGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListMirroringEndpointGroupsRequest())->setParent($formattedParent); try { $gapicClient->listMirroringEndpointGroups($request); // If the $gapicClient method call did not throw, fail the test @@ -1769,10 +1867,13 @@ public function updateMirroringDeploymentTest() $mirroringDeployment = new MirroringDeployment(); $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); - $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); - $request = (new UpdateMirroringDeploymentRequest()) - ->setMirroringDeployment($mirroringDeployment); + $request = (new UpdateMirroringDeploymentRequest())->setMirroringDeployment($mirroringDeployment); $response = $gapicClient->updateMirroringDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1828,21 +1929,27 @@ public function updateMirroringDeploymentExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $mirroringDeployment = new MirroringDeployment(); $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); - $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); - $request = (new UpdateMirroringDeploymentRequest()) - ->setMirroringDeployment($mirroringDeployment); + $request = (new UpdateMirroringDeploymentRequest())->setMirroringDeployment($mirroringDeployment); $response = $gapicClient->updateMirroringDeployment($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1906,8 +2013,9 @@ public function updateMirroringDeploymentGroupTest() $mirroringDeploymentGroup = new MirroringDeploymentGroup(); $mirroringDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $mirroringDeploymentGroup->setNetwork($mirroringDeploymentGroupNetwork); - $request = (new UpdateMirroringDeploymentGroupRequest()) - ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $request = (new UpdateMirroringDeploymentGroupRequest())->setMirroringDeploymentGroup( + $mirroringDeploymentGroup + ); $response = $gapicClient->updateMirroringDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -1917,7 +2025,10 @@ public function updateMirroringDeploymentGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringDeploymentGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringDeploymentGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getMirroringDeploymentGroup(); $this->assertProtobufEquals($mirroringDeploymentGroup, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -1963,19 +2074,23 @@ public function updateMirroringDeploymentGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $mirroringDeploymentGroup = new MirroringDeploymentGroup(); $mirroringDeploymentGroupNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); $mirroringDeploymentGroup->setNetwork($mirroringDeploymentGroupNetwork); - $request = (new UpdateMirroringDeploymentGroupRequest()) - ->setMirroringDeploymentGroup($mirroringDeploymentGroup); + $request = (new UpdateMirroringDeploymentGroupRequest())->setMirroringDeploymentGroup( + $mirroringDeploymentGroup + ); $response = $gapicClient->updateMirroringDeploymentGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2037,8 +2152,7 @@ public function updateMirroringEndpointGroupTest() $operationsTransport->addResponse($completeOperation); // Mock request $mirroringEndpointGroup = new MirroringEndpointGroup(); - $request = (new UpdateMirroringEndpointGroupRequest()) - ->setMirroringEndpointGroup($mirroringEndpointGroup); + $request = (new UpdateMirroringEndpointGroupRequest())->setMirroringEndpointGroup($mirroringEndpointGroup); $response = $gapicClient->updateMirroringEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2048,7 +2162,10 @@ public function updateMirroringEndpointGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringEndpointGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringEndpointGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getMirroringEndpointGroup(); $this->assertProtobufEquals($mirroringEndpointGroup, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -2094,17 +2211,19 @@ public function updateMirroringEndpointGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $mirroringEndpointGroup = new MirroringEndpointGroup(); - $request = (new UpdateMirroringEndpointGroupRequest()) - ->setMirroringEndpointGroup($mirroringEndpointGroup); + $request = (new UpdateMirroringEndpointGroupRequest())->setMirroringEndpointGroup($mirroringEndpointGroup); $response = $gapicClient->updateMirroringEndpointGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2166,8 +2285,9 @@ public function updateMirroringEndpointGroupAssociationTest() $operationsTransport->addResponse($completeOperation); // Mock request $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation(); - $request = (new UpdateMirroringEndpointGroupAssociationRequest()) - ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + $request = (new UpdateMirroringEndpointGroupAssociationRequest())->setMirroringEndpointGroupAssociation( + $mirroringEndpointGroupAssociation + ); $response = $gapicClient->updateMirroringEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2177,7 +2297,10 @@ public function updateMirroringEndpointGroupAssociationTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringEndpointGroupAssociation', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.Mirroring/UpdateMirroringEndpointGroupAssociation', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getMirroringEndpointGroupAssociation(); $this->assertProtobufEquals($mirroringEndpointGroupAssociation, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -2223,17 +2346,21 @@ public function updateMirroringEndpointGroupAssociationExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation(); - $request = (new UpdateMirroringEndpointGroupAssociationRequest()) - ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation); + $request = (new UpdateMirroringEndpointGroupAssociationRequest())->setMirroringEndpointGroupAssociation( + $mirroringEndpointGroupAssociation + ); $response = $gapicClient->updateMirroringEndpointGroupAssociation($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -2295,12 +2422,15 @@ public function getLocationExceptionTest() $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); + $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 { @@ -2327,9 +2457,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -2359,12 +2487,15 @@ public function listLocationsExceptionTest() $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); + $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 { @@ -2397,8 +2528,7 @@ public function getIamPolicyTest() $transport->addResponse($expectedResponse); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); $response = $gapicClient->getIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2422,17 +2552,19 @@ public function getIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); try { $gapicClient->getIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -2464,9 +2596,7 @@ public function setIamPolicyTest() // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); $response = $gapicClient->setIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2492,19 +2622,20 @@ public function setIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); try { $gapicClient->setIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -2532,9 +2663,7 @@ public function testIamPermissionsTest() // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); $response = $gapicClient->testIamPermissions($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2560,19 +2689,20 @@ public function testIamPermissionsExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); try { $gapicClient->testIamPermissions($request); // If the $gapicClient method call did not throw, fail the test @@ -2631,7 +2761,11 @@ public function createMirroringDeploymentAsyncTest() $mirroringDeployment = new MirroringDeployment(); $mirroringDeploymentForwardingRule = $gapicClient->forwardingRuleName('[PROJECT]', '[FORWARDING_RULE]'); $mirroringDeployment->setForwardingRule($mirroringDeploymentForwardingRule); - $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName('[PROJECT]', '[LOCATION]', '[MIRRORING_DEPLOYMENT_GROUP]'); + $mirroringDeploymentMirroringDeploymentGroup = $gapicClient->mirroringDeploymentGroupName( + '[PROJECT]', + '[LOCATION]', + '[MIRRORING_DEPLOYMENT_GROUP]' + ); $mirroringDeployment->setMirroringDeploymentGroup($mirroringDeploymentMirroringDeploymentGroup); $request = (new CreateMirroringDeploymentRequest()) ->setParent($formattedParent) diff --git a/NetworkSecurity/tests/Unit/V1/Client/NetworkSecurityClientTest.php b/NetworkSecurity/tests/Unit/V1/Client/NetworkSecurityClientTest.php index 30be6dd21a87..41d78059962f 100644 --- a/NetworkSecurity/tests/Unit/V1/Client/NetworkSecurityClientTest.php +++ b/NetworkSecurity/tests/Unit/V1/Client/NetworkSecurityClientTest.php @@ -37,31 +37,77 @@ use Google\Cloud\Location\Location; use Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy; use Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Action; +use Google\Cloud\NetworkSecurity\V1\AuthzPolicy; +use Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzAction; +use Google\Cloud\NetworkSecurity\V1\AuthzPolicy\Target; +use Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig; use Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy; use Google\Cloud\NetworkSecurity\V1\Client\NetworkSecurityClient; use Google\Cloud\NetworkSecurity\V1\CreateAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\CreateClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\CreateServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\CreateUrlListRequest; use Google\Cloud\NetworkSecurity\V1\DeleteAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\DeleteClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\DeleteServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\DeleteUrlListRequest; +use Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy; +use Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule; +use Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule\BasicProfile; use Google\Cloud\NetworkSecurity\V1\GetAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\GetClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\GetServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\GetUrlListRequest; use Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesRequest; use Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesResponse; +use Google\Cloud\NetworkSecurity\V1\ListAuthzPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListAuthzPoliciesResponse; +use Google\Cloud\NetworkSecurity\V1\ListBackendAuthenticationConfigsRequest; +use Google\Cloud\NetworkSecurity\V1\ListBackendAuthenticationConfigsResponse; use Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesRequest; use Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesResponse; +use Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPoliciesResponse; +use Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPolicyRulesRequest; +use Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPolicyRulesResponse; use Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesRequest; use Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesResponse; +use Google\Cloud\NetworkSecurity\V1\ListTlsInspectionPoliciesRequest; +use Google\Cloud\NetworkSecurity\V1\ListTlsInspectionPoliciesResponse; +use Google\Cloud\NetworkSecurity\V1\ListUrlListsRequest; +use Google\Cloud\NetworkSecurity\V1\ListUrlListsResponse; use Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy; +use Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy; use Google\Cloud\NetworkSecurity\V1\UpdateAuthorizationPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateAuthzPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateBackendAuthenticationConfigRequest; use Google\Cloud\NetworkSecurity\V1\UpdateClientTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateGatewaySecurityPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateGatewaySecurityPolicyRuleRequest; use Google\Cloud\NetworkSecurity\V1\UpdateServerTlsPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateTlsInspectionPolicyRequest; +use Google\Cloud\NetworkSecurity\V1\UpdateUrlListRequest; +use Google\Cloud\NetworkSecurity\V1\UrlList; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; use Google\Protobuf\Any; +use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; use stdClass; @@ -248,7 +294,7 @@ public function createAuthorizationPolicyExceptionTest() } /** @test */ - public function createClientTlsPolicyTest() + public function createAuthzPolicyTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -265,34 +311,38 @@ public function createClientTlsPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClientTlsPolicyTest'); + $incompleteOperation->setName('operations/createAuthzPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $name = 'name3373707'; $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); + $expectedResponse = new AuthzPolicy(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/createClientTlsPolicyTest'); + $completeOperation->setName('operations/createAuthzPolicyTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = 'clientTlsPolicyId244525968'; - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) + $authzPolicyId = 'authzPolicyId148183835'; + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new CreateAuthzPolicyRequest()) ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->createClientTlsPolicy($request); + ->setAuthzPolicyId($authzPolicyId) + ->setAuthzPolicy($authzPolicy); + $response = $gapicClient->createAuthzPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -301,15 +351,15 @@ public function createClientTlsPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateClientTlsPolicy', $actualApiFuncCall); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthzPolicy', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClientTlsPolicyId(); - $this->assertProtobufEquals($clientTlsPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getClientTlsPolicy(); - $this->assertProtobufEquals($clientTlsPolicy, $actualValue); + $actualValue = $actualApiRequestObject->getAuthzPolicyId(); + $this->assertProtobufEquals($authzPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthzPolicy(); + $this->assertProtobufEquals($authzPolicy, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createAuthzPolicyTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -328,7 +378,7 @@ public function createClientTlsPolicyTest() } /** @test */ - public function createClientTlsPolicyExceptionTest() + public function createAuthzPolicyExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -345,7 +395,7 @@ public function createClientTlsPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClientTlsPolicyTest'); + $incompleteOperation->setName('operations/createAuthzPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -363,19 +413,25 @@ public function createClientTlsPolicyExceptionTest() $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = 'clientTlsPolicyId244525968'; - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) + $authzPolicyId = 'authzPolicyId148183835'; + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new CreateAuthzPolicyRequest()) ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->createClientTlsPolicy($request); + ->setAuthzPolicyId($authzPolicyId) + ->setAuthzPolicy($authzPolicy); + $response = $gapicClient->createAuthzPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createAuthzPolicyTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -394,7 +450,7 @@ public function createClientTlsPolicyExceptionTest() } /** @test */ - public function createServerTlsPolicyTest() + public function createBackendAuthenticationConfigTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -411,34 +467,38 @@ public function createServerTlsPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setName('operations/createBackendAuthenticationConfigTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $name = 'name3373707'; $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); + $clientCertificate = 'clientCertificate1953512227'; + $trustConfig = 'trustConfig1834807049'; + $etag = 'etag3123477'; + $expectedResponse = new BackendAuthenticationConfig(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); + $expectedResponse->setClientCertificate($clientCertificate); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setEtag($etag); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/createServerTlsPolicyTest'); + $completeOperation->setName('operations/createBackendAuthenticationConfigTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) + $backendAuthenticationConfigId = 'backendAuthenticationConfigId-1658023556'; + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new CreateBackendAuthenticationConfigRequest()) ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->createServerTlsPolicy($request); + ->setBackendAuthenticationConfigId($backendAuthenticationConfigId) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + $response = $gapicClient->createBackendAuthenticationConfig($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -447,15 +507,18 @@ public function createServerTlsPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateServerTlsPolicy', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/CreateBackendAuthenticationConfig', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getServerTlsPolicyId(); - $this->assertProtobufEquals($serverTlsPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getServerTlsPolicy(); - $this->assertProtobufEquals($serverTlsPolicy, $actualValue); + $actualValue = $actualApiRequestObject->getBackendAuthenticationConfigId(); + $this->assertProtobufEquals($backendAuthenticationConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getBackendAuthenticationConfig(); + $this->assertProtobufEquals($backendAuthenticationConfig, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createBackendAuthenticationConfigTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -474,7 +537,7 @@ public function createServerTlsPolicyTest() } /** @test */ - public function createServerTlsPolicyExceptionTest() + public function createBackendAuthenticationConfigExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -491,7 +554,7 @@ public function createServerTlsPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setName('operations/createBackendAuthenticationConfigTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -509,19 +572,19 @@ public function createServerTlsPolicyExceptionTest() $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) + $backendAuthenticationConfigId = 'backendAuthenticationConfigId-1658023556'; + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new CreateBackendAuthenticationConfigRequest()) ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->createServerTlsPolicy($request); + ->setBackendAuthenticationConfigId($backendAuthenticationConfigId) + ->setBackendAuthenticationConfig($backendAuthenticationConfig); + $response = $gapicClient->createBackendAuthenticationConfig($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createBackendAuthenticationConfigTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -540,7 +603,7 @@ public function createServerTlsPolicyExceptionTest() } /** @test */ - public function deleteAuthorizationPolicyTest() + public function createClientTlsPolicyTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -557,21 +620,34 @@ public function deleteAuthorizationPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setName('operations/createClientTlsPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAuthorizationPolicyTest'); + $completeOperation->setName('operations/createClientTlsPolicyTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new DeleteAuthorizationPolicyRequest())->setName($formattedName); - $response = $gapicClient->deleteAuthorizationPolicy($request); + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = 'clientTlsPolicyId244525968'; + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->createClientTlsPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -580,14 +656,15 @@ public function deleteAuthorizationPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthorizationPolicy', - $actualApiFuncCall - ); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClientTlsPolicyId(); + $this->assertProtobufEquals($clientTlsPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getClientTlsPolicy(); + $this->assertProtobufEquals($clientTlsPolicy, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -606,7 +683,7 @@ public function deleteAuthorizationPolicyTest() } /** @test */ - public function deleteAuthorizationPolicyExceptionTest() + public function createClientTlsPolicyExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -623,7 +700,7 @@ public function deleteAuthorizationPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setName('operations/createClientTlsPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -640,13 +717,20 @@ public function deleteAuthorizationPolicyExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new DeleteAuthorizationPolicyRequest())->setName($formattedName); - $response = $gapicClient->deleteAuthorizationPolicy($request); + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = 'clientTlsPolicyId244525968'; + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->createClientTlsPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -665,7 +749,7 @@ public function deleteAuthorizationPolicyExceptionTest() } /** @test */ - public function deleteClientTlsPolicyTest() + public function createGatewaySecurityPolicyTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -682,21 +766,34 @@ public function deleteClientTlsPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); + $name = 'name3373707'; + $description = 'description-1724546052'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $expectedResponse = new GatewaySecurityPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClientTlsPolicyTest'); + $completeOperation->setName('operations/createGatewaySecurityPolicyTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new DeleteClientTlsPolicyRequest())->setName($formattedName); - $response = $gapicClient->deleteClientTlsPolicy($request); + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $gatewaySecurityPolicyId = 'gatewaySecurityPolicyId-1291912476'; + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new CreateGatewaySecurityPolicyRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->createGatewaySecurityPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -705,11 +802,18 @@ public function deleteClientTlsPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/CreateGatewaySecurityPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyId(); + $this->assertProtobufEquals($gatewaySecurityPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicy(); + $this->assertProtobufEquals($gatewaySecurityPolicy, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -728,7 +832,7 @@ public function deleteClientTlsPolicyTest() } /** @test */ - public function deleteClientTlsPolicyExceptionTest() + public function createGatewaySecurityPolicyExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -745,7 +849,7 @@ public function deleteClientTlsPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -762,13 +866,20 @@ public function deleteClientTlsPolicyExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new DeleteClientTlsPolicyRequest())->setName($formattedName); - $response = $gapicClient->deleteClientTlsPolicy($request); + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $gatewaySecurityPolicyId = 'gatewaySecurityPolicyId-1291912476'; + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new CreateGatewaySecurityPolicyRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId) + ->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->createGatewaySecurityPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -787,7 +898,7 @@ public function deleteClientTlsPolicyExceptionTest() } /** @test */ - public function deleteServerTlsPolicyTest() + public function createGatewaySecurityPolicyRuleTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -804,21 +915,52 @@ public function deleteServerTlsPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); + $name = 'name3373707'; + $enabled = false; + $priority = 1165461084; + $description = 'description-1724546052'; + $sessionMatcher = 'sessionMatcher-2055881591'; + $applicationMatcher = 'applicationMatcher-488643261'; + $tlsInspectionEnabled = true; + $expectedResponse = new GatewaySecurityPolicyRule(); + $expectedResponse->setName($name); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setPriority($priority); + $expectedResponse->setDescription($description); + $expectedResponse->setSessionMatcher($sessionMatcher); + $expectedResponse->setApplicationMatcher($applicationMatcher); + $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteServerTlsPolicyTest'); + $completeOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new DeleteServerTlsPolicyRequest())->setName($formattedName); - $response = $gapicClient->deleteServerTlsPolicy($request); + $formattedParent = $gapicClient->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new CreateGatewaySecurityPolicyRuleRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + $response = $gapicClient->createGatewaySecurityPolicyRule($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -827,11 +969,16 @@ public function deleteServerTlsPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/CreateGatewaySecurityPolicyRule', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyRule(); + $this->assertProtobufEquals($gatewaySecurityPolicyRule, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyRuleTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -850,7 +997,7 @@ public function deleteServerTlsPolicyTest() } /** @test */ - public function deleteServerTlsPolicyExceptionTest() + public function createGatewaySecurityPolicyRuleExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -867,7 +1014,7 @@ public function deleteServerTlsPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -884,13 +1031,30 @@ public function deleteServerTlsPolicyExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new DeleteServerTlsPolicyRequest())->setName($formattedName); - $response = $gapicClient->deleteServerTlsPolicy($request); + $formattedParent = $gapicClient->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new CreateGatewaySecurityPolicyRuleRequest()) + ->setParent($formattedParent) + ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); + $response = $gapicClient->createGatewaySecurityPolicyRule($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyRuleTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -909,60 +1073,1650 @@ public function deleteServerTlsPolicyExceptionTest() } /** @test */ - public function getAuthorizationPolicyTest() + public function createServerTlsPolicyTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $name2 = 'name2-1052831874'; + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name2); + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name); $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new GetAuthorizationPolicyRequest())->setName($formattedName); - $response = $gapicClient->getAuthorizationPolicy($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.networksecurity.v1.NetworkSecurity/GetAuthorizationPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthorizationPolicyExceptionTest() - { - $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); + $expectedResponse->setAllowOpen($allowOpen); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new GetAuthorizationPolicyRequest())->setName($formattedName); - try { + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->createServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getServerTlsPolicyId(); + $this->assertProtobufEquals($serverTlsPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getServerTlsPolicy(); + $this->assertProtobufEquals($serverTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->createServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTlsInspectionPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $caPool = 'caPool536760157'; + $trustConfig = 'trustConfig1834807049'; + $excludePublicCaSet = true; + $expectedResponse = new TlsInspectionPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCaPool($caPool); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTlsInspectionPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tlsInspectionPolicyId = 'tlsInspectionPolicyId1705280257'; + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new CreateTlsInspectionPolicyRequest()) + ->setParent($formattedParent) + ->setTlsInspectionPolicyId($tlsInspectionPolicyId) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->createTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/CreateTlsInspectionPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTlsInspectionPolicyId(); + $this->assertProtobufEquals($tlsInspectionPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getTlsInspectionPolicy(); + $this->assertProtobufEquals($tlsInspectionPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTlsInspectionPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTlsInspectionPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tlsInspectionPolicyId = 'tlsInspectionPolicyId1705280257'; + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new CreateTlsInspectionPolicyRequest()) + ->setParent($formattedParent) + ->setTlsInspectionPolicyId($tlsInspectionPolicyId) + ->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->createTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTlsInspectionPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUrlListTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new UrlList(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createUrlListTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $urlListId = 'urlListId-108977780'; + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new CreateUrlListRequest()) + ->setParent($formattedParent) + ->setUrlListId($urlListId) + ->setUrlList($urlList); + $response = $gapicClient->createUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateUrlList', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getUrlListId(); + $this->assertProtobufEquals($urlListId, $actualValue); + $actualValue = $actualApiRequestObject->getUrlList(); + $this->assertProtobufEquals($urlList, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUrlListTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUrlListExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $urlListId = 'urlListId-108977780'; + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new CreateUrlListRequest()) + ->setParent($formattedParent) + ->setUrlListId($urlListId) + ->setUrlList($urlList); + $response = $gapicClient->createUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUrlListTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizationPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new DeleteAuthorizationPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthorizationPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizationPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new DeleteAuthorizationPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthzPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAuthzPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new DeleteAuthzPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthzPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthzPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthzPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new DeleteAuthzPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthzPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackendAuthenticationConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackendAuthenticationConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backendAuthenticationConfigName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_AUTHENTICATION_CONFIG]' + ); + $request = (new DeleteBackendAuthenticationConfigRequest())->setName($formattedName); + $response = $gapicClient->deleteBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/DeleteBackendAuthenticationConfig', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackendAuthenticationConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackendAuthenticationConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backendAuthenticationConfigName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_AUTHENTICATION_CONFIG]' + ); + $request = (new DeleteBackendAuthenticationConfigRequest())->setName($formattedName); + $response = $gapicClient->deleteBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackendAuthenticationConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClientTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new DeleteClientTlsPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClientTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new DeleteClientTlsPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGatewaySecurityPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $request = (new DeleteGatewaySecurityPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/DeleteGatewaySecurityPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $request = (new DeleteGatewaySecurityPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyRuleName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]', + '[RULE]' + ); + $request = (new DeleteGatewaySecurityPolicyRuleRequest())->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/DeleteGatewaySecurityPolicyRule', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewaySecurityPolicyRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyRuleName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]', + '[RULE]' + ); + $request = (new DeleteGatewaySecurityPolicyRuleRequest())->setName($formattedName); + $response = $gapicClient->deleteGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyRuleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServerTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new DeleteServerTlsPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new DeleteServerTlsPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTlsInspectionPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTlsInspectionPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new DeleteTlsInspectionPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/DeleteTlsInspectionPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTlsInspectionPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTlsInspectionPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTlsInspectionPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new DeleteTlsInspectionPolicyRequest())->setName($formattedName); + $response = $gapicClient->deleteTlsInspectionPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTlsInspectionPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUrlListTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteUrlListTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new DeleteUrlListRequest())->setName($formattedName); + $response = $gapicClient->deleteUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteUrlList', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUrlListTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUrlListExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUrlListTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new DeleteUrlListRequest())->setName($formattedName); + $response = $gapicClient->deleteUrlList($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUrlListTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getAuthorizationPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new GetAuthorizationPolicyRequest())->setName($formattedName); + $response = $gapicClient->getAuthorizationPolicy($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.networksecurity.v1.NetworkSecurity/GetAuthorizationPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizationPolicyExceptionTest() + { + $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->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new GetAuthorizationPolicyRequest())->setName($formattedName); + try { $gapicClient->getAuthorizationPolicy($request); // If the $gapicClient method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); @@ -976,45 +2730,1358 @@ public function getAuthorizationPolicyExceptionTest() } /** @test */ - public function getClientTlsPolicyTest() + public function getAuthzPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new AuthzPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new GetAuthzPolicyRequest())->setName($formattedName); + $response = $gapicClient->getAuthzPolicy($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.networksecurity.v1.NetworkSecurity/GetAuthzPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthzPolicyExceptionTest() + { + $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->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); + $request = (new GetAuthzPolicyRequest())->setName($formattedName); + try { + $gapicClient->getAuthzPolicy($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 getBackendAuthenticationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $clientCertificate = 'clientCertificate1953512227'; + $trustConfig = 'trustConfig1834807049'; + $etag = 'etag3123477'; + $expectedResponse = new BackendAuthenticationConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setClientCertificate($clientCertificate); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backendAuthenticationConfigName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_AUTHENTICATION_CONFIG]' + ); + $request = (new GetBackendAuthenticationConfigRequest())->setName($formattedName); + $response = $gapicClient->getBackendAuthenticationConfig($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.networksecurity.v1.NetworkSecurity/GetBackendAuthenticationConfig', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackendAuthenticationConfigExceptionTest() + { + $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->backendAuthenticationConfigName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_AUTHENTICATION_CONFIG]' + ); + $request = (new GetBackendAuthenticationConfigRequest())->setName($formattedName); + try { + $gapicClient->getBackendAuthenticationConfig($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 getClientTlsPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new GetClientTlsPolicyRequest())->setName($formattedName); + $response = $gapicClient->getClientTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetClientTlsPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClientTlsPolicyExceptionTest() + { + $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->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new GetClientTlsPolicyRequest())->setName($formattedName); + try { + $gapicClient->getClientTlsPolicy($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 getGatewaySecurityPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $expectedResponse = new GatewaySecurityPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $request = (new GetGatewaySecurityPolicyRequest())->setName($formattedName); + $response = $gapicClient->getGatewaySecurityPolicy($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.networksecurity.v1.NetworkSecurity/GetGatewaySecurityPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGatewaySecurityPolicyExceptionTest() + { + $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->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $request = (new GetGatewaySecurityPolicyRequest())->setName($formattedName); + try { + $gapicClient->getGatewaySecurityPolicy($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 getGatewaySecurityPolicyRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enabled = false; + $priority = 1165461084; + $description = 'description-1724546052'; + $sessionMatcher = 'sessionMatcher-2055881591'; + $applicationMatcher = 'applicationMatcher-488643261'; + $tlsInspectionEnabled = true; + $expectedResponse = new GatewaySecurityPolicyRule(); + $expectedResponse->setName($name2); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setPriority($priority); + $expectedResponse->setDescription($description); + $expectedResponse->setSessionMatcher($sessionMatcher); + $expectedResponse->setApplicationMatcher($applicationMatcher); + $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gatewaySecurityPolicyRuleName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]', + '[RULE]' + ); + $request = (new GetGatewaySecurityPolicyRuleRequest())->setName($formattedName); + $response = $gapicClient->getGatewaySecurityPolicyRule($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.networksecurity.v1.NetworkSecurity/GetGatewaySecurityPolicyRule', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGatewaySecurityPolicyRuleExceptionTest() + { + $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->gatewaySecurityPolicyRuleName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]', + '[RULE]' + ); + $request = (new GetGatewaySecurityPolicyRuleRequest())->setName($formattedName); + try { + $gapicClient->getGatewaySecurityPolicyRule($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 getServerTlsPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new GetServerTlsPolicyRequest())->setName($formattedName); + $response = $gapicClient->getServerTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetServerTlsPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServerTlsPolicyExceptionTest() + { + $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->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new GetServerTlsPolicyRequest())->setName($formattedName); + try { + $gapicClient->getServerTlsPolicy($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 getTlsInspectionPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $caPool = 'caPool536760157'; + $trustConfig = 'trustConfig1834807049'; + $excludePublicCaSet = true; + $expectedResponse = new TlsInspectionPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCaPool($caPool); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new GetTlsInspectionPolicyRequest())->setName($formattedName); + $response = $gapicClient->getTlsInspectionPolicy($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.networksecurity.v1.NetworkSecurity/GetTlsInspectionPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTlsInspectionPolicyExceptionTest() + { + $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->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); + $request = (new GetTlsInspectionPolicyRequest())->setName($formattedName); + try { + $gapicClient->getTlsInspectionPolicy($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 getUrlListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new UrlList(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new GetUrlListRequest())->setName($formattedName); + $response = $gapicClient->getUrlList($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.networksecurity.v1.NetworkSecurity/GetUrlList', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUrlListExceptionTest() + { + $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->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); + $request = (new GetUrlListRequest())->setName($formattedName); + try { + $gapicClient->getUrlList($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 listAuthorizationPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authorizationPoliciesElement = new AuthorizationPolicy(); + $authorizationPolicies = [$authorizationPoliciesElement]; + $expectedResponse = new ListAuthorizationPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthorizationPolicies($authorizationPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthorizationPoliciesRequest())->setParent($formattedParent); + $response = $gapicClient->listAuthorizationPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthorizationPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthorizationPolicies', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizationPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthorizationPoliciesRequest())->setParent($formattedParent); + try { + $gapicClient->listAuthorizationPolicies($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 listAuthzPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authzPoliciesElement = new AuthzPolicy(); + $authzPolicies = [$authzPoliciesElement]; + $expectedResponse = new ListAuthzPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthzPolicies($authzPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthzPoliciesRequest())->setParent($formattedParent); + $response = $gapicClient->listAuthzPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthzPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthzPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthzPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthzPoliciesRequest())->setParent($formattedParent); + try { + $gapicClient->listAuthzPolicies($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 listBackendAuthenticationConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backendAuthenticationConfigsElement = new BackendAuthenticationConfig(); + $backendAuthenticationConfigs = [$backendAuthenticationConfigsElement]; + $expectedResponse = new ListBackendAuthenticationConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackendAuthenticationConfigs($backendAuthenticationConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackendAuthenticationConfigsRequest())->setParent($formattedParent); + $response = $gapicClient->listBackendAuthenticationConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackendAuthenticationConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/ListBackendAuthenticationConfigs', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackendAuthenticationConfigsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackendAuthenticationConfigsRequest())->setParent($formattedParent); + try { + $gapicClient->listBackendAuthenticationConfigs($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 listClientTlsPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clientTlsPoliciesElement = new ClientTlsPolicy(); + $clientTlsPolicies = [$clientTlsPoliciesElement]; + $expectedResponse = new ListClientTlsPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClientTlsPolicies($clientTlsPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientTlsPoliciesRequest())->setParent($formattedParent); + $response = $gapicClient->listClientTlsPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClientTlsPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListClientTlsPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientTlsPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientTlsPoliciesRequest())->setParent($formattedParent); + try { + $gapicClient->listClientTlsPolicies($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 listGatewaySecurityPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gatewaySecurityPoliciesElement = new GatewaySecurityPolicy(); + $gatewaySecurityPolicies = [$gatewaySecurityPoliciesElement]; + $expectedResponse = new ListGatewaySecurityPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGatewaySecurityPolicies($gatewaySecurityPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGatewaySecurityPoliciesRequest())->setParent($formattedParent); + $response = $gapicClient->listGatewaySecurityPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGatewaySecurityPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/ListGatewaySecurityPolicies', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGatewaySecurityPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGatewaySecurityPoliciesRequest())->setParent($formattedParent); + try { + $gapicClient->listGatewaySecurityPolicies($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 listGatewaySecurityPolicyRulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gatewaySecurityPolicyRulesElement = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRules = [$gatewaySecurityPolicyRulesElement]; + $expectedResponse = new ListGatewaySecurityPolicyRulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGatewaySecurityPolicyRules($gatewaySecurityPolicyRules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $request = (new ListGatewaySecurityPolicyRulesRequest())->setParent($formattedParent); + $response = $gapicClient->listGatewaySecurityPolicyRules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGatewaySecurityPolicyRules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/ListGatewaySecurityPolicyRules', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGatewaySecurityPolicyRulesExceptionTest() + { + $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->gatewaySecurityPolicyName( + '[PROJECT]', + '[LOCATION]', + '[GATEWAY_SECURITY_POLICY]' + ); + $request = (new ListGatewaySecurityPolicyRulesRequest())->setParent($formattedParent); + try { + $gapicClient->listGatewaySecurityPolicyRules($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 listServerTlsPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $serverTlsPoliciesElement = new ServerTlsPolicy(); + $serverTlsPolicies = [$serverTlsPoliciesElement]; + $expectedResponse = new ListServerTlsPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServerTlsPolicies($serverTlsPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServerTlsPoliciesRequest())->setParent($formattedParent); + $response = $gapicClient->listServerTlsPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServerTlsPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListServerTlsPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerTlsPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServerTlsPoliciesRequest())->setParent($formattedParent); + try { + $gapicClient->listServerTlsPolicies($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 listTlsInspectionPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tlsInspectionPoliciesElement = new TlsInspectionPolicy(); + $tlsInspectionPolicies = [$tlsInspectionPoliciesElement]; + $expectedResponse = new ListTlsInspectionPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTlsInspectionPolicies($tlsInspectionPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTlsInspectionPoliciesRequest())->setParent($formattedParent); + $response = $gapicClient->listTlsInspectionPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTlsInspectionPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/ListTlsInspectionPolicies', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTlsInspectionPoliciesExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTlsInspectionPoliciesRequest())->setParent($formattedParent); + try { + $gapicClient->listTlsInspectionPolicies($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 listUrlListsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $urlListsElement = new UrlList(); + $urlLists = [$urlListsElement]; + $expectedResponse = new ListUrlListsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUrlLists($urlLists); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListUrlListsRequest())->setParent($formattedParent); + $response = $gapicClient->listUrlLists($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUrlLists()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListUrlLists', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUrlListsExceptionTest() + { + $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->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListUrlListsRequest())->setParent($formattedParent); + try { + $gapicClient->listUrlLists($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 updateAuthorizationPolicyTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $name2 = 'name2-1052831874'; + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); - $expectedResponse->setName($name2); + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name); $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); - $transport->addResponse($expectedResponse); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new GetClientTlsPolicyRequest())->setName($formattedName); - $response = $gapicClient->getClientTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetClientTlsPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest())->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->updateAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthorizationPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); + $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function getClientTlsPolicyExceptionTest() + public function updateAuthorizationPolicyExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -1027,63 +4094,283 @@ public function getClientTlsPolicyExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new GetClientTlsPolicyRequest())->setName($formattedName); + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest())->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->updateAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); try { - $gapicClient->getClientTlsPolicy($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function getServerTlsPolicyTest() + public function updateAuthzPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthzPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthzPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new UpdateAuthzPolicyRequest())->setUpdateMask($updateMask)->setAuthzPolicy($authzPolicy); + $response = $gapicClient->updateAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthzPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getAuthzPolicy(); + $this->assertProtobufEquals($authzPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthzPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAuthzPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthzPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $authzPolicy = new AuthzPolicy(); + $authzPolicyName = 'authzPolicyName1154629711'; + $authzPolicy->setName($authzPolicyName); + $authzPolicyTarget = new Target(); + $targetResources = []; + $authzPolicyTarget->setResources($targetResources); + $authzPolicy->setTarget($authzPolicyTarget); + $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; + $authzPolicy->setAction($authzPolicyAction); + $request = (new UpdateAuthzPolicyRequest())->setUpdateMask($updateMask)->setAuthzPolicy($authzPolicy); + $response = $gapicClient->updateAuthzPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthzPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackendAuthenticationConfigTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $name2 = 'name2-1052831874'; + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); - $expectedResponse->setName($name2); + $clientCertificate = 'clientCertificate1953512227'; + $trustConfig = 'trustConfig1834807049'; + $etag = 'etag3123477'; + $expectedResponse = new BackendAuthenticationConfig(); + $expectedResponse->setName($name); $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); - $transport->addResponse($expectedResponse); + $expectedResponse->setClientCertificate($clientCertificate); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackendAuthenticationConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new GetServerTlsPolicyRequest())->setName($formattedName); - $response = $gapicClient->getServerTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetServerTlsPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new UpdateBackendAuthenticationConfigRequest())->setBackendAuthenticationConfig( + $backendAuthenticationConfig + ); + $response = $gapicClient->updateBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/UpdateBackendAuthenticationConfig', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getBackendAuthenticationConfig(); + $this->assertProtobufEquals($backendAuthenticationConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackendAuthenticationConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function getServerTlsPolicyExceptionTest() + public function updateBackendAuthenticationConfigExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackendAuthenticationConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -1096,68 +4383,128 @@ public function getServerTlsPolicyExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new GetServerTlsPolicyRequest())->setName($formattedName); + $backendAuthenticationConfig = new BackendAuthenticationConfig(); + $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; + $backendAuthenticationConfig->setName($backendAuthenticationConfigName); + $request = (new UpdateBackendAuthenticationConfigRequest())->setBackendAuthenticationConfig( + $backendAuthenticationConfig + ); + $response = $gapicClient->updateBackendAuthenticationConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackendAuthenticationConfigTest'); try { - $gapicClient->getServerTlsPolicy($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listAuthorizationPoliciesTest() + public function updateClientTlsPolicyTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $nextPageToken = ''; - $authorizationPoliciesElement = new AuthorizationPolicy(); - $authorizationPolicies = [$authorizationPoliciesElement]; - $expectedResponse = new ListAuthorizationPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuthorizationPolicies($authorizationPolicies); - $transport->addResponse($expectedResponse); + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthorizationPoliciesRequest())->setParent($formattedParent); - $response = $gapicClient->listAuthorizationPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuthorizationPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthorizationPolicies', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest())->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->updateClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getClientTlsPolicy(); + $this->assertProtobufEquals($clientTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listAuthorizationPoliciesExceptionTest() + public function updateClientTlsPolicyExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -1170,65 +4517,129 @@ public function listAuthorizationPoliciesExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthorizationPoliciesRequest())->setParent($formattedParent); + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest())->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->updateClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); try { - $gapicClient->listAuthorizationPolicies($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listClientTlsPoliciesTest() + public function updateGatewaySecurityPolicyTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $nextPageToken = ''; - $clientTlsPoliciesElement = new ClientTlsPolicy(); - $clientTlsPolicies = [$clientTlsPoliciesElement]; - $expectedResponse = new ListClientTlsPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClientTlsPolicies($clientTlsPolicies); - $transport->addResponse($expectedResponse); + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; + $expectedResponse = new GatewaySecurityPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGatewaySecurityPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientTlsPoliciesRequest())->setParent($formattedParent); - $response = $gapicClient->listClientTlsPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClientTlsPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListClientTlsPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new UpdateGatewaySecurityPolicyRequest())->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->updateGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/UpdateGatewaySecurityPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicy(); + $this->assertProtobufEquals($gatewaySecurityPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listClientTlsPoliciesExceptionTest() + public function updateGatewaySecurityPolicyExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -1241,65 +4652,147 @@ public function listClientTlsPoliciesExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientTlsPoliciesRequest())->setParent($formattedParent); + $gatewaySecurityPolicy = new GatewaySecurityPolicy(); + $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; + $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); + $request = (new UpdateGatewaySecurityPolicyRequest())->setGatewaySecurityPolicy($gatewaySecurityPolicy); + $response = $gapicClient->updateGatewaySecurityPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyTest'); try { - $gapicClient->listClientTlsPolicies($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listServerTlsPoliciesTest() + public function updateGatewaySecurityPolicyRuleTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $nextPageToken = ''; - $serverTlsPoliciesElement = new ServerTlsPolicy(); - $serverTlsPolicies = [$serverTlsPoliciesElement]; - $expectedResponse = new ListServerTlsPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServerTlsPolicies($serverTlsPolicies); - $transport->addResponse($expectedResponse); + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $enabled = false; + $priority = 1165461084; + $description = 'description-1724546052'; + $sessionMatcher = 'sessionMatcher-2055881591'; + $applicationMatcher = 'applicationMatcher-488643261'; + $tlsInspectionEnabled = true; + $expectedResponse = new GatewaySecurityPolicyRule(); + $expectedResponse->setName($name); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setPriority($priority); + $expectedResponse->setDescription($description); + $expectedResponse->setSessionMatcher($sessionMatcher); + $expectedResponse->setApplicationMatcher($applicationMatcher); + $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServerTlsPoliciesRequest())->setParent($formattedParent); - $response = $gapicClient->listServerTlsPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServerTlsPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListServerTlsPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new UpdateGatewaySecurityPolicyRuleRequest())->setGatewaySecurityPolicyRule( + $gatewaySecurityPolicyRule + ); + $response = $gapicClient->updateGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/UpdateGatewaySecurityPolicyRule', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyRule(); + $this->assertProtobufEquals($gatewaySecurityPolicyRule, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listServerTlsPoliciesExceptionTest() + public function updateGatewaySecurityPolicyRuleExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -1312,25 +4805,46 @@ public function listServerTlsPoliciesExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServerTlsPoliciesRequest())->setParent($formattedParent); + $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); + $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; + $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); + $gatewaySecurityPolicyRuleEnabled = false; + $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); + $gatewaySecurityPolicyRulePriority = 797716438; + $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); + $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; + $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); + $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; + $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); + $request = (new UpdateGatewaySecurityPolicyRuleRequest())->setGatewaySecurityPolicyRule( + $gatewaySecurityPolicyRule + ); + $response = $gapicClient->updateGatewaySecurityPolicyRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyRuleTest'); try { - $gapicClient->listServerTlsPolicies($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function updateAuthorizationPolicyTest() + public function updateServerTlsPolicyTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1347,29 +4861,29 @@ public function updateAuthorizationPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $name = 'name3373707'; $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAuthorizationPolicyTest'); + $completeOperation->setName('operations/updateServerTlsPolicyTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest())->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->updateAuthorizationPolicy($request); + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest())->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->updateServerTlsPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -1378,14 +4892,11 @@ public function updateAuthorizationPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthorizationPolicy', - $actualApiFuncCall - ); - $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); - $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getServerTlsPolicy(); + $this->assertProtobufEquals($serverTlsPolicy, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); + $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -1404,7 +4915,7 @@ public function updateAuthorizationPolicyTest() } /** @test */ - public function updateAuthorizationPolicyExceptionTest() + public function updateServerTlsPolicyExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1421,7 +4932,7 @@ public function updateAuthorizationPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -1438,17 +4949,15 @@ public function updateAuthorizationPolicyExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest())->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->updateAuthorizationPolicy($request); + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest())->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->updateServerTlsPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); + $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -1467,7 +4976,7 @@ public function updateAuthorizationPolicyExceptionTest() } /** @test */ - public function updateClientTlsPolicyTest() + public function updateTlsInspectionPolicyTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1484,29 +4993,35 @@ public function updateClientTlsPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setName('operations/updateTlsInspectionPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $name = 'name3373707'; $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); + $caPool = 'caPool536760157'; + $trustConfig = 'trustConfig1834807049'; + $excludePublicCaSet = true; + $expectedResponse = new TlsInspectionPolicy(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); + $expectedResponse->setCaPool($caPool); + $expectedResponse->setTrustConfig($trustConfig); + $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClientTlsPolicyTest'); + $completeOperation->setName('operations/updateTlsInspectionPolicyTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest())->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->updateClientTlsPolicy($request); + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new UpdateTlsInspectionPolicyRequest())->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->updateTlsInspectionPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -1515,11 +5030,14 @@ public function updateClientTlsPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getClientTlsPolicy(); - $this->assertProtobufEquals($clientTlsPolicy, $actualValue); + $this->assertSame( + '/google.cloud.networksecurity.v1.NetworkSecurity/UpdateTlsInspectionPolicy', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getTlsInspectionPolicy(); + $this->assertProtobufEquals($tlsInspectionPolicy, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/updateTlsInspectionPolicyTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -1538,7 +5056,7 @@ public function updateClientTlsPolicyTest() } /** @test */ - public function updateClientTlsPolicyExceptionTest() + public function updateTlsInspectionPolicyExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1555,7 +5073,7 @@ public function updateClientTlsPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setName('operations/updateTlsInspectionPolicyTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -1572,15 +5090,17 @@ public function updateClientTlsPolicyExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest())->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->updateClientTlsPolicy($request); + $tlsInspectionPolicy = new TlsInspectionPolicy(); + $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; + $tlsInspectionPolicy->setName($tlsInspectionPolicyName); + $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); + $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); + $request = (new UpdateTlsInspectionPolicyRequest())->setTlsInspectionPolicy($tlsInspectionPolicy); + $response = $gapicClient->updateTlsInspectionPolicy($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/updateTlsInspectionPolicyTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -1599,7 +5119,7 @@ public function updateClientTlsPolicyExceptionTest() } /** @test */ - public function updateServerTlsPolicyTest() + public function updateUrlListTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1616,29 +5136,29 @@ public function updateServerTlsPolicyTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); + $incompleteOperation->setName('operations/updateUrlListTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $name = 'name3373707'; $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); + $expectedResponse = new UrlList(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/updateServerTlsPolicyTest'); + $completeOperation->setName('operations/updateUrlListTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest())->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->updateServerTlsPolicy($request); + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new UpdateUrlListRequest())->setUrlList($urlList); + $response = $gapicClient->updateUrlList($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -1647,11 +5167,11 @@ public function updateServerTlsPolicyTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getServerTlsPolicy(); - $this->assertProtobufEquals($serverTlsPolicy, $actualValue); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateUrlList', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUrlList(); + $this->assertProtobufEquals($urlList, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/updateUrlListTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -1670,7 +5190,7 @@ public function updateServerTlsPolicyTest() } /** @test */ - public function updateServerTlsPolicyExceptionTest() + public function updateUrlListExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1687,7 +5207,7 @@ public function updateServerTlsPolicyExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); + $incompleteOperation->setName('operations/updateUrlListTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -1704,15 +5224,17 @@ public function updateServerTlsPolicyExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest())->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->updateServerTlsPolicy($request); + $urlList = new UrlList(); + $urlListName = 'urlListName-1239061800'; + $urlList->setName($urlListName); + $urlListValues = []; + $urlList->setValues($urlListValues); + $request = (new UpdateUrlListRequest())->setUrlList($urlList); + $response = $gapicClient->updateUrlList($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); + $expectedOperationsRequestObject->setName('operations/updateUrlListTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php b/NetworkSecurity/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php similarity index 89% rename from owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php rename to NetworkSecurity/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php index 1491a8b86011..3631e0e2e56a 100644 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php +++ b/NetworkSecurity/tests/Unit/V1/Client/OrganizationSecurityProfileGroupServiceClientTest.php @@ -75,7 +75,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return OrganizationSecurityProfileGroupServiceClient */ @@ -139,7 +141,10 @@ public function createSecurityProfileTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfile', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfile', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getSecurityProfileId(); @@ -189,12 +194,15 @@ public function createSecurityProfileExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); @@ -288,7 +296,10 @@ public function createSecurityProfileGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfileGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfileGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getSecurityProfileGroupId(); @@ -338,12 +349,15 @@ public function createSecurityProfileGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); @@ -406,8 +420,7 @@ public function deleteSecurityProfileTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); - $request = (new DeleteSecurityProfileRequest()) - ->setName($formattedName); + $request = (new DeleteSecurityProfileRequest())->setName($formattedName); $response = $gapicClient->deleteSecurityProfile($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -417,7 +430,10 @@ public function deleteSecurityProfileTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/DeleteSecurityProfile', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/DeleteSecurityProfile', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -463,17 +479,19 @@ public function deleteSecurityProfileExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); - $request = (new DeleteSecurityProfileRequest()) - ->setName($formattedName); + $request = (new DeleteSecurityProfileRequest())->setName($formattedName); $response = $gapicClient->deleteSecurityProfile($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -526,9 +544,12 @@ public function deleteSecurityProfileGroupTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); - $request = (new DeleteSecurityProfileGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->securityProfileGroupName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE_GROUP]' + ); + $request = (new DeleteSecurityProfileGroupRequest())->setName($formattedName); $response = $gapicClient->deleteSecurityProfileGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -538,7 +559,10 @@ public function deleteSecurityProfileGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/DeleteSecurityProfileGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/DeleteSecurityProfileGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -584,17 +608,23 @@ public function deleteSecurityProfileGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); - $request = (new DeleteSecurityProfileGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->securityProfileGroupName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE_GROUP]' + ); + $request = (new DeleteSecurityProfileGroupRequest())->setName($formattedName); $response = $gapicClient->deleteSecurityProfileGroup($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -636,15 +666,17 @@ public function getSecurityProfileTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); - $request = (new GetSecurityProfileRequest()) - ->setName($formattedName); + $request = (new GetSecurityProfileRequest())->setName($formattedName); $response = $gapicClient->getSecurityProfile($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.networksecurity.v1.OrganizationSecurityProfileGroupService/GetSecurityProfile', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/GetSecurityProfile', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -661,17 +693,19 @@ public function getSecurityProfileExceptionTest() $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); + $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->securityProfileName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE]'); - $request = (new GetSecurityProfileRequest()) - ->setName($formattedName); + $request = (new GetSecurityProfileRequest())->setName($formattedName); try { $gapicClient->getSecurityProfile($request); // If the $gapicClient method call did not throw, fail the test @@ -713,16 +747,22 @@ public function getSecurityProfileGroupTest() $expectedResponse->setUrlFilteringProfile($urlFilteringProfile); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); - $request = (new GetSecurityProfileGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->securityProfileGroupName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE_GROUP]' + ); + $request = (new GetSecurityProfileGroupRequest())->setName($formattedName); $response = $gapicClient->getSecurityProfileGroup($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.networksecurity.v1.OrganizationSecurityProfileGroupService/GetSecurityProfileGroup', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/GetSecurityProfileGroup', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -739,17 +779,23 @@ public function getSecurityProfileGroupExceptionTest() $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); + $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->securityProfileGroupName('[ORGANIZATION]', '[LOCATION]', '[SECURITY_PROFILE_GROUP]'); - $request = (new GetSecurityProfileGroupRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->securityProfileGroupName( + '[ORGANIZATION]', + '[LOCATION]', + '[SECURITY_PROFILE_GROUP]' + ); + $request = (new GetSecurityProfileGroupRequest())->setName($formattedName); try { $gapicClient->getSecurityProfileGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -774,17 +820,14 @@ public function listSecurityProfileGroupsTest() // Mock response $nextPageToken = ''; $securityProfileGroupsElement = new SecurityProfileGroup(); - $securityProfileGroups = [ - $securityProfileGroupsElement, - ]; + $securityProfileGroups = [$securityProfileGroupsElement]; $expectedResponse = new ListSecurityProfileGroupsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setSecurityProfileGroups($securityProfileGroups); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListSecurityProfileGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListSecurityProfileGroupsRequest())->setParent($formattedParent); $response = $gapicClient->listSecurityProfileGroups($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -794,7 +837,10 @@ public function listSecurityProfileGroupsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/ListSecurityProfileGroups', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/ListSecurityProfileGroups', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -811,17 +857,19 @@ public function listSecurityProfileGroupsExceptionTest() $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); + $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 ListSecurityProfileGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListSecurityProfileGroupsRequest())->setParent($formattedParent); try { $gapicClient->listSecurityProfileGroups($request); // If the $gapicClient method call did not throw, fail the test @@ -846,17 +894,14 @@ public function listSecurityProfilesTest() // Mock response $nextPageToken = ''; $securityProfilesElement = new SecurityProfile(); - $securityProfiles = [ - $securityProfilesElement, - ]; + $securityProfiles = [$securityProfilesElement]; $expectedResponse = new ListSecurityProfilesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setSecurityProfiles($securityProfiles); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListSecurityProfilesRequest()) - ->setParent($formattedParent); + $request = (new ListSecurityProfilesRequest())->setParent($formattedParent); $response = $gapicClient->listSecurityProfiles($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -866,7 +911,10 @@ public function listSecurityProfilesTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/ListSecurityProfiles', $actualFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/ListSecurityProfiles', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -883,17 +931,19 @@ public function listSecurityProfilesExceptionTest() $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); + $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 ListSecurityProfilesRequest()) - ->setParent($formattedParent); + $request = (new ListSecurityProfilesRequest())->setParent($formattedParent); try { $gapicClient->listSecurityProfiles($request); // If the $gapicClient method call did not throw, fail the test @@ -957,7 +1007,10 @@ public function updateSecurityProfileTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/UpdateSecurityProfile', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/UpdateSecurityProfile', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $actualValue = $actualApiRequestObject->getSecurityProfile(); @@ -1005,12 +1058,15 @@ public function updateSecurityProfileExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); @@ -1100,7 +1156,10 @@ public function updateSecurityProfileGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/UpdateSecurityProfileGroup', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/UpdateSecurityProfileGroup', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $actualValue = $actualApiRequestObject->getSecurityProfileGroup(); @@ -1148,12 +1207,15 @@ public function updateSecurityProfileGroupExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); @@ -1222,12 +1284,15 @@ public function getLocationExceptionTest() $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); + $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 { @@ -1254,9 +1319,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -1286,12 +1349,15 @@ public function listLocationsExceptionTest() $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); + $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 { @@ -1324,8 +1390,7 @@ public function getIamPolicyTest() $transport->addResponse($expectedResponse); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); $response = $gapicClient->getIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1349,17 +1414,19 @@ public function getIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); + $request = (new GetIamPolicyRequest())->setResource($resource); try { $gapicClient->getIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -1391,9 +1458,7 @@ public function setIamPolicyTest() // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); $response = $gapicClient->setIamPolicy($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1419,19 +1484,20 @@ public function setIamPolicyExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); try { $gapicClient->setIamPolicy($request); // If the $gapicClient method call did not throw, fail the test @@ -1459,9 +1525,7 @@ public function testIamPermissionsTest() // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); $response = $gapicClient->testIamPermissions($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1487,19 +1551,20 @@ public function testIamPermissionsExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $resource = 'resource-341064690'; $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); try { $gapicClient->testIamPermissions($request); // If the $gapicClient method call did not throw, fail the test @@ -1565,7 +1630,10 @@ public function createSecurityProfileAsyncTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfile', $actualApiFuncCall); + $this->assertSame( + '/google.cloud.networksecurity.v1.OrganizationSecurityProfileGroupService/CreateSecurityProfile', + $actualApiFuncCall + ); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualApiRequestObject->getSecurityProfileId(); diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php deleted file mode 100644 index 8c79b85819fd..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AddressGroup.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x9DB\x0A3google/cloud/networksecurity/v1/address_group.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x06\x0A\x0CAddressGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x05 \x03(\x0B29.google.cloud.networksecurity.v1.AddressGroup.LabelsEntryB\x03\xE0A\x01\x12E\x0A\x04type\x18\x06 \x01(\x0E22.google.cloud.networksecurity.v1.AddressGroup.TypeB\x03\xE0A\x02\x12\x12\x0A\x05items\x18\x07 \x03(\x09B\x03\xE0A\x01\x12\x15\x0A\x08capacity\x18\x08 \x01(\x05B\x03\xE0A\x02\x12\x16\x0A\x09self_link\x18\x09 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x07purpose\x18\x0A \x03(\x0E25.google.cloud.networksecurity.v1.AddressGroup.PurposeB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"0\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04IPV4\x10\x01\x12\x08\x0A\x04IPV6\x10\x02\"@\x0A\x07Purpose\x12\x17\x0A\x13PURPOSE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07DEFAULT\x10\x01\x12\x0F\x0A\x0BCLOUD_ARMOR\x10\x02:\xC9\x01\xEAA\xC5\x01\x0A+networksecurity.googleapis.com/AddressGroup\x12Eprojects/{project}/locations/{location}/addressGroups/{address_group}\x12Oorganizations/{organization}/locations/{location}/addressGroups/{address_group}\"\xA1\x01\x0A\x18ListAddressGroupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12#\x0A\x16return_partial_success\x18\x04 \x01(\x08B\x03\xE0A\x01\"\x90\x01\x0A\x19ListAddressGroupsResponse\x12E\x0A\x0Eaddress_groups\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.AddressGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"[\x0A\x16GetAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\"\xE3\x01\x0A\x19CreateAddressGroupRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+networksecurity.googleapis.com/AddressGroup\x12\x1D\x0A\x10address_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12I\x0A\x0Daddress_group\x18\x03 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xB5\x01\x0A\x19UpdateAddressGroupRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12I\x0A\x0Daddress_group\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.AddressGroupB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"w\x0A\x19DeleteAddressGroupRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A\x1BAddAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x99\x01\x0A\x1ERemoveAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x12\x0A\x05items\x18\x02 \x03(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xD7\x01\x0A\x1DCloneAddressGroupItemsRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12Q\x0A\x14source_address_group\x18\x02 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A!ListAddressGroupReferencesRequest\x12J\x0A\x0Daddress_group\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+networksecurity.googleapis.com/AddressGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x9C\x02\x0A\"ListAddressGroupReferencesResponse\x12{\x0A\x18address_group_references\x18\x01 \x03(\x0B2Y.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x1A`\x0A\x15AddressGroupReference\x12\x17\x0A\x0Ffirewall_policy\x18\x01 \x01(\x09\x12\x17\x0A\x0Fsecurity_policy\x18\x04 \x01(\x09\x12\x15\x0A\x0Drule_priority\x18\x02 \x01(\x052\xDA\x13\x0A\x13AddressGroupService\x12\xCE\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"B\xDAA\x06parent\x82\xD3\xE4\x93\x023\x121/v1/{parent=projects/*/locations/*}/addressGroups\x12\xBB\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"@\xDAA\x04name\x82\xD3\xE4\x93\x023\x121/v1/{name=projects/*/locations/*/addressGroups/*}\x12\xA6\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB4\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02B\"1/v1/{parent=projects/*/locations/*}/addressGroups:\x0Daddress_group\x12\xA8\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB6\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02P2?/v1/{address_group.name=projects/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\x9E\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xA8\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02H\"C/v1/{address_group=projects/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xA7\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02K\"F/v1/{address_group=projects/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB3\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02J\"E/v1/{address_group=projects/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\xFF\x01\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x023*1/v1/{name=projects/*/locations/*/addressGroups/*}\x12\x88\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"a\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02K\x12I/v1/{address_group=projects/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platform2\x93\x14\x0A\x1FOrganizationAddressGroupService\x12\xD3\x01\x0A\x11ListAddressGroups\x129.google.cloud.networksecurity.v1.ListAddressGroupsRequest\x1A:.google.cloud.networksecurity.v1.ListAddressGroupsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v1/{parent=organizations/*/locations/*}/addressGroups\x12\xC0\x01\x0A\x0FGetAddressGroup\x127.google.cloud.networksecurity.v1.GetAddressGroupRequest\x1A-.google.cloud.networksecurity.v1.AddressGroup\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\xAB\x02\x0A\x12CreateAddressGroup\x12:.google.cloud.networksecurity.v1.CreateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xB9\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA%parent,address_group,address_group_id\x82\xD3\xE4\x93\x02G\"6/v1/{parent=organizations/*/locations/*}/addressGroups:\x0Daddress_group\x12\xAD\x02\x0A\x12UpdateAddressGroup\x12:.google.cloud.networksecurity.v1.UpdateAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\xBB\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x19address_group,update_mask\x82\xD3\xE4\x93\x02U2D/v1/{address_group.name=organizations/*/locations/*/addressGroups/*}:\x0Daddress_group\x12\xA3\x02\x0A\x14AddAddressGroupItems\x12<.google.cloud.networksecurity.v1.AddAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xAD\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02M\"H/v1/{address_group=organizations/*/locations/*/addressGroups/*}:addItems:\x01*\x12\xAC\x02\x0A\x17RemoveAddressGroupItems\x12?.google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xB0\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x13address_group,items\x82\xD3\xE4\x93\x02P\"K/v1/{address_group=organizations/*/locations/*/addressGroups/*}:removeItems:\x01*\x12\xB8\x02\x0A\x16CloneAddressGroupItems\x12>.google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest\x1A\x1D.google.longrunning.Operation\"\xBE\x01\xCAAA\x0A\x0CAddressGroup\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\"address_group,source_address_group\x82\xD3\xE4\x93\x02O\"J/v1/{address_group=organizations/*/locations/*/addressGroups/*}:cloneItems:\x01*\x12\x84\x02\x0A\x12DeleteAddressGroup\x12:.google.cloud.networksecurity.v1.DeleteAddressGroupRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v1/{name=organizations/*/locations/*/addressGroups/*}\x12\x8D\x02\x0A\x1AListAddressGroupReferences\x12B.google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest\x1AC.google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse\"f\xDAA\x0Daddress_group\x82\xD3\xE4\x93\x02P\x12N/v1/{address_group=organizations/*/locations/*/addressGroups/*}:listReferences\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xF2\x01\x0A#com.google.cloud.networksecurity.v1B\x11AddressGroupProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php deleted file mode 100644 index ccb984801e07..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x8C\x14\x0A:google/cloud/networksecurity/v1/authorization_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB1\x09\x0A\x13AuthorizationPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12U\x0A\x06labels\x18\x05 \x03(\x0B2@.google.cloud.networksecurity.v1.AuthorizationPolicy.LabelsEntryB\x03\xE0A\x01\x12P\x0A\x06action\x18\x06 \x01(\x0E2;.google.cloud.networksecurity.v1.AuthorizationPolicy.ActionB\x03\xE0A\x02\x12M\x0A\x05rules\x18\x07 \x03(\x0B29.google.cloud.networksecurity.v1.AuthorizationPolicy.RuleB\x03\xE0A\x01\x1A\x91\x04\x0A\x04Rule\x12V\x0A\x07sources\x18\x01 \x03(\x0B2@.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.SourceB\x03\xE0A\x01\x12`\x0A\x0Cdestinations\x18\x02 \x03(\x0B2E.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.DestinationB\x03\xE0A\x01\x1A9\x0A\x06Source\x12\x17\x0A\x0Aprincipals\x18\x01 \x03(\x09B\x03\xE0A\x01\x12\x16\x0A\x09ip_blocks\x18\x02 \x03(\x09B\x03\xE0A\x01\x1A\x93\x02\x0A\x0BDestination\x12\x12\x0A\x05hosts\x18\x01 \x03(\x09B\x03\xE0A\x02\x12\x12\x0A\x05ports\x18\x02 \x03(\x0DB\x03\xE0A\x02\x12\x14\x0A\x07methods\x18\x04 \x03(\x09B\x03\xE0A\x01\x12u\x0A\x11http_header_match\x18\x05 \x01(\x0B2U.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatchB\x03\xE0A\x01\x1AO\x0A\x0FHttpHeaderMatch\x12\x1A\x0A\x0Bregex_match\x18\x02 \x01(\x09B\x03\xE0A\x02H\x00\x12\x18\x0A\x0Bheader_name\x18\x01 \x01(\x09B\x03\xE0A\x02B\x06\x0A\x04type\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"5\x0A\x06Action\x12\x16\x0A\x12ACTION_UNSPECIFIED\x10\x00\x12\x09\x0A\x05ALLOW\x10\x01\x12\x08\x0A\x04DENY\x10\x02:\x8E\x01\xEAA\x8A\x01\x0A2networksecurity.googleapis.com/AuthorizationPolicy\x12Tprojects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}\"\x84\x01\x0A ListAuthorizationPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x92\x01\x0A!ListAuthorizationPoliciesResponse\x12T\x0A\x16authorization_policies\x18\x01 \x03(\x0B24.google.cloud.networksecurity.v1.AuthorizationPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"i\x0A\x1DGetAuthorizationPolicyRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/AuthorizationPolicy\"\xED\x01\x0A CreateAuthorizationPolicyRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x122networksecurity.googleapis.com/AuthorizationPolicy\x12\$\x0A\x17authorization_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x14authorization_policy\x18\x03 \x01(\x0B24.google.cloud.networksecurity.v1.AuthorizationPolicyB\x03\xE0A\x02\"\xB1\x01\x0A UpdateAuthorizationPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12W\x0A\x14authorization_policy\x18\x02 \x01(\x0B24.google.cloud.networksecurity.v1.AuthorizationPolicyB\x03\xE0A\x02\"l\x0A DeleteAuthorizationPolicyRequest\x12H\x0A\x04name\x18\x01 \x01(\x09B:\xE0A\x02\xFAA4\x0A2networksecurity.googleapis.com/AuthorizationPolicyB\xF9\x01\x0A#com.google.cloud.networksecurity.v1B\x18AuthorizationPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php deleted file mode 100644 index 4fb3543cf3ff..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xAF\x0F\x0A7google/cloud/networksecurity/v1/client_tls_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A)google/cloud/networksecurity/v1/tls.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xEC\x04\x0A\x0FClientTlsPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12Q\x0A\x06labels\x18\x05 \x03(\x0B2<.google.cloud.networksecurity.v1.ClientTlsPolicy.LabelsEntryB\x03\xE0A\x01\x12\x10\x0A\x03sni\x18\x06 \x01(\x09B\x03\xE0A\x01\x12U\x0A\x12client_certificate\x18\x07 \x01(\x0B24.google.cloud.networksecurity.v1.CertificateProviderB\x03\xE0A\x01\x12P\x0A\x14server_validation_ca\x18\x08 \x03(\x0B2-.google.cloud.networksecurity.v1.ValidationCAB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x82\x01\xEAA\x7F\x0A.networksecurity.googleapis.com/ClientTlsPolicy\x12Mprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}\"\x80\x01\x0A\x1CListClientTlsPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x87\x01\x0A\x1DListClientTlsPoliciesResponse\x12M\x0A\x13client_tls_policies\x18\x01 \x03(\x0B20.google.cloud.networksecurity.v1.ClientTlsPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x19GetClientTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ClientTlsPolicy\"\xDB\x01\x0A\x1CCreateClientTlsPolicyRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.networksecurity.googleapis.com/ClientTlsPolicy\x12!\x0A\x14client_tls_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12P\x0A\x11client_tls_policy\x18\x03 \x01(\x0B20.google.cloud.networksecurity.v1.ClientTlsPolicyB\x03\xE0A\x02\"\xA6\x01\x0A\x1CUpdateClientTlsPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12P\x0A\x11client_tls_policy\x18\x02 \x01(\x0B20.google.cloud.networksecurity.v1.ClientTlsPolicyB\x03\xE0A\x02\"d\x0A\x1CDeleteClientTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ClientTlsPolicyB\xF5\x01\x0A#com.google.cloud.networksecurity.v1B\x14ClientTlsPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php deleted file mode 100644 index 5bd74b85b9ef..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php +++ /dev/null @@ -1,26 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xEA\x04\x0A,google/cloud/networksecurity/v1/common.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03B\xEC\x01\x0A#com.google.cloud.networksecurity.v1B\x0BCommonProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php deleted file mode 100644 index df30623dc988..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php +++ /dev/null @@ -1,38 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC7k\x0A6google/cloud/networksecurity/v1/network_security.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x17google/api/client.proto\x1A:google/cloud/networksecurity/v1/authorization_policy.proto\x1A2google/cloud/networksecurity/v1/authz_policy.proto\x1ACgoogle/cloud/networksecurity/v1/backend_authentication_config.proto\x1A7google/cloud/networksecurity/v1/client_tls_policy.proto\x1A,google/cloud/networksecurity/v1/common.proto\x1A=google/cloud/networksecurity/v1/gateway_security_policy.proto\x1ABgoogle/cloud/networksecurity/v1/gateway_security_policy_rule.proto\x1A7google/cloud/networksecurity/v1/server_tls_policy.proto\x1A;google/cloud/networksecurity/v1/tls_inspection_policy.proto\x1A.google/cloud/networksecurity/v1/url_list.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto2\xE1c\x0A\x0FNetworkSecurity\x12\xEE\x01\x0A\x19ListAuthorizationPolicies\x12A.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest\x1AB.google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*}/authorizationPolicies\x12\xD8\x01\x0A\x16GetAuthorizationPolicy\x12>.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest\x1A4.google.cloud.networksecurity.v1.AuthorizationPolicy\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\xD8\x02\x0A\x19CreateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xD8\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA3parent,authorization_policy,authorization_policy_id\x82\xD3\xE4\x93\x02Q\"9/v1/{parent=projects/*/locations/*}/authorizationPolicies:\x14authorization_policy\x12\xDA\x02\x0A\x19UpdateAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDA\x01\xCAAH\x0A\x13AuthorizationPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA authorization_policy,update_mask\x82\xD3\xE4\x93\x02f2N/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}:\x14authorization_policy\x12\x95\x02\x0A\x19DeleteAuthorizationPolicy\x12A.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/authorizationPolicies/*}\x12\x8A\x02\x0A ListBackendAuthenticationConfigs\x12H.google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsRequest\x1AI.google.cloud.networksecurity.v1.ListBackendAuthenticationConfigsResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs\x12\xF7\x01\x0A\x1EGetBackendAuthenticationConfig\x12F.google.cloud.networksecurity.v1.GetBackendAuthenticationConfigRequest\x1A<.google.cloud.networksecurity.v1.BackendAuthenticationConfig\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}\x12\x92\x03\x0A!CreateBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.CreateBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x82\x02\xCAAP\x0A\x1BBackendAuthenticationConfig\x121google.cloud.networksecurity.v1.OperationMetadata\xDAAEparent,backend_authentication_config,backend_authentication_config_id\x82\xD3\xE4\x93\x02a\"@/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs:\x1Dbackend_authentication_config\x12\x94\x03\x0A!UpdateBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.UpdateBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x84\x02\xCAAP\x0A\x1BBackendAuthenticationConfig\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA)backend_authentication_config,update_mask\x82\xD3\xE4\x93\x02\x7F2^/v1/{backend_authentication_config.name=projects/*/locations/*/backendAuthenticationConfigs/*}:\x1Dbackend_authentication_config\x12\xAC\x02\x0A!DeleteBackendAuthenticationConfig\x12I.google.cloud.networksecurity.v1.DeleteBackendAuthenticationConfigRequest\x1A\x1D.google.longrunning.Operation\"\x9C\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}\x12\xDE\x01\x0A\x15ListServerTlsPolicies\x12=.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/serverTlsPolicies\x12\xC8\x01\x0A\x12GetServerTlsPolicy\x12:.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ServerTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,server_tls_policy,server_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serverTlsPolicies:\x11server_tls_policy\x12\xC1\x02\x0A\x15UpdateServerTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FServerTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dserver_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}:\x11server_tls_policy\x12\x89\x02\x0A\x15DeleteServerTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/serverTlsPolicies/*}\x12\xDE\x01\x0A\x15ListClientTlsPolicies\x12=.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest\x1A>.google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/clientTlsPolicies\x12\xC8\x01\x0A\x12GetClientTlsPolicy\x12:.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest\x1A0.google.cloud.networksecurity.v1.ClientTlsPolicy\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x12\xBF\x02\x0A\x15CreateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC7\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA-parent,client_tls_policy,client_tls_policy_id\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/clientTlsPolicies:\x11client_tls_policy\x12\xC1\x02\x0A\x15UpdateClientTlsPolicy\x12=.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xC9\x01\xCAAD\x0A\x0FClientTlsPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Dclient_tls_policy,update_mask\x82\xD3\xE4\x93\x02\\2G/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}:\x11client_tls_policy\x12\x89\x02\x0A\x15DeleteClientTlsPolicy\x12=.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/clientTlsPolicies/*}\x12\xF6\x01\x0A\x1BListGatewaySecurityPolicies\x12C.google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesRequest\x1AD.google.cloud.networksecurity.v1.ListGatewaySecurityPoliciesResponse\"L\xDAA\x06parent\x82\xD3\xE4\x93\x02=\x12;/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies\x12\xE0\x01\x0A\x18GetGatewaySecurityPolicy\x12@.google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRequest\x1A6.google.cloud.networksecurity.v1.GatewaySecurityPolicy\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=\x12;/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}\x12\xE9\x02\x0A\x1BCreateGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xE5\x01\xCAAJ\x0A\x15GatewaySecurityPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA9parent,gateway_security_policy,gateway_security_policy_id\x82\xD3\xE4\x93\x02V\";/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies:\x17gateway_security_policy\x12\xEB\x02\x0A\x1BUpdateGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xE7\x01\xCAAJ\x0A\x15GatewaySecurityPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA#gateway_security_policy,update_mask\x82\xD3\xE4\x93\x02n2S/v1/{gateway_security_policy.name=projects/*/locations/*/gatewaySecurityPolicies/*}:\x17gateway_security_policy\x12\x9B\x02\x0A\x1BDeleteGatewaySecurityPolicy\x12C.google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x97\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02=*;/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}\x12\x87\x02\x0A\x1EListGatewaySecurityPolicyRules\x12F.google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesRequest\x1AG.google.cloud.networksecurity.v1.ListGatewaySecurityPolicyRulesResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12C/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules\x12\xF4\x01\x0A\x1CGetGatewaySecurityPolicyRule\x12D.google.cloud.networksecurity.v1.GetGatewaySecurityPolicyRuleRequest\x1A:.google.cloud.networksecurity.v1.GatewaySecurityPolicyRule\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12C/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}\x12\x8C\x03\x0A\x1FCreateGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.CreateGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x80\x02\xCAAN\x0A\x19GatewaySecurityPolicyRule\x121google.cloud.networksecurity.v1.OperationMetadata\xDAACparent,gateway_security_policy_rule,gateway_security_policy_rule_id\x82\xD3\xE4\x93\x02c\"C/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules:\x1Cgateway_security_policy_rule\x12\x8F\x03\x0A\x1FUpdateGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.UpdateGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x83\x02\xCAAN\x0A\x19GatewaySecurityPolicyRule\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA(gateway_security_policy_rule,update_mask\x82\xD3\xE4\x93\x02\x80\x012`/v1/{gateway_security_policy_rule.name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}:\x1Cgateway_security_policy_rule\x12\xAB\x02\x0A\x1FDeleteGatewaySecurityPolicyRule\x12G.google.cloud.networksecurity.v1.DeleteGatewaySecurityPolicyRuleRequest\x1A\x1D.google.longrunning.Operation\"\x9F\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02E*C/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}\x12\xBA\x01\x0A\x0CListUrlLists\x124.google.cloud.networksecurity.v1.ListUrlListsRequest\x1A5.google.cloud.networksecurity.v1.ListUrlListsResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/urlLists\x12\xA7\x01\x0A\x0AGetUrlList\x122.google.cloud.networksecurity.v1.GetUrlListRequest\x1A(.google.cloud.networksecurity.v1.UrlList\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/urlLists/*}\x12\x83\x02\x0A\x0DCreateUrlList\x125.google.cloud.networksecurity.v1.CreateUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA<\x0A\x07UrlList\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x1Bparent,url_list,url_list_id\x82\xD3\xE4\x93\x028\",/v1/{parent=projects/*/locations/*}/urlLists:\x08url_list\x12\x85\x02\x0A\x0DUpdateUrlList\x125.google.cloud.networksecurity.v1.UpdateUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x9D\x01\xCAA<\x0A\x07UrlList\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x14url_list,update_mask\x82\xD3\xE4\x93\x02A25/v1/{url_list.name=projects/*/locations/*/urlLists/*}:\x08url_list\x12\xF0\x01\x0A\x0DDeleteUrlList\x125.google.cloud.networksecurity.v1.DeleteUrlListRequest\x1A\x1D.google.longrunning.Operation\"\x88\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/urlLists/*}\x12\xEE\x01\x0A\x19ListTlsInspectionPolicies\x12A.google.cloud.networksecurity.v1.ListTlsInspectionPoliciesRequest\x1AB.google.cloud.networksecurity.v1.ListTlsInspectionPoliciesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies\x12\xD8\x01\x0A\x16GetTlsInspectionPolicy\x12>.google.cloud.networksecurity.v1.GetTlsInspectionPolicyRequest\x1A4.google.cloud.networksecurity.v1.TlsInspectionPolicy\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}\x12\xDB\x02\x0A\x19CreateTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.CreateTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDB\x01\xCAAH\x0A\x13TlsInspectionPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA5parent,tls_inspection_policy,tls_inspection_policy_id\x82\xD3\xE4\x93\x02R\"9/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies:\x15tls_inspection_policy\x12\xDD\x02\x0A\x19UpdateTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.UpdateTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xDD\x01\xCAAH\x0A\x13TlsInspectionPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA!tls_inspection_policy,update_mask\x82\xD3\xE4\x93\x02h2O/v1/{tls_inspection_policy.name=projects/*/locations/*/tlsInspectionPolicies/*}:\x15tls_inspection_policy\x12\x95\x02\x0A\x19DeleteTlsInspectionPolicy\x12A.google.cloud.networksecurity.v1.DeleteTlsInspectionPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x95\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}\x12\xCE\x01\x0A\x11ListAuthzPolicies\x129.google.cloud.networksecurity.v1.ListAuthzPoliciesRequest\x1A:.google.cloud.networksecurity.v1.ListAuthzPoliciesResponse\"B\xDAA\x06parent\x82\xD3\xE4\x93\x023\x121/v1/{parent=projects/*/locations/*}/authzPolicies\x12\xB8\x01\x0A\x0EGetAuthzPolicy\x126.google.cloud.networksecurity.v1.GetAuthzPolicyRequest\x1A,.google.cloud.networksecurity.v1.AuthzPolicy\"@\xDAA\x04name\x82\xD3\xE4\x93\x023\x121/v1/{name=projects/*/locations/*/authzPolicies/*}\x12\xA0\x02\x0A\x11CreateAuthzPolicy\x129.google.cloud.networksecurity.v1.CreateAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xB0\x01\xCAA@\x0A\x0BAuthzPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA#parent,authz_policy,authz_policy_id\x82\xD3\xE4\x93\x02A\"1/v1/{parent=projects/*/locations/*}/authzPolicies:\x0Cauthz_policy\x12\xA2\x02\x0A\x11UpdateAuthzPolicy\x129.google.cloud.networksecurity.v1.UpdateAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\xB2\x01\xCAA@\x0A\x0BAuthzPolicy\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x18authz_policy,update_mask\x82\xD3\xE4\x93\x02N2>/v1/{authz_policy.name=projects/*/locations/*/authzPolicies/*}:\x0Cauthz_policy\x12\xFD\x01\x0A\x11DeleteAuthzPolicy\x129.google.cloud.networksecurity.v1.DeleteAuthzPolicyRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAAJ\x0A\x15google.protobuf.Empty\x121google.cloud.networksecurity.v1.OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x023*1/v1/{name=projects/*/locations/*/authzPolicies/*}\x1AR\xCAA\x1Enetworksecurity.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDF\x01\x0A#com.google.cloud.networksecurity.v1P\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php deleted file mode 100644 index cac87937fa47..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x84\x13\x0A7google/cloud/networksecurity/v1/server_tls_policy.proto\x12\x1Fgoogle.cloud.networksecurity.v1\x1A\x19google/api/resource.proto\x1A)google/cloud/networksecurity/v1/tls.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x87\x08\x0A\x0FServerTlsPolicy\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12L\x0A\x06labels\x18\x05 \x03(\x0B2<.google.cloud.networksecurity.v1.ServerTlsPolicy.LabelsEntry\x12\x12\x0A\x0Aallow_open\x18\x06 \x01(\x08\x12P\x0A\x12server_certificate\x18\x07 \x01(\x0B24.google.cloud.networksecurity.v1.CertificateProvider\x12P\x0A\x0Bmtls_policy\x18\x08 \x01(\x0B2;.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy\x1A\xA5\x03\x0A\x0AMTLSPolicy\x12p\x0A\x16client_validation_mode\x18\x02 \x01(\x0E2P.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode\x12K\x0A\x14client_validation_ca\x18\x01 \x03(\x0B2-.google.cloud.networksecurity.v1.ValidationCA\x12Z\x0A\x1Eclient_validation_trust_config\x18\x04 \x01(\x09B2\xFAA/\x0A-certificatemanager.googleapis.com/TrustConfig\"|\x0A\x14ClientValidationMode\x12&\x0A\"CLIENT_VALIDATION_MODE_UNSPECIFIED\x10\x00\x12(\x0A\$ALLOW_INVALID_OR_MISSING_CLIENT_CERT\x10\x01\x12\x12\x0A\x0EREJECT_INVALID\x10\x02\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x82\x01\xEAA\x7F\x0A.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\"\xA5\x01\x0A\x1CListServerTlsPoliciesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12#\x0A\x16return_partial_success\x18\x04 \x01(\x08B\x03\xE0A\x01\"\x9C\x01\x0A\x1DListServerTlsPoliciesResponse\x12M\x0A\x13server_tls_policies\x18\x01 \x03(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicy\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"a\x0A\x19GetServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicy\"\xDB\x01\x0A\x1CCreateServerTlsPolicyRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.networksecurity.googleapis.com/ServerTlsPolicy\x12!\x0A\x14server_tls_policy_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12P\x0A\x11server_tls_policy\x18\x03 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"\xA6\x01\x0A\x1CUpdateServerTlsPolicyRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12P\x0A\x11server_tls_policy\x18\x02 \x01(\x0B20.google.cloud.networksecurity.v1.ServerTlsPolicyB\x03\xE0A\x02\"d\x0A\x1CDeleteServerTlsPolicyRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.networksecurity.googleapis.com/ServerTlsPolicyB\xF5\x01\x0A#com.google.cloud.networksecurity.v1B\x14ServerTlsPolicyProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php deleted file mode 100644 index d56a0cc953d0..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBD\x06\x0A)google/cloud/networksecurity/v1/tls.proto\x12\x1Fgoogle.cloud.networksecurity.v1\"'\x0A\x0CGrpcEndpoint\x12\x17\x0A\x0Atarget_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\"\xC5\x01\x0A\x0CValidationCA\x12F\x0A\x0Dgrpc_endpoint\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.GrpcEndpointH\x00\x12e\x0A\x1Dcertificate_provider_instance\x18\x03 \x01(\x0B2<.google.cloud.networksecurity.v1.CertificateProviderInstanceH\x00B\x06\x0A\x04type\";\x0A\x1BCertificateProviderInstance\x12\x1C\x0A\x0Fplugin_instance\x18\x01 \x01(\x09B\x03\xE0A\x02\"\xCC\x01\x0A\x13CertificateProvider\x12F\x0A\x0Dgrpc_endpoint\x18\x02 \x01(\x0B2-.google.cloud.networksecurity.v1.GrpcEndpointH\x00\x12e\x0A\x1Dcertificate_provider_instance\x18\x03 \x01(\x0B2<.google.cloud.networksecurity.v1.CertificateProviderInstanceH\x00B\x06\x0A\x04typeB\xE9\x01\x0A#com.google.cloud.networksecurity.v1B\x08TlsProtoP\x01ZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypb\xAA\x02\x1FGoogle.Cloud.NetworkSecurity.V1\xCA\x02\x1FGoogle\\Cloud\\NetworkSecurity\\V1\xEA\x02\"Google::Cloud::NetworkSecurity::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php deleted file mode 100644 index 9162ffb338c6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddAddressGroupItemsRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.networksecurity.v1.AddAddressGroupItemsRequest - */ -class AddAddressGroupItemsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AddressGroup to add items to. Must be in the format - * `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $address_group = ''; - /** - * Required. List of items to add. - * - * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $items; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $addressGroup Required. A name of the AddressGroup to add items to. Must be in the format - * `projects|organization/*/locations/{location}/addressGroups/*`. Please see - * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. - * @param string[] $items Required. List of items to add. - * - * @return \Google\Cloud\NetworkSecurity\V1\AddAddressGroupItemsRequest - * - * @experimental - */ - public static function build(string $addressGroup, array $items): self - { - return (new self()) - ->setAddressGroup($addressGroup) - ->setItems($items); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address_group - * Required. A name of the AddressGroup to add items to. Must be in the format - * `projects|organization/{@*}locations/{location}/addressGroups/*`. - * @type string[] $items - * Required. List of items to add. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AddressGroup to add items to. Must be in the format - * `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAddressGroup() - { - return $this->address_group; - } - - /** - * Required. A name of the AddressGroup to add items to. Must be in the format - * `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAddressGroup($var) - { - GPBUtil::checkString($var, True); - $this->address_group = $var; - - return $this; - } - - /** - * Required. List of items to add. - * - * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Required. List of items to add. - * - * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string[] $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->items = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php deleted file mode 100644 index a0e41db6b705..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup.php +++ /dev/null @@ -1,402 +0,0 @@ -google.cloud.networksecurity.v1.AddressGroup - */ -class AddressGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the AddressGroup resource. It matches pattern - * `projects/{@*}locations/{location}/addressGroups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the AddressGroup resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Optional. List of items. - * - * Generated from protobuf field repeated string items = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $items; - /** - * Required. Capacity of the Address Group - * - * Generated from protobuf field int32 capacity = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $capacity = 0; - /** - * Output only. Server-defined fully-qualified URL for this resource. - * - * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Optional. List of supported purposes of the Address Group. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup.Purpose purpose = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $purpose; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the AddressGroup resource. It matches pattern - * `projects/{@*}locations/{location}/addressGroups/`. - * @type string $description - * Optional. Free-text description of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the AddressGroup resource. - * @type int $type - * Required. The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * @type string[] $items - * Optional. List of items. - * @type int $capacity - * Required. Capacity of the Address Group - * @type string $self_link - * Output only. Server-defined fully-qualified URL for this resource. - * @type int[] $purpose - * Optional. List of supported purposes of the Address Group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the AddressGroup resource. It matches pattern - * `projects/{@*}locations/{location}/addressGroups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the AddressGroup resource. It matches pattern - * `projects/{@*}locations/{location}/addressGroups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; - } - - /** - * Optional. Set of label tags associated with the AddressGroup resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the AddressGroup resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup.Type type = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AddressGroup\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. List of items. - * - * Generated from protobuf field repeated string items = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Optional. List of items. - * - * Generated from protobuf field repeated string items = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->items = $arr; - - return $this; - } - - /** - * Required. Capacity of the Address Group - * - * Generated from protobuf field int32 capacity = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getCapacity() - { - return $this->capacity; - } - - /** - * Required. Capacity of the Address Group - * - * Generated from protobuf field int32 capacity = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setCapacity($var) - { - GPBUtil::checkInt32($var); - $this->capacity = $var; - - return $this; - } - - /** - * Output only. Server-defined fully-qualified URL for this resource. - * - * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined fully-qualified URL for this resource. - * - * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Optional. List of supported purposes of the Address Group. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup.Purpose purpose = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getPurpose() - { - return $this->purpose; - } - - /** - * Optional. List of supported purposes of the Address Group. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup.Purpose purpose = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int[] $var - * @return $this - */ - public function setPurpose($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetworkSecurity\V1\AddressGroup\Purpose::class); - $this->purpose = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php deleted file mode 100644 index b4339487a0a7..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Purpose.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.networksecurity.v1.AddressGroup.Purpose - */ -class Purpose -{ - /** - * Default value. Should never happen. - * - * Generated from protobuf enum PURPOSE_UNSPECIFIED = 0; - */ - const PURPOSE_UNSPECIFIED = 0; - /** - * Address Group is distributed to VMC, and is usable in Firewall Policies - * and other systems that rely on VMC. - * - * Generated from protobuf enum DEFAULT = 1; - */ - const PBDEFAULT = 1; - /** - * Address Group is usable in Cloud Armor. - * - * Generated from protobuf enum CLOUD_ARMOR = 2; - */ - const CLOUD_ARMOR = 2; - - private static $valueToName = [ - self::PURPOSE_UNSPECIFIED => 'PURPOSE_UNSPECIFIED', - self::PBDEFAULT => 'DEFAULT', - self::CLOUD_ARMOR => 'CLOUD_ARMOR', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php deleted file mode 100644 index 4eb2c0feb80a..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AddressGroup/Type.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.networksecurity.v1.AddressGroup.Type - */ -class Type -{ - /** - * Default value. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * IP v4 ranges. - * - * Generated from protobuf enum IPV4 = 1; - */ - const IPV4 = 1; - /** - * IP v6 ranges. - * - * Generated from protobuf enum IPV6 = 2; - */ - const IPV6 = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::IPV4 => 'IPV4', - self::IPV6 => 'IPV6', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php deleted file mode 100644 index d0c6d5e204f1..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php +++ /dev/null @@ -1,322 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy - */ -class AuthorizationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the AuthorizationPolicy - * resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $action = 0; - /** - * Optional. List of rules to match. Note that at least one of the rules must - * match in order for the action specified in the 'action' field to be taken. - * A rule is a match if there is a matching source and destination. If left - * blank, the action specified in the `action` field will be applied on every - * request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * @type string $description - * Optional. Free-text description of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the AuthorizationPolicy - * resource. - * @type int $action - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule[] $rules - * Optional. List of rules to match. Note that at least one of the rules must - * match in order for the action specified in the 'action' field to be taken. - * A rule is a match if there is a matching source and destination. If left - * blank, the action specified in the `action` field will be applied on every - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; - } - - /** - * Optional. Set of label tags associated with the AuthorizationPolicy - * resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the AuthorizationPolicy - * resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Optional. List of rules to match. Note that at least one of the rules must - * match in order for the action specified in the 'action' field to be taken. - * A rule is a match if there is a matching source and destination. If left - * blank, the action specified in the `action` field will be applied on every - * request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule> - */ - public function getRules() - { - return $this->rules; - } - - /** - * Optional. List of rules to match. Note that at least one of the rules must - * match in order for the action specified in the 'action' field to be taken. - * A rule is a match if there is a matching source and destination. If left - * blank, the action specified in the `action` field will be applied on every - * request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule[] $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule::class); - $this->rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php deleted file mode 100644 index 793ae8c9e428..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Action - */ -class Action -{ - /** - * Default value. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Grant access. - * - * Generated from protobuf enum ALLOW = 1; - */ - const ALLOW = 1; - /** - * Deny access. - * Deny rules should be avoided unless they are used to provide a default - * "deny all" fallback. - * - * Generated from protobuf enum DENY = 2; - */ - const DENY = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::ALLOW => 'ALLOW', - self::DENY => 'DENY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php deleted file mode 100644 index d4ff5d81975c..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule - */ -class Rule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of attributes for the traffic source. All of the sources - * must match. A source is a match if both principals and ip_blocks match. - * If not set, the action specified in the 'action' field will be applied - * without any rule checks for the source. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $sources; - /** - * Optional. List of attributes for the traffic destination. All of the - * destinations must match. A destination is a match if a request matches - * all the specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $destinations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source[] $sources - * Optional. List of attributes for the traffic source. All of the sources - * must match. A source is a match if both principals and ip_blocks match. - * If not set, the action specified in the 'action' field will be applied - * without any rule checks for the source. - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination[] $destinations - * Optional. List of attributes for the traffic destination. All of the - * destinations must match. A destination is a match if a request matches - * all the specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. List of attributes for the traffic source. All of the sources - * must match. A source is a match if both principals and ip_blocks match. - * If not set, the action specified in the 'action' field will be applied - * without any rule checks for the source. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source> - */ - public function getSources() - { - return $this->sources; - } - - /** - * Optional. List of attributes for the traffic source. All of the sources - * must match. A source is a match if both principals and ip_blocks match. - * If not set, the action specified in the 'action' field will be applied - * without any rule checks for the source. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source[] $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source::class); - $this->sources = $arr; - - return $this; - } - - /** - * Optional. List of attributes for the traffic destination. All of the - * destinations must match. A destination is a match if a request matches - * all the specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination> - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Optional. List of attributes for the traffic destination. All of the - * destinations must match. A destination is a match if a request matches - * all the specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination[] $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination::class); - $this->destinations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php deleted file mode 100644 index f1cb65a10a06..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination - */ -class Destination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List of host names to match. Matched against the ":authority" - * header in http requests. At least one host should match. Each host can - * be an exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * - * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $hosts; - /** - * Required. List of destination ports to match. At least one port should - * match. - * - * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $ports; - /** - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * - * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $methods; - /** - * Optional. Match against key:value pair in http header. Provides a - * flexible match based on HTTP headers, for potentially advanced use - * cases. At least one header should match. Avoid using header matches to - * make authorization decisions unless there is a strong guarantee that - * requests arrive through a trusted client or proxy. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $http_header_match = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $hosts - * Required. List of host names to match. Matched against the ":authority" - * header in http requests. At least one host should match. Each host can - * be an exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * @type int[] $ports - * Required. List of destination ports to match. At least one port should - * match. - * @type string[] $methods - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $http_header_match - * Optional. Match against key:value pair in http header. Provides a - * flexible match based on HTTP headers, for potentially advanced use - * cases. At least one header should match. Avoid using header matches to - * make authorization decisions unless there is a strong guarantee that - * requests arrive through a trusted client or proxy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. List of host names to match. Matched against the ":authority" - * header in http requests. At least one host should match. Each host can - * be an exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * - * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getHosts() - { - return $this->hosts; - } - - /** - * Required. List of host names to match. Matched against the ":authority" - * header in http requests. At least one host should match. Each host can - * be an exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * - * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string[] $var - * @return $this - */ - public function setHosts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->hosts = $arr; - - return $this; - } - - /** - * Required. List of destination ports to match. At least one port should - * match. - * - * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getPorts() - { - return $this->ports; - } - - /** - * Required. List of destination ports to match. At least one port should - * match. - * - * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int[] $var - * @return $this - */ - public function setPorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); - $this->ports = $arr; - - return $this; - } - - /** - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * - * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getMethods() - { - return $this->methods; - } - - /** - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * - * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setMethods($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->methods = $arr; - - return $this; - } - - /** - * Optional. Match against key:value pair in http header. Provides a - * flexible match based on HTTP headers, for potentially advanced use - * cases. At least one header should match. Avoid using header matches to - * make authorization decisions unless there is a strong guarantee that - * requests arrive through a trusted client or proxy. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch|null - */ - public function getHttpHeaderMatch() - { - return $this->http_header_match; - } - - public function hasHttpHeaderMatch() - { - return isset($this->http_header_match); - } - - public function clearHttpHeaderMatch() - { - unset($this->http_header_match); - } - - /** - * Optional. Match against key:value pair in http header. Provides a - * flexible match based on HTTP headers, for potentially advanced use - * cases. At least one header should match. Avoid using header matches to - * make authorization decisions unless there is a strong guarantee that - * requests arrive through a trusted client or proxy. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $var - * @return $this - */ - public function setHttpHeaderMatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch::class); - $this->http_header_match = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php deleted file mode 100644 index d2ec186a7ff1..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - */ -class HttpHeaderMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * - * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $header_name = ''; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $regex_match - * Required. The value of the header must match the regular expression - * specified in regexMatch. For regular expression grammar, - * please see: en.cppreference.com/w/cpp/regex/ecmascript - * For matching against a port specified in the HTTP - * request, use a headerMatch with headerName set to Host - * and a regular expression that satisfies the RFC2616 Host - * header's port specifier. - * @type string $header_name - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The value of the header must match the regular expression - * specified in regexMatch. For regular expression grammar, - * please see: en.cppreference.com/w/cpp/regex/ecmascript - * For matching against a port specified in the HTTP - * request, use a headerMatch with headerName set to Host - * and a regular expression that satisfies the RFC2616 Host - * header's port specifier. - * - * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegexMatch() - { - return $this->readOneof(2); - } - - public function hasRegexMatch() - { - return $this->hasOneof(2); - } - - /** - * Required. The value of the header must match the regular expression - * specified in regexMatch. For regular expression grammar, - * please see: en.cppreference.com/w/cpp/regex/ecmascript - * For matching against a port specified in the HTTP - * request, use a headerMatch with headerName set to Host - * and a regular expression that satisfies the RFC2616 Host - * header's port specifier. - * - * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegexMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * - * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHeaderName() - { - return $this->header_name; - } - - /** - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * - * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHeaderName($var) - { - GPBUtil::checkString($var, True); - $this->header_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php deleted file mode 100644 index 5509049c7899..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of peer identities to match for authorization. At least - * one principal should match. Each peer can be an exact match, or a - * prefix match (example, "namespace/*") or a suffix match (example, - * "{@*}service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * - * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $principals; - /** - * Optional. List of CIDR ranges to match based on source IP address. At - * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR - * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP - * alone should be avoided. The IP addresses of any load balancers or - * proxies should be considered untrusted. - * - * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $ip_blocks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $principals - * Optional. List of peer identities to match for authorization. At least - * one principal should match. Each peer can be an exact match, or a - * prefix match (example, "namespace/*") or a suffix match (example, - * "{@*}service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * @type string[] $ip_blocks - * Optional. List of CIDR ranges to match based on source IP address. At - * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR - * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP - * alone should be avoided. The IP addresses of any load balancers or - * proxies should be considered untrusted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. List of peer identities to match for authorization. At least - * one principal should match. Each peer can be an exact match, or a - * prefix match (example, "namespace/*") or a suffix match (example, - * "{@*}service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * - * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getPrincipals() - { - return $this->principals; - } - - /** - * Optional. List of peer identities to match for authorization. At least - * one principal should match. Each peer can be an exact match, or a - * prefix match (example, "namespace/*") or a suffix match (example, - * "{@*}service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * - * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setPrincipals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->principals = $arr; - - return $this; - } - - /** - * Optional. List of CIDR ranges to match based on source IP address. At - * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR - * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP - * alone should be avoided. The IP addresses of any load balancers or - * proxies should be considered untrusted. - * - * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getIpBlocks() - { - return $this->ip_blocks; - } - - /** - * Optional. List of CIDR ranges to match based on source IP address. At - * least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR - * (e.g., "1.2.3.0/24") are supported. Authorization based on source IP - * alone should be avoided. The IP addresses of any load balancers or - * proxies should be considered untrusted. - * - * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setIpBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_blocks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php deleted file mode 100644 index 807a91f45d79..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.networksecurity.v1.CertificateProvider - */ -class CertificateProvider extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint - * gRPC specific configuration to access the gRPC server to - * obtain the cert and private key. - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the cert and private key. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null - */ - public function getGrpcEndpoint() - { - return $this->readOneof(2); - } - - public function hasGrpcEndpoint() - { - return $this->hasOneof(2); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the cert and private key. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var - * @return $this - */ - public function setGrpcEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null - */ - public function getCertificateProviderInstance() - { - return $this->readOneof(3); - } - - public function hasCertificateProviderInstance() - { - return $this->hasOneof(3); - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var - * @return $this - */ - public function setCertificateProviderInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php deleted file mode 100644 index 488fad2f1a92..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networksecurity.v1.CertificateProviderInstance - */ -class CertificateProviderInstance extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Plugin instance name, used to locate and load CertificateProvider - * instance configuration. Set to "google_cloud_private_spiffe" to use - * Certificate Authority Service certificate provider instance. - * - * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $plugin_instance = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plugin_instance - * Required. Plugin instance name, used to locate and load CertificateProvider - * instance configuration. Set to "google_cloud_private_spiffe" to use - * Certificate Authority Service certificate provider instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * Required. Plugin instance name, used to locate and load CertificateProvider - * instance configuration. Set to "google_cloud_private_spiffe" to use - * Certificate Authority Service certificate provider instance. - * - * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPluginInstance() - { - return $this->plugin_instance; - } - - /** - * Required. Plugin instance name, used to locate and load CertificateProvider - * instance configuration. Set to "google_cloud_private_spiffe" to use - * Certificate Authority Service certificate provider instance. - * - * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPluginInstance($var) - { - GPBUtil::checkString($var, True); - $this->plugin_instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php deleted file mode 100644 index 9560803735cf..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php +++ /dev/null @@ -1,361 +0,0 @@ -google.cloud.networksecurity.v1.ClientTlsPolicy - */ -class ClientTlsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * - * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sni = ''; - /** - * Optional. Defines a mechanism to provision client identity (public and - * private keys) for peer to peer authentication. The presence of this - * dictates mTLS. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client_certificate = null; - /** - * Optional. Defines the mechanism to obtain the Certificate Authority - * certificate to validate the server certificate. If empty, client does not - * validate the server certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $server_validation_ca; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * @type string $description - * Optional. Free-text description of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the resource. - * @type string $sni - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $client_certificate - * Optional. Defines a mechanism to provision client identity (public and - * private keys) for peer to peer authentication. The presence of this - * dictates mTLS. - * @type \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $server_validation_ca - * Optional. Defines the mechanism to obtain the Certificate Authority - * certificate to validate the server certificate. If empty, client does not - * validate the server certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.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 timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; - } - - /** - * Optional. Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * - * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSni() - { - return $this->sni; - } - - /** - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * - * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSni($var) - { - GPBUtil::checkString($var, True); - $this->sni = $var; - - return $this; - } - - /** - * Optional. Defines a mechanism to provision client identity (public and - * private keys) for peer to peer authentication. The presence of this - * dictates mTLS. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null - */ - public function getClientCertificate() - { - return $this->client_certificate; - } - - public function hasClientCertificate() - { - return isset($this->client_certificate); - } - - public function clearClientCertificate() - { - unset($this->client_certificate); - } - - /** - * Optional. Defines a mechanism to provision client identity (public and - * private keys) for peer to peer authentication. The presence of this - * dictates mTLS. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var - * @return $this - */ - public function setClientCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); - $this->client_certificate = $var; - - return $this; - } - - /** - * Optional. Defines the mechanism to obtain the Certificate Authority - * certificate to validate the server certificate. If empty, client does not - * validate the server certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ValidationCA> - */ - public function getServerValidationCa() - { - return $this->server_validation_ca; - } - - /** - * Optional. Defines the mechanism to obtain the Certificate Authority - * certificate to validate the server certificate. If empty, client does not - * validate the server certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $var - * @return $this - */ - public function setServerValidationCa($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); - $this->server_validation_ca = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php deleted file mode 100644 index 1fadab6729af..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CloneAddressGroupItemsRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.networksecurity.v1.CloneAddressGroupItemsRequest - */ -class CloneAddressGroupItemsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $address_group = ''; - /** - * Required. Source address group to clone items from. - * - * Generated from protobuf field string source_address_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source_address_group = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $addressGroup Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/*/locations/{location}/addressGroups/*`. Please see - * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. - * @param string $sourceAddressGroup Required. Source address group to clone items from. Please see - * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\CloneAddressGroupItemsRequest - * - * @experimental - */ - public static function build(string $addressGroup, string $sourceAddressGroup): self - { - return (new self()) - ->setAddressGroup($addressGroup) - ->setSourceAddressGroup($sourceAddressGroup); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address_group - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * @type string $source_address_group - * Required. Source address group to clone items from. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAddressGroup() - { - return $this->address_group; - } - - /** - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAddressGroup($var) - { - GPBUtil::checkString($var, True); - $this->address_group = $var; - - return $this; - } - - /** - * Required. Source address group to clone items from. - * - * Generated from protobuf field string source_address_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSourceAddressGroup() - { - return $this->source_address_group; - } - - /** - * Required. Source address group to clone items from. - * - * Generated from protobuf field string source_address_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceAddressGroup($var) - { - GPBUtil::checkString($var, True); - $this->source_address_group = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php deleted file mode 100644 index 4a0948a915fe..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAddressGroupRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.networksecurity.v1.CreateAddressGroupRequest - */ -class CreateAddressGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the AddressGroup. Must be in the - * format `projects/{@*}locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the AddressGroup resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string address_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $address_group_id = ''; - /** - * Required. AddressGroup resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $address_group = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource of the AddressGroup. Must be in the - * format `projects/*/locations/{location}`. Please see - * {@see AddressGroupServiceClient::organizationLocationName()} for help formatting this field. - * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup Required. AddressGroup resource to be created. - * @param string $addressGroupId Required. Short name of the AddressGroup resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * @return \Google\Cloud\NetworkSecurity\V1\CreateAddressGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup, string $addressGroupId): self - { - return (new self()) - ->setParent($parent) - ->setAddressGroup($addressGroup) - ->setAddressGroupId($addressGroupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the AddressGroup. Must be in the - * format `projects/{@*}locations/{location}`. - * @type string $address_group_id - * Required. Short name of the AddressGroup resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * @type \Google\Cloud\NetworkSecurity\V1\AddressGroup $address_group - * Required. AddressGroup resource to be created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the AddressGroup. Must be in the - * format `projects/{@*}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 parent resource of the AddressGroup. Must be in the - * format `projects/{@*}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. Short name of the AddressGroup resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string address_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAddressGroupId() - { - return $this->address_group_id; - } - - /** - * Required. Short name of the AddressGroup resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string address_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAddressGroupId($var) - { - GPBUtil::checkString($var, True); - $this->address_group_id = $var; - - return $this; - } - - /** - * Required. AddressGroup resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\AddressGroup|null - */ - public function getAddressGroup() - { - return $this->address_group; - } - - public function hasAddressGroup() - { - return isset($this->address_group); - } - - public function clearAddressGroup() - { - unset($this->address_group); - } - - /** - * Required. AddressGroup resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $var - * @return $this - */ - public function setAddressGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AddressGroup::class); - $this->address_group = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php deleted file mode 100644 index f86009019760..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest - */ -class CreateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization_policy_id = ''; - /** - * Required. AuthorizationPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization_policy = null; - - /** - * @param string $parent Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. AuthorizationPolicy resource to be created. - * @param string $authorizationPolicyId Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * @return \Google\Cloud\NetworkSecurity\V1\CreateAuthorizationPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, string $authorizationPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setAuthorizationPolicy($authorizationPolicy) - ->setAuthorizationPolicyId($authorizationPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. - * @type string $authorization_policy_id - * Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy - * Required. AuthorizationPolicy resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `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 parent resource of the AuthorizationPolicy. Must be in the - * format `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. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAuthorizationPolicyId() - { - return $this->authorization_policy_id; - } - - /** - * Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAuthorizationPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->authorization_policy_id = $var; - - return $this; - } - - /** - * Required. AuthorizationPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null - */ - public function getAuthorizationPolicy() - { - return $this->authorization_policy; - } - - public function hasAuthorizationPolicy() - { - return isset($this->authorization_policy); - } - - public function clearAuthorizationPolicy() - { - unset($this->authorization_policy); - } - - /** - * Required. AuthorizationPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var - * @return $this - */ - public function setAuthorizationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); - $this->authorization_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php deleted file mode 100644 index 8a00e8de7116..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest - */ -class CreateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/{@*}locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the ClientTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "client_mtls_policy". - * - * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_tls_policy_id = ''; - /** - * Required. ClientTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_tls_policy = null; - - /** - * @param string $parent Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. ClientTlsPolicy resource to be created. - * @param string $clientTlsPolicyId Required. Short name of the ClientTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "client_mtls_policy". - * - * @return \Google\Cloud\NetworkSecurity\V1\CreateClientTlsPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, string $clientTlsPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setClientTlsPolicy($clientTlsPolicy) - ->setClientTlsPolicyId($clientTlsPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/{@*}locations/{location}`. - * @type string $client_tls_policy_id - * Required. Short name of the ClientTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "client_mtls_policy". - * @type \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy - * Required. ClientTlsPolicy resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/{@*}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 parent resource of the ClientTlsPolicy. Must be in - * the format `projects/{@*}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. Short name of the ClientTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "client_mtls_policy". - * - * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClientTlsPolicyId() - { - return $this->client_tls_policy_id; - } - - /** - * Required. Short name of the ClientTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "client_mtls_policy". - * - * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClientTlsPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->client_tls_policy_id = $var; - - return $this; - } - - /** - * Required. ClientTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null - */ - public function getClientTlsPolicy() - { - return $this->client_tls_policy; - } - - public function hasClientTlsPolicy() - { - return isset($this->client_tls_policy); - } - - public function clearClientTlsPolicy() - { - unset($this->client_tls_policy); - } - - /** - * Required. ClientTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var - * @return $this - */ - public function setClientTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); - $this->client_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php deleted file mode 100644 index bee5acb2ba61..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest - */ -class CreateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/{@*}locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the ServerTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "server_mtls_policy". - * - * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $server_tls_policy_id = ''; - /** - * Required. ServerTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $server_tls_policy = null; - - /** - * @param string $parent Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. ServerTlsPolicy resource to be created. - * @param string $serverTlsPolicyId Required. Short name of the ServerTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "server_mtls_policy". - * - * @return \Google\Cloud\NetworkSecurity\V1\CreateServerTlsPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, string $serverTlsPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setServerTlsPolicy($serverTlsPolicy) - ->setServerTlsPolicyId($serverTlsPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/{@*}locations/{location}`. - * @type string $server_tls_policy_id - * Required. Short name of the ServerTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "server_mtls_policy". - * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy - * Required. ServerTlsPolicy resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/{@*}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 parent resource of the ServerTlsPolicy. Must be in - * the format `projects/{@*}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. Short name of the ServerTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "server_mtls_policy". - * - * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getServerTlsPolicyId() - { - return $this->server_tls_policy_id; - } - - /** - * Required. Short name of the ServerTlsPolicy resource to be created. This - * value should be 1-63 characters long, containing only letters, numbers, - * hyphens, and underscores, and should not start with a number. E.g. - * "server_mtls_policy". - * - * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setServerTlsPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->server_tls_policy_id = $var; - - return $this; - } - - /** - * Required. ServerTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null - */ - public function getServerTlsPolicy() - { - return $this->server_tls_policy; - } - - public function hasServerTlsPolicy() - { - return isset($this->server_tls_policy); - } - - public function clearServerTlsPolicy() - { - unset($this->server_tls_policy); - } - - /** - * Required. ServerTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var - * @return $this - */ - public function setServerTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); - $this->server_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php deleted file mode 100644 index b66da99720b6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAddressGroupRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.networksecurity.v1.DeleteAddressGroupRequest - */ -class DeleteAddressGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AddressGroup to delete. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. A name of the AddressGroup to delete. Must be in the format - * `projects/*/locations/{location}/addressGroups/*`. Please see - * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\DeleteAddressGroupRequest - * - * @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. A name of the AddressGroup to delete. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AddressGroup to delete. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * - * 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. A name of the AddressGroup to delete. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php deleted file mode 100644 index 06679bb78539..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest - */ -class DeleteAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the - * format `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the AuthorizationPolicy to delete. Must be in the - * format `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see - * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\DeleteAuthorizationPolicyRequest - * - * @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. A name of the AuthorizationPolicy to delete. Must be in the - * format `projects/{project}/locations/{location}/authorizationPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the - * format `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * 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. A name of the AuthorizationPolicy to delete. Must be in the - * format `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php deleted file mode 100644 index 68a17745138e..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest - */ -class DeleteClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/clientTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\DeleteClientTlsPolicyRequest - * - * @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. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * - * 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. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php deleted file mode 100644 index c9472fa2ccbc..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest - */ -class DeleteServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/serverTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\DeleteServerTlsPolicyRequest - * - * @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. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * - * 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. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php deleted file mode 100644 index 141f092a49de..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAddressGroupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.GetAddressGroupRequest - */ -class GetAddressGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AddressGroup to get. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the AddressGroup to get. Must be in the format - * `projects/*/locations/{location}/addressGroups/*`. Please see - * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\GetAddressGroupRequest - * - * @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. A name of the AddressGroup to get. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AddressGroup to get. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * - * 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. A name of the AddressGroup to get. Must be in the format - * `projects/{@*}locations/{location}/addressGroups/*`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php deleted file mode 100644 index d09e0ee421b4..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest - */ -class GetAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see - * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\GetAuthorizationPolicyRequest - * - * @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. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * 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. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php deleted file mode 100644 index b4685c0f7f1d..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.GetClientTlsPolicyRequest - */ -class GetClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/clientTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\GetClientTlsPolicyRequest - * - * @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. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * - * 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. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/clientTlsPolicies/*`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php deleted file mode 100644 index 0cde29f416e8..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.GetServerTlsPolicyRequest - */ -class GetServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/serverTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\GetServerTlsPolicyRequest - * - * @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. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * - * 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. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/{@*}locations/{location}/serverTlsPolicies/*`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php deleted file mode 100644 index eeacff27c860..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networksecurity.v1.GrpcEndpoint - */ -class GrpcEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, - * and should start with "unix:". - * - * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $target_uri - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, - * and should start with "unix:". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, - * and should start with "unix:". - * - * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetUri() - { - return $this->target_uri; - } - - /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, - * and should start with "unix:". - * - * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetUri($var) - { - GPBUtil::checkString($var, True); - $this->target_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php deleted file mode 100644 index 1ea476f00d45..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.networksecurity.v1.ListAddressGroupReferencesRequest - */ -class ListAddressGroupReferencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $address_group = ''; - /** - * The maximum number of references to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] - * to determine if there are more AddressGroupUsers left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $addressGroup Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/*/locations/{location}/addressGroups/*`. Please see - * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesRequest - * - * @experimental - */ - public static function build(string $addressGroup): self - { - return (new self()) - ->setAddressGroup($addressGroup); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address_group - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * @type int $page_size - * The maximum number of references to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] - * to determine if there are more AddressGroupUsers left to be queried. - * @type string $page_token - * The next_page_token value returned from a previous List request, - * if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAddressGroup() - { - return $this->address_group; - } - - /** - * Required. A name of the AddressGroup to clone items to. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAddressGroup($var) - { - GPBUtil::checkString($var, True); - $this->address_group = $var; - - return $this; - } - - /** - * The maximum number of references to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] - * to determine if there are more AddressGroupUsers left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of references to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.next_page_token] - * to determine if there are more AddressGroupUsers left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php deleted file mode 100644 index a1666bdd069e..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse - */ -class ListAddressGroupReferencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of references that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference address_group_references = 1; - */ - private $address_group_references; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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 \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference[] $address_group_references - * A list of references that matches the specified filter in the request. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * A list of references that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference address_group_references = 1; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference> - */ - public function getAddressGroupReferences() - { - return $this->address_group_references; - } - - /** - * A list of references that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference address_group_references = 1; - * @param \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference[] $var - * @return $this - */ - public function setAddressGroupReferences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse\AddressGroupReference::class); - $this->address_group_references = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php deleted file mode 100644 index f3e7345a2e1d..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupReferencesResponse/AddressGroupReference.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networksecurity.v1.ListAddressGroupReferencesResponse.AddressGroupReference - */ -class AddressGroupReference extends \Google\Protobuf\Internal\Message -{ - /** - * FirewallPolicy that is using the Address Group. - * - * Generated from protobuf field string firewall_policy = 1; - */ - protected $firewall_policy = ''; - /** - * Cloud Armor SecurityPolicy that is using the Address Group. - * - * Generated from protobuf field string security_policy = 4; - */ - protected $security_policy = ''; - /** - * Rule priority of the FirewallPolicy that is using the Address Group. - * - * Generated from protobuf field int32 rule_priority = 2; - */ - protected $rule_priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $firewall_policy - * FirewallPolicy that is using the Address Group. - * @type string $security_policy - * Cloud Armor SecurityPolicy that is using the Address Group. - * @type int $rule_priority - * Rule priority of the FirewallPolicy that is using the Address Group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * FirewallPolicy that is using the Address Group. - * - * Generated from protobuf field string firewall_policy = 1; - * @return string - */ - public function getFirewallPolicy() - { - return $this->firewall_policy; - } - - /** - * FirewallPolicy that is using the Address Group. - * - * Generated from protobuf field string firewall_policy = 1; - * @param string $var - * @return $this - */ - public function setFirewallPolicy($var) - { - GPBUtil::checkString($var, True); - $this->firewall_policy = $var; - - return $this; - } - - /** - * Cloud Armor SecurityPolicy that is using the Address Group. - * - * Generated from protobuf field string security_policy = 4; - * @return string - */ - public function getSecurityPolicy() - { - return $this->security_policy; - } - - /** - * Cloud Armor SecurityPolicy that is using the Address Group. - * - * Generated from protobuf field string security_policy = 4; - * @param string $var - * @return $this - */ - public function setSecurityPolicy($var) - { - GPBUtil::checkString($var, True); - $this->security_policy = $var; - - return $this; - } - - /** - * Rule priority of the FirewallPolicy that is using the Address Group. - * - * Generated from protobuf field int32 rule_priority = 2; - * @return int - */ - public function getRulePriority() - { - return $this->rule_priority; - } - - /** - * Rule priority of the FirewallPolicy that is using the Address Group. - * - * Generated from protobuf field int32 rule_priority = 2; - * @param int $var - * @return $this - */ - public function setRulePriority($var) - { - GPBUtil::checkInt32($var); - $this->rule_priority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php deleted file mode 100644 index f4ed9cdb6f85..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.networksecurity.v1.ListAddressGroupsRequest - */ -class ListAddressGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the AddressGroups - * should be listed, specified in the format - * `projects/{@*}locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of AddressGroups to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last - * `ListAddressGroupsResponse` Indicates that this is a - * continuation of a prior `ListAddressGroups` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. If true, allow partial responses for multi-regional Aggregated - * List requests. - * - * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $return_partial_success = false; - - /** - * @param string $parent Required. The project and location from which the AddressGroups - * should be listed, specified in the format - * `projects/*/locations/{location}`. Please see - * {@see AddressGroupServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListAddressGroupsRequest - * - * @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 project and location from which the AddressGroups - * should be listed, specified in the format - * `projects/{@*}locations/{location}`. - * @type int $page_size - * Maximum number of AddressGroups to return per call. - * @type string $page_token - * The value returned by the last - * `ListAddressGroupsResponse` Indicates that this is a - * continuation of a prior `ListAddressGroups` call, and - * that the system should return the next page of data. - * @type bool $return_partial_success - * Optional. If true, allow partial responses for multi-regional Aggregated - * List requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the AddressGroups - * should be listed, specified in the format - * `projects/{@*}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 project and location from which the AddressGroups - * should be listed, specified in the format - * `projects/{@*}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; - } - - /** - * Maximum number of AddressGroups to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of AddressGroups to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last - * `ListAddressGroupsResponse` Indicates that this is a - * continuation of a prior `ListAddressGroups` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last - * `ListAddressGroupsResponse` Indicates that this is a - * continuation of a prior `ListAddressGroups` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. If true, allow partial responses for multi-regional Aggregated - * List requests. - * - * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getReturnPartialSuccess() - { - return $this->return_partial_success; - } - - /** - * Optional. If true, allow partial responses for multi-regional Aggregated - * List requests. - * - * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setReturnPartialSuccess($var) - { - GPBUtil::checkBool($var); - $this->return_partial_success = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php deleted file mode 100644 index b5a932bffe95..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAddressGroupsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.networksecurity.v1.ListAddressGroupsResponse - */ -class ListAddressGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of AddressGroups resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup address_groups = 1; - */ - private $address_groups; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkSecurity\V1\AddressGroup[] $address_groups - * List of AddressGroups resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * List of AddressGroups resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup address_groups = 1; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AddressGroup> - */ - public function getAddressGroups() - { - return $this->address_groups; - } - - /** - * List of AddressGroups resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AddressGroup address_groups = 1; - * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup[] $var - * @return $this - */ - public function setAddressGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AddressGroup::class); - $this->address_groups = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php deleted file mode 100644 index 767ab1e44205..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest - */ -class ListAuthorizationPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of AuthorizationPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesRequest - * - * @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 project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. - * @type int $page_size - * Maximum number of AuthorizationPolicies to return per call. - * @type string $page_token - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `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 project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `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; - } - - /** - * Maximum number of AuthorizationPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of AuthorizationPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php deleted file mode 100644 index fa24257259ff..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse - */ -class ListAuthorizationPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of AuthorizationPolicies resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; - */ - private $authorization_policies; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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 \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy[] $authorization_policies - * List of AuthorizationPolicies resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of AuthorizationPolicies resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy> - */ - public function getAuthorizationPolicies() - { - return $this->authorization_policies; - } - - /** - * List of AuthorizationPolicies resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy[] $var - * @return $this - */ - public function setAuthorizationPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); - $this->authorization_policies = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php deleted file mode 100644 index 44312beff82a..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest - */ -class ListClientTlsPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/{@*}locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of ClientTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesRequest - * - * @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 project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/{@*}locations/{location}`. - * @type int $page_size - * Maximum number of ClientTlsPolicies to return per call. - * @type string $page_token - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/{@*}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 project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/{@*}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; - } - - /** - * Maximum number of ClientTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of ClientTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php deleted file mode 100644 index 759f3ba73cfa..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse - */ -class ListClientTlsPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of ClientTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; - */ - private $client_tls_policies; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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 \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy[] $client_tls_policies - * List of ClientTlsPolicy resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of ClientTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy> - */ - public function getClientTlsPolicies() - { - return $this->client_tls_policies; - } - - /** - * List of ClientTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy[] $var - * @return $this - */ - public function setClientTlsPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); - $this->client_tls_policies = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php deleted file mode 100644 index 63dd0b8cfe3b..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest - */ -class ListServerTlsPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/{@*}locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of ServerTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. Setting this field to `true` will opt the request into returning - * the resources that are reachable, and into including the names of those - * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] - * field. This can only be `true` when reading across collections e.g. when - * `parent` is set to `"projects/example/locations/-"`. - * - * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $return_partial_success = false; - - /** - * @param string $parent Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesRequest - * - * @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 project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/{@*}locations/{location}`. - * @type int $page_size - * Maximum number of ServerTlsPolicies to return per call. - * @type string $page_token - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * @type bool $return_partial_success - * Optional. Setting this field to `true` will opt the request into returning - * the resources that are reachable, and into including the names of those - * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] - * field. This can only be `true` when reading across collections e.g. when - * `parent` is set to `"projects/example/locations/-"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/{@*}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 project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/{@*}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; - } - - /** - * Maximum number of ServerTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of ServerTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Setting this field to `true` will opt the request into returning - * the resources that are reachable, and into including the names of those - * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] - * field. This can only be `true` when reading across collections e.g. when - * `parent` is set to `"projects/example/locations/-"`. - * - * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getReturnPartialSuccess() - { - return $this->return_partial_success; - } - - /** - * Optional. Setting this field to `true` will opt the request into returning - * the resources that are reachable, and into including the names of those - * that were unreachable in the [ListServerTlsPoliciesResponse.unreachable] - * field. This can only be `true` when reading across collections e.g. when - * `parent` is set to `"projects/example/locations/-"`. - * - * Generated from protobuf field bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setReturnPartialSuccess($var) - { - GPBUtil::checkBool($var); - $this->return_partial_success = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php deleted file mode 100644 index 715750ede395..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse - */ -class ListServerTlsPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of ServerTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; - */ - private $server_tls_policies; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources. Populated when the request opts into - * `return_partial_success` and reading across collections e.g. when - * attempting to list all resources across all supported locations. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy[] $server_tls_policies - * List of ServerTlsPolicy resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type string[] $unreachable - * Unreachable resources. Populated when the request opts into - * `return_partial_success` and reading across collections e.g. when - * attempting to list all resources across all supported locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of ServerTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy> - */ - public function getServerTlsPolicies() - { - return $this->server_tls_policies; - } - - /** - * List of ServerTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy[] $var - * @return $this - */ - public function setServerTlsPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); - $this->server_tls_policies = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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; - } - - /** - * Unreachable resources. Populated when the request opts into - * `return_partial_success` and reading across collections e.g. when - * attempting to list all resources across all supported locations. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources. Populated when the request opts into - * `return_partial_success` and reading across collections e.g. when - * attempting to list all resources across all supported locations. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php deleted file mode 100644 index 79fda59f7239..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.networksecurity.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php deleted file mode 100644 index 5cf747f2b0ad..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/RemoveAddressGroupItemsRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.networksecurity.v1.RemoveAddressGroupItemsRequest - */ -class RemoveAddressGroupItemsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AddressGroup to remove items from. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $address_group = ''; - /** - * Required. List of items to remove. - * - * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $items; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $addressGroup Required. A name of the AddressGroup to remove items from. Must be in the - * format `projects|organization/*/locations/{location}/addressGroups/*`. Please see - * {@see AddressGroupServiceClient::addressGroupName()} for help formatting this field. - * @param string[] $items Required. List of items to remove. - * - * @return \Google\Cloud\NetworkSecurity\V1\RemoveAddressGroupItemsRequest - * - * @experimental - */ - public static function build(string $addressGroup, array $items): self - { - return (new self()) - ->setAddressGroup($addressGroup) - ->setItems($items); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address_group - * Required. A name of the AddressGroup to remove items from. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * @type string[] $items - * Required. List of items to remove. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AddressGroup to remove items from. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAddressGroup() - { - return $this->address_group; - } - - /** - * Required. A name of the AddressGroup to remove items from. Must be in the - * format `projects|organization/{@*}locations/{location}/addressGroups/*`. - * - * Generated from protobuf field string address_group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAddressGroup($var) - { - GPBUtil::checkString($var, True); - $this->address_group = $var; - - return $this; - } - - /** - * Required. List of items to remove. - * - * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Required. List of items to remove. - * - * Generated from protobuf field repeated string items = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string[] $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->items = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php deleted file mode 100644 index 86356418b237..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.networksecurity.v1.ServerTlsPolicy - */ -class ServerTlsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Free-text description of the resource. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * This field applies only for Traffic Director policies. It is must be set to - * false for Application Load Balancer policies. - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * - * Generated from protobuf field bool allow_open = 6; - */ - protected $allow_open = false; - /** - * Optional if policy is to be used with Traffic Director. For Application - * Load Balancers must be empty. - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; - */ - protected $server_certificate = null; - /** - * This field is required if the policy is used with Application Load - * Balancers. This field can be empty for Traffic Director. - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; - */ - protected $mtls_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` - * @type string $description - * Free-text description of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of label tags associated with the resource. - * @type bool $allow_open - * This field applies only for Traffic Director policies. It is must be set to - * false for Application Load Balancer policies. - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $server_certificate - * Optional if policy is to be used with Traffic Director. For Application - * Load Balancers must be empty. - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $mtls_policy - * This field is required if the policy is used with Application Load - * Balancers. This field can be empty for Traffic Director. - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/{@*}locations/{location}/serverTlsPolicies/{server_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Free-text description of the resource. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Free-text description of the resource. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was 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 timestamp when the resource was 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; - } - - /** - * Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * This field applies only for Traffic Director policies. It is must be set to - * false for Application Load Balancer policies. - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * - * Generated from protobuf field bool allow_open = 6; - * @return bool - */ - public function getAllowOpen() - { - return $this->allow_open; - } - - /** - * This field applies only for Traffic Director policies. It is must be set to - * false for Application Load Balancer policies. - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * - * Generated from protobuf field bool allow_open = 6; - * @param bool $var - * @return $this - */ - public function setAllowOpen($var) - { - GPBUtil::checkBool($var); - $this->allow_open = $var; - - return $this; - } - - /** - * Optional if policy is to be used with Traffic Director. For Application - * Load Balancers must be empty. - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null - */ - public function getServerCertificate() - { - return $this->server_certificate; - } - - public function hasServerCertificate() - { - return isset($this->server_certificate); - } - - public function clearServerCertificate() - { - unset($this->server_certificate); - } - - /** - * Optional if policy is to be used with Traffic Director. For Application - * Load Balancers must be empty. - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var - * @return $this - */ - public function setServerCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); - $this->server_certificate = $var; - - return $this; - } - - /** - * This field is required if the policy is used with Application Load - * Balancers. This field can be empty for Traffic Director. - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; - * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy|null - */ - public function getMtlsPolicy() - { - return $this->mtls_policy; - } - - public function hasMtlsPolicy() - { - return isset($this->mtls_policy); - } - - public function clearMtlsPolicy() - { - unset($this->mtls_policy); - } - - /** - * This field is required if the policy is used with Application Load - * Balancers. This field can be empty for Traffic Director. - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $var - * @return $this - */ - public function setMtlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy::class); - $this->mtls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php deleted file mode 100644 index cd12e01e6eff..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy - */ -class MTLSPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * When the client presents an invalid certificate or no certificate to the - * load balancer, the `client_validation_mode` specifies how the client - * connection is handled. - * Required if the policy is to be used with the Application Load - * Balancers. For Traffic Director it must be empty. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; - */ - protected $client_validation_mode = 0; - /** - * Required if the policy is to be used with Traffic Director. For - * Application Load Balancers it must be empty. - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; - */ - private $client_validation_ca; - /** - * Reference to the TrustConfig from certificatemanager.googleapis.com - * namespace. - * If specified, the chain validation will be performed against certificates - * configured in the given TrustConfig. - * Allowed only if the policy is to be used with Application Load - * Balancers. - * - * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { - */ - protected $client_validation_trust_config = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $client_validation_mode - * When the client presents an invalid certificate or no certificate to the - * load balancer, the `client_validation_mode` specifies how the client - * connection is handled. - * Required if the policy is to be used with the Application Load - * Balancers. For Traffic Director it must be empty. - * @type \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $client_validation_ca - * Required if the policy is to be used with Traffic Director. For - * Application Load Balancers it must be empty. - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * @type string $client_validation_trust_config - * Reference to the TrustConfig from certificatemanager.googleapis.com - * namespace. - * If specified, the chain validation will be performed against certificates - * configured in the given TrustConfig. - * Allowed only if the policy is to be used with Application Load - * Balancers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * When the client presents an invalid certificate or no certificate to the - * load balancer, the `client_validation_mode` specifies how the client - * connection is handled. - * Required if the policy is to be used with the Application Load - * Balancers. For Traffic Director it must be empty. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; - * @return int - */ - public function getClientValidationMode() - { - return $this->client_validation_mode; - } - - /** - * When the client presents an invalid certificate or no certificate to the - * load balancer, the `client_validation_mode` specifies how the client - * connection is handled. - * Required if the policy is to be used with the Application Load - * Balancers. For Traffic Director it must be empty. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy.ClientValidationMode client_validation_mode = 2; - * @param int $var - * @return $this - */ - public function setClientValidationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy\ClientValidationMode::class); - $this->client_validation_mode = $var; - - return $this; - } - - /** - * Required if the policy is to be used with Traffic Director. For - * Application Load Balancers it must be empty. - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; - * @return RepeatedField<\Google\Cloud\NetworkSecurity\V1\ValidationCA> - */ - public function getClientValidationCa() - { - return $this->client_validation_ca; - } - - /** - * Required if the policy is to be used with Traffic Director. For - * Application Load Balancers it must be empty. - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; - * @param \Google\Cloud\NetworkSecurity\V1\ValidationCA[] $var - * @return $this - */ - public function setClientValidationCa($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); - $this->client_validation_ca = $arr; - - return $this; - } - - /** - * Reference to the TrustConfig from certificatemanager.googleapis.com - * namespace. - * If specified, the chain validation will be performed against certificates - * configured in the given TrustConfig. - * Allowed only if the policy is to be used with Application Load - * Balancers. - * - * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getClientValidationTrustConfig() - { - return $this->client_validation_trust_config; - } - - /** - * Reference to the TrustConfig from certificatemanager.googleapis.com - * namespace. - * If specified, the chain validation will be performed against certificates - * configured in the given TrustConfig. - * Allowed only if the policy is to be used with Application Load - * Balancers. - * - * Generated from protobuf field string client_validation_trust_config = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setClientValidationTrustConfig($var) - { - GPBUtil::checkString($var, True); - $this->client_validation_trust_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php deleted file mode 100644 index 27927f3a44c0..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAddressGroupRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.networksecurity.v1.UpdateAddressGroupRequest - */ -class UpdateAddressGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AddressGroup 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) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated AddressGroup resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $address_group = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup Required. Updated AddressGroup resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * AddressGroup 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\NetworkSecurity\V1\UpdateAddressGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkSecurity\V1\AddressGroup $addressGroup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAddressGroup($addressGroup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * AddressGroup 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\NetworkSecurity\V1\AddressGroup $address_group - * Required. Updated AddressGroup resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AddressGroup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AddressGroup 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) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AddressGroup 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) = OPTIONAL]; - * @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. Updated AddressGroup resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\AddressGroup|null - */ - public function getAddressGroup() - { - return $this->address_group; - } - - public function hasAddressGroup() - { - return isset($this->address_group); - } - - public function clearAddressGroup() - { - unset($this->address_group); - } - - /** - * Required. Updated AddressGroup resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AddressGroup address_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\AddressGroup $var - * @return $this - */ - public function setAddressGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AddressGroup::class); - $this->address_group = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php deleted file mode 100644 index dde4bdd14e15..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest - */ -class UpdateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy 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) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated AuthorizationPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization_policy = null; - - /** - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. Updated AuthorizationPolicy resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy 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\NetworkSecurity\V1\UpdateAuthorizationPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAuthorizationPolicy($authorizationPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy 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\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy - * Required. Updated AuthorizationPolicy resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy 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) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy 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) = OPTIONAL]; - * @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. Updated AuthorizationPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null - */ - public function getAuthorizationPolicy() - { - return $this->authorization_policy; - } - - public function hasAuthorizationPolicy() - { - return isset($this->authorization_policy); - } - - public function clearAuthorizationPolicy() - { - unset($this->authorization_policy); - } - - /** - * Required. Updated AuthorizationPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var - * @return $this - */ - public function setAuthorizationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); - $this->authorization_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php deleted file mode 100644 index 018c9a68ac43..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest - */ -class UpdateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy 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) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated ClientTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_tls_policy = null; - - /** - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. Updated ClientTlsPolicy resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy 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\NetworkSecurity\V1\UpdateClientTlsPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setClientTlsPolicy($clientTlsPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy 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\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy - * Required. Updated ClientTlsPolicy resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy 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) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy 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) = OPTIONAL]; - * @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. Updated ClientTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null - */ - public function getClientTlsPolicy() - { - return $this->client_tls_policy; - } - - public function hasClientTlsPolicy() - { - return isset($this->client_tls_policy); - } - - public function clearClientTlsPolicy() - { - unset($this->client_tls_policy); - } - - /** - * Required. Updated ClientTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var - * @return $this - */ - public function setClientTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); - $this->client_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php deleted file mode 100644 index 9aea684ac0ca..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest - */ -class UpdateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy 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) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated ServerTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $server_tls_policy = null; - - /** - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. Updated ServerTlsPolicy resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy 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\NetworkSecurity\V1\UpdateServerTlsPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setServerTlsPolicy($serverTlsPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy 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\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy - * Required. Updated ServerTlsPolicy resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy 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) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy 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) = OPTIONAL]; - * @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. Updated ServerTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null - */ - public function getServerTlsPolicy() - { - return $this->server_tls_policy; - } - - public function hasServerTlsPolicy() - { - return isset($this->server_tls_policy); - } - - public function clearServerTlsPolicy() - { - unset($this->server_tls_policy); - } - - /** - * Required. Updated ServerTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var - * @return $this - */ - public function setServerTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); - $this->server_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php deleted file mode 100644 index 6c49d9ac333b..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.networksecurity.v1.ValidationCA - */ -class ValidationCA extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint - * gRPC specific configuration to access the gRPC server to - * obtain the CA certificate. - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the CA certificate. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null - */ - public function getGrpcEndpoint() - { - return $this->readOneof(2); - } - - public function hasGrpcEndpoint() - { - return $this->hasOneof(2); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the CA certificate. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var - * @return $this - */ - public function setGrpcEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null - */ - public function getCertificateProviderInstance() - { - return $this->readOneof(3); - } - - public function hasCertificateProviderInstance() - { - return $this->hasOneof(3); - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var - * @return $this - */ - public function setCertificateProviderInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php deleted file mode 100644 index 83082acb337d..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/add_address_group_items.php +++ /dev/null @@ -1,92 +0,0 @@ -setAddressGroup($formattedAddressGroup) - ->setItems($items); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $addressGroupServiceClient->addAddressGroupItems($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - $itemsElement = '[ITEMS]'; - - add_address_group_items_sample($formattedAddressGroup, $itemsElement); -} -// [END networksecurity_v1_generated_AddressGroupService_AddAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php deleted file mode 100644 index 697aed95e183..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/clone_address_group_items.php +++ /dev/null @@ -1,98 +0,0 @@ -setAddressGroup($formattedAddressGroup) - ->setSourceAddressGroup($formattedSourceAddressGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $addressGroupServiceClient->cloneAddressGroupItems($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - $formattedSourceAddressGroup = AddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - clone_address_group_items_sample($formattedAddressGroup, $formattedSourceAddressGroup); -} -// [END networksecurity_v1_generated_AddressGroupService_CloneAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php deleted file mode 100644 index 168d1257db0c..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/create_address_group.php +++ /dev/null @@ -1,118 +0,0 @@ -`. - * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * @param int $addressGroupCapacity Capacity of the Address Group - */ -function create_address_group_sample( - string $formattedParent, - string $addressGroupId, - string $addressGroupName, - int $addressGroupType, - int $addressGroupCapacity -): void { - // Create a client. - $addressGroupServiceClient = new AddressGroupServiceClient(); - - // Prepare the request message. - $addressGroup = (new AddressGroup()) - ->setName($addressGroupName) - ->setType($addressGroupType) - ->setCapacity($addressGroupCapacity); - $request = (new CreateAddressGroupRequest()) - ->setParent($formattedParent) - ->setAddressGroupId($addressGroupId) - ->setAddressGroup($addressGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $addressGroupServiceClient->createAddressGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AddressGroupServiceClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - $addressGroupId = '[ADDRESS_GROUP_ID]'; - $addressGroupName = '[NAME]'; - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroupCapacity = 0; - - create_address_group_sample( - $formattedParent, - $addressGroupId, - $addressGroupName, - $addressGroupType, - $addressGroupCapacity - ); -} -// [END networksecurity_v1_generated_AddressGroupService_CreateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php deleted file mode 100644 index 7b56975dcf8f..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/delete_address_group.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $addressGroupServiceClient->deleteAddressGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - delete_address_group_sample($formattedName); -} -// [END networksecurity_v1_generated_AddressGroupService_DeleteAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php deleted file mode 100644 index 2256dc9823af..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_address_group.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AddressGroup $response */ - $response = $addressGroupServiceClient->getAddressGroup($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 = AddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - get_address_group_sample($formattedName); -} -// [END networksecurity_v1_generated_AddressGroupService_GetAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php deleted file mode 100644 index 918db6a58796..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $addressGroupServiceClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_AddressGroupService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/get_location.php deleted file mode 100644 index 450fe9ad499c..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/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 networksecurity_v1_generated_AddressGroupService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php deleted file mode 100644 index 74bbe0237069..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_group_references.php +++ /dev/null @@ -1,81 +0,0 @@ -setAddressGroup($formattedAddressGroup); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $addressGroupServiceClient->listAddressGroupReferences($request); - - /** @var AddressGroupReference $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 -{ - $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - list_address_group_references_sample($formattedAddressGroup); -} -// [END networksecurity_v1_generated_AddressGroupService_ListAddressGroupReferences_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php deleted file mode 100644 index ea0888361f98..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_address_groups.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $addressGroupServiceClient->listAddressGroups($request); - - /** @var AddressGroup $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 = AddressGroupServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_address_groups_sample($formattedParent); -} -// [END networksecurity_v1_generated_AddressGroupService_ListAddressGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php deleted file mode 100644 index 8b1deb894989..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/list_locations.php +++ /dev/null @@ -1,78 +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 networksecurity_v1_generated_AddressGroupService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php deleted file mode 100644 index 638828c9d5fb..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/remove_address_group_items.php +++ /dev/null @@ -1,94 +0,0 @@ -setAddressGroup($formattedAddressGroup) - ->setItems($items); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $addressGroupServiceClient->removeAddressGroupItems($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAddressGroup = AddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - $itemsElement = '[ITEMS]'; - - remove_address_group_items_sample($formattedAddressGroup, $itemsElement); -} -// [END networksecurity_v1_generated_AddressGroupService_RemoveAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php deleted file mode 100644 index 778908faa212..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $addressGroupServiceClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_AddressGroupService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php deleted file mode 100644 index d36029a10719..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $addressGroupServiceClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networksecurity_v1_generated_AddressGroupService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php deleted file mode 100644 index 61efc9f308ac..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/AddressGroupServiceClient/update_address_group.php +++ /dev/null @@ -1,96 +0,0 @@ -`. - * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * @param int $addressGroupCapacity Capacity of the Address Group - */ -function update_address_group_sample( - string $addressGroupName, - int $addressGroupType, - int $addressGroupCapacity -): void { - // Create a client. - $addressGroupServiceClient = new AddressGroupServiceClient(); - - // Prepare the request message. - $addressGroup = (new AddressGroup()) - ->setName($addressGroupName) - ->setType($addressGroupType) - ->setCapacity($addressGroupCapacity); - $request = (new UpdateAddressGroupRequest()) - ->setAddressGroup($addressGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $addressGroupServiceClient->updateAddressGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $addressGroupName = '[NAME]'; - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroupCapacity = 0; - - update_address_group_sample($addressGroupName, $addressGroupType, $addressGroupCapacity); -} -// [END networksecurity_v1_generated_AddressGroupService_UpdateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php deleted file mode 100644 index 679959632868..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php +++ /dev/null @@ -1,110 +0,0 @@ -`. - * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - */ -function create_authorization_policy_sample( - string $formattedParent, - string $authorizationPolicyId, - string $authorizationPolicyName, - int $authorizationPolicyAction -): void { - // Create a client. - $networkSecurityClient = new NetworkSecurityClient(); - - // Prepare the request message. - $authorizationPolicy = (new AuthorizationPolicy()) - ->setName($authorizationPolicyName) - ->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->createAuthorizationPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuthorizationPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = '[AUTHORIZATION_POLICY_ID]'; - $authorizationPolicyName = '[NAME]'; - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - - create_authorization_policy_sample( - $formattedParent, - $authorizationPolicyId, - $authorizationPolicyName, - $authorizationPolicyAction - ); -} -// [END networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php deleted file mode 100644 index c4a6d03e99c2..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php +++ /dev/null @@ -1,99 +0,0 @@ -setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) - ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->createClientTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ClientTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = '[CLIENT_TLS_POLICY_ID]'; - $clientTlsPolicyName = '[NAME]'; - - create_client_tls_policy_sample($formattedParent, $clientTlsPolicyId, $clientTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php deleted file mode 100644 index d2189dfc78c3..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php +++ /dev/null @@ -1,99 +0,0 @@ -setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) - ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->createServerTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ServerTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = '[SERVER_TLS_POLICY_ID]'; - $serverTlsPolicyName = '[NAME]'; - - create_server_tls_policy_sample($formattedParent, $serverTlsPolicyId, $serverTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php deleted file mode 100644 index 8801a43568ac..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->deleteAuthorizationPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::authorizationPolicyName( - '[PROJECT]', - '[LOCATION]', - '[AUTHORIZATION_POLICY]' - ); - - delete_authorization_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php deleted file mode 100644 index 2be57169e316..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->deleteClientTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::clientTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_TLS_POLICY]' - ); - - delete_client_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php deleted file mode 100644 index 1afa5fd7f39f..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->deleteServerTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::serverTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[SERVER_TLS_POLICY]' - ); - - delete_server_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php deleted file mode 100644 index 7d539e8047c5..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AuthorizationPolicy $response */ - $response = $networkSecurityClient->getAuthorizationPolicy($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 = NetworkSecurityClient::authorizationPolicyName( - '[PROJECT]', - '[LOCATION]', - '[AUTHORIZATION_POLICY]' - ); - - get_authorization_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php deleted file mode 100644 index 2f7cfcbdcbc1..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ClientTlsPolicy $response */ - $response = $networkSecurityClient->getClientTlsPolicy($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 = NetworkSecurityClient::clientTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_TLS_POLICY]' - ); - - get_client_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php deleted file mode 100644 index 7049b35fdac9..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $networkSecurityClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php deleted file mode 100644 index a3429c396259..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/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 networksecurity_v1_generated_NetworkSecurity_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php deleted file mode 100644 index eefa66443aa6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ServerTlsPolicy $response */ - $response = $networkSecurityClient->getServerTlsPolicy($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 = NetworkSecurityClient::serverTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[SERVER_TLS_POLICY]' - ); - - get_server_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php deleted file mode 100644 index 48ae214f3c81..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkSecurityClient->listAuthorizationPolicies($request); - - /** @var AuthorizationPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - - list_authorization_policies_sample($formattedParent); -} -// [END networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php deleted file mode 100644 index 33a55f02e8be..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkSecurityClient->listClientTlsPolicies($request); - - /** @var ClientTlsPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - - list_client_tls_policies_sample($formattedParent); -} -// [END networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php deleted file mode 100644 index 2d171b1dab0d..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php +++ /dev/null @@ -1,78 +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 networksecurity_v1_generated_NetworkSecurity_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php deleted file mode 100644 index 79bcfe106f06..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkSecurityClient->listServerTlsPolicies($request); - - /** @var ServerTlsPolicy $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 = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - - list_server_tls_policies_sample($formattedParent); -} -// [END networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php deleted file mode 100644 index aa8f191e96a6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $networkSecurityClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_NetworkSecurity_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php deleted file mode 100644 index 84e504281093..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $networkSecurityClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networksecurity_v1_generated_NetworkSecurity_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php deleted file mode 100644 index 9178cbcd741b..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php +++ /dev/null @@ -1,92 +0,0 @@ -`. - * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - */ -function update_authorization_policy_sample( - string $authorizationPolicyName, - int $authorizationPolicyAction -): void { - // Create a client. - $networkSecurityClient = new NetworkSecurityClient(); - - // Prepare the request message. - $authorizationPolicy = (new AuthorizationPolicy()) - ->setName($authorizationPolicyName) - ->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest()) - ->setAuthorizationPolicy($authorizationPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->updateAuthorizationPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuthorizationPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $authorizationPolicyName = '[NAME]'; - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - - update_authorization_policy_sample($authorizationPolicyName, $authorizationPolicyAction); -} -// [END networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php deleted file mode 100644 index 1287fd2f5a00..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest()) - ->setClientTlsPolicy($clientTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->updateClientTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ClientTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $clientTlsPolicyName = '[NAME]'; - - update_client_tls_policy_sample($clientTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php deleted file mode 100644 index 29d59c208301..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest()) - ->setServerTlsPolicy($serverTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->updateServerTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ServerTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $serverTlsPolicyName = '[NAME]'; - - update_server_tls_policy_sample($serverTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php deleted file mode 100644 index eddea234e226..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php +++ /dev/null @@ -1,92 +0,0 @@ -setAddressGroup($formattedAddressGroup) - ->setItems($items); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $organizationAddressGroupServiceClient->addAddressGroupItems($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - $itemsElement = '[ITEMS]'; - - add_address_group_items_sample($formattedAddressGroup, $itemsElement); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_AddAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php deleted file mode 100644 index 6867c0791256..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php +++ /dev/null @@ -1,98 +0,0 @@ -setAddressGroup($formattedAddressGroup) - ->setSourceAddressGroup($formattedSourceAddressGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $organizationAddressGroupServiceClient->cloneAddressGroupItems($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - $formattedSourceAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - clone_address_group_items_sample($formattedAddressGroup, $formattedSourceAddressGroup); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_CloneAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php deleted file mode 100644 index eee22d30a2d8..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php +++ /dev/null @@ -1,118 +0,0 @@ -`. - * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * @param int $addressGroupCapacity Capacity of the Address Group - */ -function create_address_group_sample( - string $formattedParent, - string $addressGroupId, - string $addressGroupName, - int $addressGroupType, - int $addressGroupCapacity -): void { - // Create a client. - $organizationAddressGroupServiceClient = new OrganizationAddressGroupServiceClient(); - - // Prepare the request message. - $addressGroup = (new AddressGroup()) - ->setName($addressGroupName) - ->setType($addressGroupType) - ->setCapacity($addressGroupCapacity); - $request = (new CreateAddressGroupRequest()) - ->setParent($formattedParent) - ->setAddressGroupId($addressGroupId) - ->setAddressGroup($addressGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $organizationAddressGroupServiceClient->createAddressGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OrganizationAddressGroupServiceClient::organizationLocationName( - '[ORGANIZATION]', - '[LOCATION]' - ); - $addressGroupId = '[ADDRESS_GROUP_ID]'; - $addressGroupName = '[NAME]'; - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroupCapacity = 0; - - create_address_group_sample( - $formattedParent, - $addressGroupId, - $addressGroupName, - $addressGroupType, - $addressGroupCapacity - ); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_CreateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php deleted file mode 100644 index 4c5889bf65e0..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $organizationAddressGroupServiceClient->deleteAddressGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OrganizationAddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - delete_address_group_sample($formattedName); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_DeleteAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php deleted file mode 100644 index acb3d1d1b7e9..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AddressGroup $response */ - $response = $organizationAddressGroupServiceClient->getAddressGroup($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 = OrganizationAddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - get_address_group_sample($formattedName); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_GetAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php deleted file mode 100644 index bd7bc0b26a08..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $organizationAddressGroupServiceClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/get_location.php deleted file mode 100644 index 9095fd4a1feb..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/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 networksecurity_v1_generated_OrganizationAddressGroupService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php deleted file mode 100644 index e5aae2a20c3b..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php +++ /dev/null @@ -1,81 +0,0 @@ -setAddressGroup($formattedAddressGroup); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $organizationAddressGroupServiceClient->listAddressGroupReferences($request); - - /** @var AddressGroupReference $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 -{ - $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - - list_address_group_references_sample($formattedAddressGroup); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_ListAddressGroupReferences_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php deleted file mode 100644 index d393c1b1fdc9..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $organizationAddressGroupServiceClient->listAddressGroups($request); - - /** @var AddressGroup $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 = OrganizationAddressGroupServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_address_groups_sample($formattedParent); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_ListAddressGroups_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php deleted file mode 100644 index c3a3c3d70ae6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/list_locations.php +++ /dev/null @@ -1,78 +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 networksecurity_v1_generated_OrganizationAddressGroupService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php deleted file mode 100644 index 715a48bf0108..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php +++ /dev/null @@ -1,94 +0,0 @@ -setAddressGroup($formattedAddressGroup) - ->setItems($items); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $organizationAddressGroupServiceClient->removeAddressGroupItems($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAddressGroup = OrganizationAddressGroupServiceClient::addressGroupName( - '[PROJECT]', - '[LOCATION]', - '[ADDRESS_GROUP]' - ); - $itemsElement = '[ITEMS]'; - - remove_address_group_items_sample($formattedAddressGroup, $itemsElement); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_RemoveAddressGroupItems_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php deleted file mode 100644 index f8a5e58a787c..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $organizationAddressGroupServiceClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php deleted file mode 100644 index c20e1910cebf..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $organizationAddressGroupServiceClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php deleted file mode 100644 index b259ccb545d6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php +++ /dev/null @@ -1,96 +0,0 @@ -`. - * @param int $addressGroupType The type of the Address Group. Possible values are "IPv4" or - * "IPV6". - * @param int $addressGroupCapacity Capacity of the Address Group - */ -function update_address_group_sample( - string $addressGroupName, - int $addressGroupType, - int $addressGroupCapacity -): void { - // Create a client. - $organizationAddressGroupServiceClient = new OrganizationAddressGroupServiceClient(); - - // Prepare the request message. - $addressGroup = (new AddressGroup()) - ->setName($addressGroupName) - ->setType($addressGroupType) - ->setCapacity($addressGroupCapacity); - $request = (new UpdateAddressGroupRequest()) - ->setAddressGroup($addressGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $organizationAddressGroupServiceClient->updateAddressGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddressGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $addressGroupName = '[NAME]'; - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroupCapacity = 0; - - update_address_group_sample($addressGroupName, $addressGroupType, $addressGroupCapacity); -} -// [END networksecurity_v1_generated_OrganizationAddressGroupService_UpdateAddressGroup_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php deleted file mode 100644 index 5f8442b61eb4..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/AddressGroupServiceClient.php +++ /dev/null @@ -1,791 +0,0 @@ - addAddressGroupItemsAsync(AddAddressGroupItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface cloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAddressGroupAsync(CreateAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAddressGroupAsync(DeleteAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAddressGroupAsync(GetAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAddressGroupReferencesAsync(ListAddressGroupReferencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAddressGroupsAsync(ListAddressGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeAddressGroupItemsAsync(RemoveAddressGroupItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAddressGroupAsync(UpdateAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class AddressGroupServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networksecurity.v1.AddressGroupService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/address_group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/address_group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/address_group_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/address_group_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * address_group resource. - * - * @param string $project - * @param string $location - * @param string $addressGroup - * - * @return string The formatted address_group resource. - */ - public static function addressGroupName(string $project, string $location, string $addressGroup): string - { - return self::getPathTemplate('addressGroup')->render([ - 'project' => $project, - 'location' => $location, - 'address_group' => $addressGroup, - ]); - } - - /** - * 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_address_group resource. - * - * @param string $organization - * @param string $location - * @param string $addressGroup - * - * @return string The formatted organization_location_address_group resource. - */ - public static function organizationLocationAddressGroupName(string $organization, string $location, string $addressGroup): string - { - return self::getPathTemplate('organizationLocationAddressGroup')->render([ - 'organization' => $organization, - 'location' => $location, - 'address_group' => $addressGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_address_group resource. - * - * @param string $project - * @param string $location - * @param string $addressGroup - * - * @return string The formatted project_location_address_group resource. - */ - public static function projectLocationAddressGroupName(string $project, string $location, string $addressGroup): string - { - return self::getPathTemplate('projectLocationAddressGroup')->render([ - 'project' => $project, - 'location' => $location, - 'address_group' => $addressGroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - addressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} - * - location: projects/{project}/locations/{location} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationAddressGroup: organizations/{organization}/locations/{location}/addressGroups/{address_group} - * - projectLocationAddressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networksecurity.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\NetworkSecurity\V1\AddressGroupServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AddressGroupServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds items to an address group. - * - * The async variant is - * {@see AddressGroupServiceClient::addAddressGroupItemsAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/add_address_group_items.php - * - * @param AddAddressGroupItemsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function addAddressGroupItems(AddAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AddAddressGroupItems', $request, $callOptions)->wait(); - } - - /** - * Clones items from one address group to another. - * - * The async variant is - * {@see AddressGroupServiceClient::cloneAddressGroupItemsAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/clone_address_group_items.php - * - * @param CloneAddressGroupItemsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cloneAddressGroupItems(CloneAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CloneAddressGroupItems', $request, $callOptions)->wait(); - } - - /** - * Creates a new address group in a given project and location. - * - * The async variant is {@see AddressGroupServiceClient::createAddressGroupAsync()} - * . - * - * @example samples/V1/AddressGroupServiceClient/create_address_group.php - * - * @param CreateAddressGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAddressGroup(CreateAddressGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes a single address group. - * - * The async variant is {@see AddressGroupServiceClient::deleteAddressGroupAsync()} - * . - * - * @example samples/V1/AddressGroupServiceClient/delete_address_group.php - * - * @param DeleteAddressGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAddressGroup(DeleteAddressGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single address group. - * - * The async variant is {@see AddressGroupServiceClient::getAddressGroupAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/get_address_group.php - * - * @param GetAddressGroupRequest $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 AddressGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAddressGroup(GetAddressGroupRequest $request, array $callOptions = []): AddressGroup - { - return $this->startApiCall('GetAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Lists references of an address group. - * - * The async variant is - * {@see AddressGroupServiceClient::listAddressGroupReferencesAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/list_address_group_references.php - * - * @param ListAddressGroupReferencesRequest $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 listAddressGroupReferences(ListAddressGroupReferencesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAddressGroupReferences', $request, $callOptions); - } - - /** - * Lists address groups in a given project and location. - * - * The async variant is {@see AddressGroupServiceClient::listAddressGroupsAsync()} - * . - * - * @example samples/V1/AddressGroupServiceClient/list_address_groups.php - * - * @param ListAddressGroupsRequest $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 listAddressGroups(ListAddressGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAddressGroups', $request, $callOptions); - } - - /** - * Removes items from an address group. - * - * The async variant is - * {@see AddressGroupServiceClient::removeAddressGroupItemsAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/remove_address_group_items.php - * - * @param RemoveAddressGroupItemsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function removeAddressGroupItems(RemoveAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RemoveAddressGroupItems', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single address group. - * - * The async variant is {@see AddressGroupServiceClient::updateAddressGroupAsync()} - * . - * - * @example samples/V1/AddressGroupServiceClient/update_address_group.php - * - * @param UpdateAddressGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAddressGroup(UpdateAddressGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AddressGroupServiceClient::getLocationAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - - This method lists locations based on the resource scope provided in - the [ListLocationsRequest.name] field: - - * **Global locations**: If `name` is empty, the method lists the - public locations available to all projects. * **Project-specific - locations**: If `name` follows the format - `projects/{project}`, the method lists locations visible to that - specific project. This includes public, private, or other - project-specific locations enabled for the project. - - For gRPC and client library implementations, the resource name is - passed as the `name` field. For direct service calls, the resource - name is - incorporated into the request path based on the specific service - implementation and version. - * - * The async variant is {@see AddressGroupServiceClient::listLocationsAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/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); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see AddressGroupServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see AddressGroupServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/AddressGroupServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see AddressGroupServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/AddressGroupServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php deleted file mode 100644 index 1b5ec3f40664..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php +++ /dev/null @@ -1,1998 +0,0 @@ - createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAuthzPolicyAsync(CreateAuthzPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackendAuthenticationConfigAsync(CreateBackendAuthenticationConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createClientTlsPolicyAsync(CreateClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGatewaySecurityPolicyAsync(CreateGatewaySecurityPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGatewaySecurityPolicyRuleAsync(CreateGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createServerTlsPolicyAsync(CreateServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTlsInspectionPolicyAsync(CreateTlsInspectionPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createUrlListAsync(CreateUrlListRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAuthzPolicyAsync(DeleteAuthzPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackendAuthenticationConfigAsync(DeleteBackendAuthenticationConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGatewaySecurityPolicyAsync(DeleteGatewaySecurityPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGatewaySecurityPolicyRuleAsync(DeleteGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTlsInspectionPolicyAsync(DeleteTlsInspectionPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUrlListAsync(DeleteUrlListRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuthorizationPolicyAsync(GetAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuthzPolicyAsync(GetAuthzPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackendAuthenticationConfigAsync(GetBackendAuthenticationConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClientTlsPolicyAsync(GetClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGatewaySecurityPolicyAsync(GetGatewaySecurityPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGatewaySecurityPolicyRuleAsync(GetGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getServerTlsPolicyAsync(GetServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTlsInspectionPolicyAsync(GetTlsInspectionPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUrlListAsync(GetUrlListRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuthorizationPoliciesAsync(ListAuthorizationPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuthzPoliciesAsync(ListAuthzPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackendAuthenticationConfigsAsync(ListBackendAuthenticationConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClientTlsPoliciesAsync(ListClientTlsPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGatewaySecurityPoliciesAsync(ListGatewaySecurityPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGatewaySecurityPolicyRulesAsync(ListGatewaySecurityPolicyRulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServerTlsPoliciesAsync(ListServerTlsPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTlsInspectionPoliciesAsync(ListTlsInspectionPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUrlListsAsync(ListUrlListsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAuthzPolicyAsync(UpdateAuthzPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackendAuthenticationConfigAsync(UpdateBackendAuthenticationConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGatewaySecurityPolicyAsync(UpdateGatewaySecurityPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGatewaySecurityPolicyRuleAsync(UpdateGatewaySecurityPolicyRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTlsInspectionPolicyAsync(UpdateTlsInspectionPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateUrlListAsync(UpdateUrlListRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class NetworkSecurityClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networksecurity.v1.NetworkSecurity'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/network_security_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/network_security_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/network_security_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/network_security_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * authorization_policy resource. - * - * @param string $project - * @param string $location - * @param string $authorizationPolicy - * - * @return string The formatted authorization_policy resource. - */ - public static function authorizationPolicyName(string $project, string $location, string $authorizationPolicy): string - { - return self::getPathTemplate('authorizationPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'authorization_policy' => $authorizationPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a authz_policy - * resource. - * - * @param string $project - * @param string $location - * @param string $authzPolicy - * - * @return string The formatted authz_policy resource. - */ - public static function authzPolicyName(string $project, string $location, string $authzPolicy): string - { - return self::getPathTemplate('authzPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'authz_policy' => $authzPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backend_authentication_config resource. - * - * @param string $project - * @param string $location - * @param string $backendAuthenticationConfig - * - * @return string The formatted backend_authentication_config resource. - */ - public static function backendAuthenticationConfigName(string $project, string $location, string $backendAuthenticationConfig): string - { - return self::getPathTemplate('backendAuthenticationConfig')->render([ - 'project' => $project, - 'location' => $location, - 'backend_authentication_config' => $backendAuthenticationConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a ca_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $caPool - * - * @return string The formatted ca_pool resource. - */ - public static function caPoolName(string $project, string $location, string $caPool): string - { - return self::getPathTemplate('caPool')->render([ - 'project' => $project, - 'location' => $location, - 'ca_pool' => $caPool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a certificate - * resource. - * - * @param string $project - * @param string $location - * @param string $certificate - * - * @return string The formatted certificate resource. - */ - public static function certificateName(string $project, string $location, string $certificate): string - { - return self::getPathTemplate('certificate')->render([ - 'project' => $project, - 'location' => $location, - 'certificate' => $certificate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * client_tls_policy resource. - * - * @param string $project - * @param string $location - * @param string $clientTlsPolicy - * - * @return string The formatted client_tls_policy resource. - */ - public static function clientTlsPolicyName(string $project, string $location, string $clientTlsPolicy): string - { - return self::getPathTemplate('clientTlsPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'client_tls_policy' => $clientTlsPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * gateway_security_policy resource. - * - * @param string $project - * @param string $location - * @param string $gatewaySecurityPolicy - * - * @return string The formatted gateway_security_policy resource. - */ - public static function gatewaySecurityPolicyName(string $project, string $location, string $gatewaySecurityPolicy): string - { - return self::getPathTemplate('gatewaySecurityPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'gateway_security_policy' => $gatewaySecurityPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * gateway_security_policy_rule resource. - * - * @param string $project - * @param string $location - * @param string $gatewaySecurityPolicy - * @param string $rule - * - * @return string The formatted gateway_security_policy_rule resource. - */ - public static function gatewaySecurityPolicyRuleName(string $project, string $location, string $gatewaySecurityPolicy, string $rule): string - { - return self::getPathTemplate('gatewaySecurityPolicyRule')->render([ - 'project' => $project, - 'location' => $location, - 'gateway_security_policy' => $gatewaySecurityPolicy, - 'rule' => $rule, - ]); - } - - /** - * 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 - * server_tls_policy resource. - * - * @param string $project - * @param string $location - * @param string $serverTlsPolicy - * - * @return string The formatted server_tls_policy resource. - */ - public static function serverTlsPolicyName(string $project, string $location, string $serverTlsPolicy): string - { - return self::getPathTemplate('serverTlsPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'server_tls_policy' => $serverTlsPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tls_inspection_policy resource. - * - * @param string $project - * @param string $location - * @param string $tlsInspectionPolicy - * - * @return string The formatted tls_inspection_policy resource. - */ - public static function tlsInspectionPolicyName(string $project, string $location, string $tlsInspectionPolicy): string - { - return self::getPathTemplate('tlsInspectionPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'tls_inspection_policy' => $tlsInspectionPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a trust_config - * resource. - * - * @param string $project - * @param string $location - * @param string $trustConfig - * - * @return string The formatted trust_config resource. - */ - public static function trustConfigName(string $project, string $location, string $trustConfig): string - { - return self::getPathTemplate('trustConfig')->render([ - 'project' => $project, - 'location' => $location, - 'trust_config' => $trustConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a url_list - * resource. - * - * @param string $project - * @param string $location - * @param string $urlList - * - * @return string The formatted url_list resource. - */ - public static function urlListName(string $project, string $location, string $urlList): string - { - return self::getPathTemplate('urlList')->render([ - 'project' => $project, - 'location' => $location, - 'url_list' => $urlList, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy} - * - authzPolicy: projects/{project}/locations/{location}/authzPolicies/{authz_policy} - * - backendAuthenticationConfig: projects/{project}/locations/{location}/backendAuthenticationConfigs/{backend_authentication_config} - * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} - * - certificate: projects/{project}/locations/{location}/certificates/{certificate} - * - clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy} - * - gatewaySecurityPolicy: projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} - * - gatewaySecurityPolicyRule: projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} - * - location: projects/{project}/locations/{location} - * - serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy} - * - tlsInspectionPolicy: projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} - * - trustConfig: projects/{project}/locations/{location}/trustConfigs/{trust_config} - * - urlList: projects/{project}/locations/{location}/urlLists/{url_list} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networksecurity.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\NetworkSecurity\V1\NetworkSecurityClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new NetworkSecurityClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new AuthorizationPolicy in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::createAuthorizationPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_authorization_policy.php - * - * @param CreateAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAuthorizationPolicy(CreateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new AuthzPolicy in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::createAuthzPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_authz_policy.php - * - * @param CreateAuthzPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAuthzPolicy(CreateAuthzPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAuthzPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new BackendAuthenticationConfig in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::createBackendAuthenticationConfigAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_backend_authentication_config.php - * - * @param CreateBackendAuthenticationConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBackendAuthenticationConfig(CreateBackendAuthenticationConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackendAuthenticationConfig', $request, $callOptions)->wait(); - } - - /** - * Creates a new ClientTlsPolicy in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::createClientTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/create_client_tls_policy.php - * - * @param CreateClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createClientTlsPolicy(CreateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new GatewaySecurityPolicy in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::createGatewaySecurityPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_gateway_security_policy.php - * - * @param CreateGatewaySecurityPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGatewaySecurityPolicy(CreateGatewaySecurityPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGatewaySecurityPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new GatewaySecurityPolicy in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::createGatewaySecurityPolicyRuleAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_gateway_security_policy_rule.php - * - * @param CreateGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGatewaySecurityPolicyRule(CreateGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGatewaySecurityPolicyRule', $request, $callOptions)->wait(); - } - - /** - * Creates a new ServerTlsPolicy in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::createServerTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/create_server_tls_policy.php - * - * @param CreateServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createServerTlsPolicy(CreateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new TlsInspectionPolicy in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::createTlsInspectionPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_tls_inspection_policy.php - * - * @param CreateTlsInspectionPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTlsInspectionPolicy(CreateTlsInspectionPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTlsInspectionPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new UrlList in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::createUrlListAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_url_list.php - * - * @param CreateUrlListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createUrlList(CreateUrlListRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateUrlList', $request, $callOptions)->wait(); - } - - /** - * Deletes a single AuthorizationPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::deleteAuthorizationPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_authorization_policy.php - * - * @param DeleteAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAuthorizationPolicy(DeleteAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single AuthzPolicy. - * - * The async variant is {@see NetworkSecurityClient::deleteAuthzPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_authz_policy.php - * - * @param DeleteAuthzPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAuthzPolicy(DeleteAuthzPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAuthzPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single BackendAuthenticationConfig to - * BackendAuthenticationConfig. - * - * The async variant is - * {@see NetworkSecurityClient::deleteBackendAuthenticationConfigAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_backend_authentication_config.php - * - * @param DeleteBackendAuthenticationConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBackendAuthenticationConfig(DeleteBackendAuthenticationConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackendAuthenticationConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ClientTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::deleteClientTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/delete_client_tls_policy.php - * - * @param DeleteClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteClientTlsPolicy(DeleteClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single GatewaySecurityPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::deleteGatewaySecurityPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_gateway_security_policy.php - * - * @param DeleteGatewaySecurityPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGatewaySecurityPolicy(DeleteGatewaySecurityPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGatewaySecurityPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single GatewaySecurityPolicyRule. - * - * The async variant is - * {@see NetworkSecurityClient::deleteGatewaySecurityPolicyRuleAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_gateway_security_policy_rule.php - * - * @param DeleteGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGatewaySecurityPolicyRule(DeleteGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGatewaySecurityPolicyRule', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ServerTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::deleteServerTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/delete_server_tls_policy.php - * - * @param DeleteServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteServerTlsPolicy(DeleteServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single TlsInspectionPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::deleteTlsInspectionPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_tls_inspection_policy.php - * - * @param DeleteTlsInspectionPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTlsInspectionPolicy(DeleteTlsInspectionPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTlsInspectionPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single UrlList. - * - * The async variant is {@see NetworkSecurityClient::deleteUrlListAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_url_list.php - * - * @param DeleteUrlListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteUrlList(DeleteUrlListRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteUrlList', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single AuthorizationPolicy. - * - * The async variant is {@see NetworkSecurityClient::getAuthorizationPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/get_authorization_policy.php - * - * @param GetAuthorizationPolicyRequest $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 AuthorizationPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuthorizationPolicy(GetAuthorizationPolicyRequest $request, array $callOptions = []): AuthorizationPolicy - { - return $this->startApiCall('GetAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single AuthzPolicy. - * - * The async variant is {@see NetworkSecurityClient::getAuthzPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_authz_policy.php - * - * @param GetAuthzPolicyRequest $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 AuthzPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuthzPolicy(GetAuthzPolicyRequest $request, array $callOptions = []): AuthzPolicy - { - return $this->startApiCall('GetAuthzPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single BackendAuthenticationConfig to - * BackendAuthenticationConfig. - * - * The async variant is - * {@see NetworkSecurityClient::getBackendAuthenticationConfigAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_backend_authentication_config.php - * - * @param GetBackendAuthenticationConfigRequest $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 BackendAuthenticationConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackendAuthenticationConfig(GetBackendAuthenticationConfigRequest $request, array $callOptions = []): BackendAuthenticationConfig - { - return $this->startApiCall('GetBackendAuthenticationConfig', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ClientTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::getClientTlsPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_client_tls_policy.php - * - * @param GetClientTlsPolicyRequest $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 ClientTlsPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getClientTlsPolicy(GetClientTlsPolicyRequest $request, array $callOptions = []): ClientTlsPolicy - { - return $this->startApiCall('GetClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single GatewaySecurityPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::getGatewaySecurityPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_gateway_security_policy.php - * - * @param GetGatewaySecurityPolicyRequest $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 GatewaySecurityPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGatewaySecurityPolicy(GetGatewaySecurityPolicyRequest $request, array $callOptions = []): GatewaySecurityPolicy - { - return $this->startApiCall('GetGatewaySecurityPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single GatewaySecurityPolicyRule. - * - * The async variant is - * {@see NetworkSecurityClient::getGatewaySecurityPolicyRuleAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_gateway_security_policy_rule.php - * - * @param GetGatewaySecurityPolicyRuleRequest $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 GatewaySecurityPolicyRule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGatewaySecurityPolicyRule(GetGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): GatewaySecurityPolicyRule - { - return $this->startApiCall('GetGatewaySecurityPolicyRule', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ServerTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::getServerTlsPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_server_tls_policy.php - * - * @param GetServerTlsPolicyRequest $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 ServerTlsPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getServerTlsPolicy(GetServerTlsPolicyRequest $request, array $callOptions = []): ServerTlsPolicy - { - return $this->startApiCall('GetServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single TlsInspectionPolicy. - * - * The async variant is {@see NetworkSecurityClient::getTlsInspectionPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/get_tls_inspection_policy.php - * - * @param GetTlsInspectionPolicyRequest $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 TlsInspectionPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTlsInspectionPolicy(GetTlsInspectionPolicyRequest $request, array $callOptions = []): TlsInspectionPolicy - { - return $this->startApiCall('GetTlsInspectionPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single UrlList. - * - * The async variant is {@see NetworkSecurityClient::getUrlListAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_url_list.php - * - * @param GetUrlListRequest $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 UrlList - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUrlList(GetUrlListRequest $request, array $callOptions = []): UrlList - { - return $this->startApiCall('GetUrlList', $request, $callOptions)->wait(); - } - - /** - * Lists AuthorizationPolicies in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::listAuthorizationPoliciesAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_authorization_policies.php - * - * @param ListAuthorizationPoliciesRequest $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 listAuthorizationPolicies(ListAuthorizationPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAuthorizationPolicies', $request, $callOptions); - } - - /** - * Lists AuthzPolicies in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::listAuthzPoliciesAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_authz_policies.php - * - * @param ListAuthzPoliciesRequest $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 listAuthzPolicies(ListAuthzPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAuthzPolicies', $request, $callOptions); - } - - /** - * Lists BackendAuthenticationConfigs in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::listBackendAuthenticationConfigsAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_backend_authentication_configs.php - * - * @param ListBackendAuthenticationConfigsRequest $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 listBackendAuthenticationConfigs(ListBackendAuthenticationConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackendAuthenticationConfigs', $request, $callOptions); - } - - /** - * Lists ClientTlsPolicies in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::listClientTlsPoliciesAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/list_client_tls_policies.php - * - * @param ListClientTlsPoliciesRequest $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 listClientTlsPolicies(ListClientTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClientTlsPolicies', $request, $callOptions); - } - - /** - * Lists GatewaySecurityPolicies in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::listGatewaySecurityPoliciesAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_gateway_security_policies.php - * - * @param ListGatewaySecurityPoliciesRequest $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 listGatewaySecurityPolicies(ListGatewaySecurityPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGatewaySecurityPolicies', $request, $callOptions); - } - - /** - * Lists GatewaySecurityPolicyRules in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::listGatewaySecurityPolicyRulesAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_gateway_security_policy_rules.php - * - * @param ListGatewaySecurityPolicyRulesRequest $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 listGatewaySecurityPolicyRules(ListGatewaySecurityPolicyRulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGatewaySecurityPolicyRules', $request, $callOptions); - } - - /** - * Lists ServerTlsPolicies in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::listServerTlsPoliciesAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/list_server_tls_policies.php - * - * @param ListServerTlsPoliciesRequest $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 listServerTlsPolicies(ListServerTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServerTlsPolicies', $request, $callOptions); - } - - /** - * Lists TlsInspectionPolicies in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::listTlsInspectionPoliciesAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_tls_inspection_policies.php - * - * @param ListTlsInspectionPoliciesRequest $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 listTlsInspectionPolicies(ListTlsInspectionPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTlsInspectionPolicies', $request, $callOptions); - } - - /** - * Lists UrlLists in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::listUrlListsAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_url_lists.php - * - * @param ListUrlListsRequest $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 listUrlLists(ListUrlListsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListUrlLists', $request, $callOptions); - } - - /** - * Updates the parameters of a single AuthorizationPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::updateAuthorizationPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_authorization_policy.php - * - * @param UpdateAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAuthorizationPolicy(UpdateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single AuthzPolicy. - * - * The async variant is {@see NetworkSecurityClient::updateAuthzPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_authz_policy.php - * - * @param UpdateAuthzPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAuthzPolicy(UpdateAuthzPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAuthzPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single BackendAuthenticationConfig to - * BackendAuthenticationConfig. - * - * The async variant is - * {@see NetworkSecurityClient::updateBackendAuthenticationConfigAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_backend_authentication_config.php - * - * @param UpdateBackendAuthenticationConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackendAuthenticationConfig(UpdateBackendAuthenticationConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBackendAuthenticationConfig', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single ClientTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::updateClientTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/update_client_tls_policy.php - * - * @param UpdateClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateClientTlsPolicy(UpdateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single GatewaySecurityPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::updateGatewaySecurityPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_gateway_security_policy.php - * - * @param UpdateGatewaySecurityPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGatewaySecurityPolicy(UpdateGatewaySecurityPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGatewaySecurityPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single GatewaySecurityPolicyRule. - * - * The async variant is - * {@see NetworkSecurityClient::updateGatewaySecurityPolicyRuleAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_gateway_security_policy_rule.php - * - * @param UpdateGatewaySecurityPolicyRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGatewaySecurityPolicyRule(UpdateGatewaySecurityPolicyRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGatewaySecurityPolicyRule', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single ServerTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::updateServerTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/update_server_tls_policy.php - * - * @param UpdateServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateServerTlsPolicy(UpdateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single TlsInspectionPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::updateTlsInspectionPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_tls_inspection_policy.php - * - * @param UpdateTlsInspectionPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTlsInspectionPolicy(UpdateTlsInspectionPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTlsInspectionPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single UrlList. - * - * The async variant is {@see NetworkSecurityClient::updateUrlListAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_url_list.php - * - * @param UpdateUrlListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateUrlList(UpdateUrlListRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateUrlList', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see NetworkSecurityClient::getLocationAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - - This method lists locations based on the resource scope provided in - the [ListLocationsRequest.name] field: - - * **Global locations**: If `name` is empty, the method lists the - public locations available to all projects. * **Project-specific - locations**: If `name` follows the format - `projects/{project}`, the method lists locations visible to that - specific project. This includes public, private, or other - project-specific locations enabled for the project. - - For gRPC and client library implementations, the resource name is - passed as the `name` field. For direct service calls, the resource - name is - incorporated into the request path based on the specific service - implementation and version. - * - * The async variant is {@see NetworkSecurityClient::listLocationsAsync()} . - * - * @example samples/V1/NetworkSecurityClient/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); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see NetworkSecurityClient::getIamPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see NetworkSecurityClient::setIamPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see NetworkSecurityClient::testIamPermissionsAsync()} . - * - * @example samples/V1/NetworkSecurityClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php deleted file mode 100644 index e61621593875..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/OrganizationAddressGroupServiceClient.php +++ /dev/null @@ -1,797 +0,0 @@ - addAddressGroupItemsAsync(AddAddressGroupItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface cloneAddressGroupItemsAsync(CloneAddressGroupItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAddressGroupAsync(CreateAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAddressGroupAsync(DeleteAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAddressGroupAsync(GetAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAddressGroupReferencesAsync(ListAddressGroupReferencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAddressGroupsAsync(ListAddressGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeAddressGroupItemsAsync(RemoveAddressGroupItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAddressGroupAsync(UpdateAddressGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class OrganizationAddressGroupServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networksecurity.v1.OrganizationAddressGroupService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/organization_address_group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/organization_address_group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/organization_address_group_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/organization_address_group_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * address_group resource. - * - * @param string $project - * @param string $location - * @param string $addressGroup - * - * @return string The formatted address_group resource. - */ - public static function addressGroupName(string $project, string $location, string $addressGroup): string - { - return self::getPathTemplate('addressGroup')->render([ - 'project' => $project, - 'location' => $location, - 'address_group' => $addressGroup, - ]); - } - - /** - * 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_address_group resource. - * - * @param string $organization - * @param string $location - * @param string $addressGroup - * - * @return string The formatted organization_location_address_group resource. - */ - public static function organizationLocationAddressGroupName(string $organization, string $location, string $addressGroup): string - { - return self::getPathTemplate('organizationLocationAddressGroup')->render([ - 'organization' => $organization, - 'location' => $location, - 'address_group' => $addressGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_address_group resource. - * - * @param string $project - * @param string $location - * @param string $addressGroup - * - * @return string The formatted project_location_address_group resource. - */ - public static function projectLocationAddressGroupName(string $project, string $location, string $addressGroup): string - { - return self::getPathTemplate('projectLocationAddressGroup')->render([ - 'project' => $project, - 'location' => $location, - 'address_group' => $addressGroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - addressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} - * - location: projects/{project}/locations/{location} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationAddressGroup: organizations/{organization}/locations/{location}/addressGroups/{address_group} - * - projectLocationAddressGroup: projects/{project}/locations/{location}/addressGroups/{address_group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networksecurity.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\NetworkSecurity\V1\OrganizationAddressGroupServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new OrganizationAddressGroupServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds items to an address group. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::addAddressGroupItemsAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/add_address_group_items.php - * - * @param AddAddressGroupItemsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function addAddressGroupItems(AddAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AddAddressGroupItems', $request, $callOptions)->wait(); - } - - /** - * Clones items from one address group to another. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::cloneAddressGroupItemsAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/clone_address_group_items.php - * - * @param CloneAddressGroupItemsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cloneAddressGroupItems(CloneAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CloneAddressGroupItems', $request, $callOptions)->wait(); - } - - /** - * Creates a new address group in a given project and location. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::createAddressGroupAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/create_address_group.php - * - * @param CreateAddressGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAddressGroup(CreateAddressGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes an address group. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::deleteAddressGroupAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/delete_address_group.php - * - * @param DeleteAddressGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAddressGroup(DeleteAddressGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single address group. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::getAddressGroupAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/get_address_group.php - * - * @param GetAddressGroupRequest $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 AddressGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAddressGroup(GetAddressGroupRequest $request, array $callOptions = []): AddressGroup - { - return $this->startApiCall('GetAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Lists references of an address group. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::listAddressGroupReferencesAsync()} - * . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/list_address_group_references.php - * - * @param ListAddressGroupReferencesRequest $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 listAddressGroupReferences(ListAddressGroupReferencesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAddressGroupReferences', $request, $callOptions); - } - - /** - * Lists address groups in a given project and location. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::listAddressGroupsAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/list_address_groups.php - * - * @param ListAddressGroupsRequest $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 listAddressGroups(ListAddressGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAddressGroups', $request, $callOptions); - } - - /** - * Removes items from an address group. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::removeAddressGroupItemsAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/remove_address_group_items.php - * - * @param RemoveAddressGroupItemsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function removeAddressGroupItems(RemoveAddressGroupItemsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RemoveAddressGroupItems', $request, $callOptions)->wait(); - } - - /** - * Updates parameters of an address group. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::updateAddressGroupAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/update_address_group.php - * - * @param UpdateAddressGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAddressGroup(UpdateAddressGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAddressGroup', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::getLocationAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - - This method lists locations based on the resource scope provided in - the [ListLocationsRequest.name] field: - - * **Global locations**: If `name` is empty, the method lists the - public locations available to all projects. * **Project-specific - locations**: If `name` follows the format - `projects/{project}`, the method lists locations visible to that - specific project. This includes public, private, or other - project-specific locations enabled for the project. - - For gRPC and client library implementations, the resource name is - passed as the `name` field. For direct service calls, the resource - name is - incorporated into the request path based on the specific service - implementation and version. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::listLocationsAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/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); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is - * {@see OrganizationAddressGroupServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/OrganizationAddressGroupServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 17634b27cc60..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,921 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.networksecurity.v1", - "libraryPackage": "Google\\Cloud\\NetworkSecurity\\V1", - "services": { - "AddressGroupService": { - "clients": { - "grpc": { - "libraryClient": "AddressGroupServiceGapicClient", - "rpcs": { - "AddAddressGroupItems": { - "methods": [ - "addAddressGroupItems" - ] - }, - "CloneAddressGroupItems": { - "methods": [ - "cloneAddressGroupItems" - ] - }, - "CreateAddressGroup": { - "methods": [ - "createAddressGroup" - ] - }, - "DeleteAddressGroup": { - "methods": [ - "deleteAddressGroup" - ] - }, - "GetAddressGroup": { - "methods": [ - "getAddressGroup" - ] - }, - "ListAddressGroupReferences": { - "methods": [ - "listAddressGroupReferences" - ] - }, - "ListAddressGroups": { - "methods": [ - "listAddressGroups" - ] - }, - "RemoveAddressGroupItems": { - "methods": [ - "removeAddressGroupItems" - ] - }, - "UpdateAddressGroup": { - "methods": [ - "updateAddressGroup" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "OrganizationAddressGroupService": { - "clients": { - "grpc": { - "libraryClient": "OrganizationAddressGroupServiceGapicClient", - "rpcs": { - "AddAddressGroupItems": { - "methods": [ - "addAddressGroupItems" - ] - }, - "CloneAddressGroupItems": { - "methods": [ - "cloneAddressGroupItems" - ] - }, - "CreateAddressGroup": { - "methods": [ - "createAddressGroup" - ] - }, - "DeleteAddressGroup": { - "methods": [ - "deleteAddressGroup" - ] - }, - "GetAddressGroup": { - "methods": [ - "getAddressGroup" - ] - }, - "ListAddressGroupReferences": { - "methods": [ - "listAddressGroupReferences" - ] - }, - "ListAddressGroups": { - "methods": [ - "listAddressGroups" - ] - }, - "RemoveAddressGroupItems": { - "methods": [ - "removeAddressGroupItems" - ] - }, - "UpdateAddressGroup": { - "methods": [ - "updateAddressGroup" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "DnsThreatDetectorService": { - "clients": { - "grpc": { - "libraryClient": "DnsThreatDetectorServiceGapicClient", - "rpcs": { - "CreateDnsThreatDetector": { - "methods": [ - "createDnsThreatDetector" - ] - }, - "DeleteDnsThreatDetector": { - "methods": [ - "deleteDnsThreatDetector" - ] - }, - "GetDnsThreatDetector": { - "methods": [ - "getDnsThreatDetector" - ] - }, - "ListDnsThreatDetectors": { - "methods": [ - "listDnsThreatDetectors" - ] - }, - "UpdateDnsThreatDetector": { - "methods": [ - "updateDnsThreatDetector" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "FirewallActivation": { - "clients": { - "grpc": { - "libraryClient": "FirewallActivationGapicClient", - "rpcs": { - "CreateFirewallEndpoint": { - "methods": [ - "createFirewallEndpoint" - ] - }, - "CreateFirewallEndpointAssociation": { - "methods": [ - "createFirewallEndpointAssociation" - ] - }, - "DeleteFirewallEndpoint": { - "methods": [ - "deleteFirewallEndpoint" - ] - }, - "DeleteFirewallEndpointAssociation": { - "methods": [ - "deleteFirewallEndpointAssociation" - ] - }, - "GetFirewallEndpoint": { - "methods": [ - "getFirewallEndpoint" - ] - }, - "GetFirewallEndpointAssociation": { - "methods": [ - "getFirewallEndpointAssociation" - ] - }, - "ListFirewallEndpointAssociations": { - "methods": [ - "listFirewallEndpointAssociations" - ] - }, - "ListFirewallEndpoints": { - "methods": [ - "listFirewallEndpoints" - ] - }, - "UpdateFirewallEndpoint": { - "methods": [ - "updateFirewallEndpoint" - ] - }, - "UpdateFirewallEndpointAssociation": { - "methods": [ - "updateFirewallEndpointAssociation" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "Intercept": { - "clients": { - "grpc": { - "libraryClient": "InterceptGapicClient", - "rpcs": { - "CreateInterceptDeployment": { - "methods": [ - "createInterceptDeployment" - ] - }, - "CreateInterceptDeploymentGroup": { - "methods": [ - "createInterceptDeploymentGroup" - ] - }, - "CreateInterceptEndpointGroup": { - "methods": [ - "createInterceptEndpointGroup" - ] - }, - "CreateInterceptEndpointGroupAssociation": { - "methods": [ - "createInterceptEndpointGroupAssociation" - ] - }, - "DeleteInterceptDeployment": { - "methods": [ - "deleteInterceptDeployment" - ] - }, - "DeleteInterceptDeploymentGroup": { - "methods": [ - "deleteInterceptDeploymentGroup" - ] - }, - "DeleteInterceptEndpointGroup": { - "methods": [ - "deleteInterceptEndpointGroup" - ] - }, - "DeleteInterceptEndpointGroupAssociation": { - "methods": [ - "deleteInterceptEndpointGroupAssociation" - ] - }, - "GetInterceptDeployment": { - "methods": [ - "getInterceptDeployment" - ] - }, - "GetInterceptDeploymentGroup": { - "methods": [ - "getInterceptDeploymentGroup" - ] - }, - "GetInterceptEndpointGroup": { - "methods": [ - "getInterceptEndpointGroup" - ] - }, - "GetInterceptEndpointGroupAssociation": { - "methods": [ - "getInterceptEndpointGroupAssociation" - ] - }, - "ListInterceptDeploymentGroups": { - "methods": [ - "listInterceptDeploymentGroups" - ] - }, - "ListInterceptDeployments": { - "methods": [ - "listInterceptDeployments" - ] - }, - "ListInterceptEndpointGroupAssociations": { - "methods": [ - "listInterceptEndpointGroupAssociations" - ] - }, - "ListInterceptEndpointGroups": { - "methods": [ - "listInterceptEndpointGroups" - ] - }, - "UpdateInterceptDeployment": { - "methods": [ - "updateInterceptDeployment" - ] - }, - "UpdateInterceptDeploymentGroup": { - "methods": [ - "updateInterceptDeploymentGroup" - ] - }, - "UpdateInterceptEndpointGroup": { - "methods": [ - "updateInterceptEndpointGroup" - ] - }, - "UpdateInterceptEndpointGroupAssociation": { - "methods": [ - "updateInterceptEndpointGroupAssociation" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "Mirroring": { - "clients": { - "grpc": { - "libraryClient": "MirroringGapicClient", - "rpcs": { - "CreateMirroringDeployment": { - "methods": [ - "createMirroringDeployment" - ] - }, - "CreateMirroringDeploymentGroup": { - "methods": [ - "createMirroringDeploymentGroup" - ] - }, - "CreateMirroringEndpointGroup": { - "methods": [ - "createMirroringEndpointGroup" - ] - }, - "CreateMirroringEndpointGroupAssociation": { - "methods": [ - "createMirroringEndpointGroupAssociation" - ] - }, - "DeleteMirroringDeployment": { - "methods": [ - "deleteMirroringDeployment" - ] - }, - "DeleteMirroringDeploymentGroup": { - "methods": [ - "deleteMirroringDeploymentGroup" - ] - }, - "DeleteMirroringEndpointGroup": { - "methods": [ - "deleteMirroringEndpointGroup" - ] - }, - "DeleteMirroringEndpointGroupAssociation": { - "methods": [ - "deleteMirroringEndpointGroupAssociation" - ] - }, - "GetMirroringDeployment": { - "methods": [ - "getMirroringDeployment" - ] - }, - "GetMirroringDeploymentGroup": { - "methods": [ - "getMirroringDeploymentGroup" - ] - }, - "GetMirroringEndpointGroup": { - "methods": [ - "getMirroringEndpointGroup" - ] - }, - "GetMirroringEndpointGroupAssociation": { - "methods": [ - "getMirroringEndpointGroupAssociation" - ] - }, - "ListMirroringDeploymentGroups": { - "methods": [ - "listMirroringDeploymentGroups" - ] - }, - "ListMirroringDeployments": { - "methods": [ - "listMirroringDeployments" - ] - }, - "ListMirroringEndpointGroupAssociations": { - "methods": [ - "listMirroringEndpointGroupAssociations" - ] - }, - "ListMirroringEndpointGroups": { - "methods": [ - "listMirroringEndpointGroups" - ] - }, - "UpdateMirroringDeployment": { - "methods": [ - "updateMirroringDeployment" - ] - }, - "UpdateMirroringDeploymentGroup": { - "methods": [ - "updateMirroringDeploymentGroup" - ] - }, - "UpdateMirroringEndpointGroup": { - "methods": [ - "updateMirroringEndpointGroup" - ] - }, - "UpdateMirroringEndpointGroupAssociation": { - "methods": [ - "updateMirroringEndpointGroupAssociation" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "NetworkSecurity": { - "clients": { - "grpc": { - "libraryClient": "NetworkSecurityGapicClient", - "rpcs": { - "CreateAuthorizationPolicy": { - "methods": [ - "createAuthorizationPolicy" - ] - }, - "CreateAuthzPolicy": { - "methods": [ - "createAuthzPolicy" - ] - }, - "CreateBackendAuthenticationConfig": { - "methods": [ - "createBackendAuthenticationConfig" - ] - }, - "CreateClientTlsPolicy": { - "methods": [ - "createClientTlsPolicy" - ] - }, - "CreateGatewaySecurityPolicy": { - "methods": [ - "createGatewaySecurityPolicy" - ] - }, - "CreateGatewaySecurityPolicyRule": { - "methods": [ - "createGatewaySecurityPolicyRule" - ] - }, - "CreateServerTlsPolicy": { - "methods": [ - "createServerTlsPolicy" - ] - }, - "CreateTlsInspectionPolicy": { - "methods": [ - "createTlsInspectionPolicy" - ] - }, - "CreateUrlList": { - "methods": [ - "createUrlList" - ] - }, - "DeleteAuthorizationPolicy": { - "methods": [ - "deleteAuthorizationPolicy" - ] - }, - "DeleteAuthzPolicy": { - "methods": [ - "deleteAuthzPolicy" - ] - }, - "DeleteBackendAuthenticationConfig": { - "methods": [ - "deleteBackendAuthenticationConfig" - ] - }, - "DeleteClientTlsPolicy": { - "methods": [ - "deleteClientTlsPolicy" - ] - }, - "DeleteGatewaySecurityPolicy": { - "methods": [ - "deleteGatewaySecurityPolicy" - ] - }, - "DeleteGatewaySecurityPolicyRule": { - "methods": [ - "deleteGatewaySecurityPolicyRule" - ] - }, - "DeleteServerTlsPolicy": { - "methods": [ - "deleteServerTlsPolicy" - ] - }, - "DeleteTlsInspectionPolicy": { - "methods": [ - "deleteTlsInspectionPolicy" - ] - }, - "DeleteUrlList": { - "methods": [ - "deleteUrlList" - ] - }, - "GetAuthorizationPolicy": { - "methods": [ - "getAuthorizationPolicy" - ] - }, - "GetAuthzPolicy": { - "methods": [ - "getAuthzPolicy" - ] - }, - "GetBackendAuthenticationConfig": { - "methods": [ - "getBackendAuthenticationConfig" - ] - }, - "GetClientTlsPolicy": { - "methods": [ - "getClientTlsPolicy" - ] - }, - "GetGatewaySecurityPolicy": { - "methods": [ - "getGatewaySecurityPolicy" - ] - }, - "GetGatewaySecurityPolicyRule": { - "methods": [ - "getGatewaySecurityPolicyRule" - ] - }, - "GetServerTlsPolicy": { - "methods": [ - "getServerTlsPolicy" - ] - }, - "GetTlsInspectionPolicy": { - "methods": [ - "getTlsInspectionPolicy" - ] - }, - "GetUrlList": { - "methods": [ - "getUrlList" - ] - }, - "ListAuthorizationPolicies": { - "methods": [ - "listAuthorizationPolicies" - ] - }, - "ListAuthzPolicies": { - "methods": [ - "listAuthzPolicies" - ] - }, - "ListBackendAuthenticationConfigs": { - "methods": [ - "listBackendAuthenticationConfigs" - ] - }, - "ListClientTlsPolicies": { - "methods": [ - "listClientTlsPolicies" - ] - }, - "ListGatewaySecurityPolicies": { - "methods": [ - "listGatewaySecurityPolicies" - ] - }, - "ListGatewaySecurityPolicyRules": { - "methods": [ - "listGatewaySecurityPolicyRules" - ] - }, - "ListServerTlsPolicies": { - "methods": [ - "listServerTlsPolicies" - ] - }, - "ListTlsInspectionPolicies": { - "methods": [ - "listTlsInspectionPolicies" - ] - }, - "ListUrlLists": { - "methods": [ - "listUrlLists" - ] - }, - "UpdateAuthorizationPolicy": { - "methods": [ - "updateAuthorizationPolicy" - ] - }, - "UpdateAuthzPolicy": { - "methods": [ - "updateAuthzPolicy" - ] - }, - "UpdateBackendAuthenticationConfig": { - "methods": [ - "updateBackendAuthenticationConfig" - ] - }, - "UpdateClientTlsPolicy": { - "methods": [ - "updateClientTlsPolicy" - ] - }, - "UpdateGatewaySecurityPolicy": { - "methods": [ - "updateGatewaySecurityPolicy" - ] - }, - "UpdateGatewaySecurityPolicyRule": { - "methods": [ - "updateGatewaySecurityPolicyRule" - ] - }, - "UpdateServerTlsPolicy": { - "methods": [ - "updateServerTlsPolicy" - ] - }, - "UpdateTlsInspectionPolicy": { - "methods": [ - "updateTlsInspectionPolicy" - ] - }, - "UpdateUrlList": { - "methods": [ - "updateUrlList" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "OrganizationSecurityProfileGroupService": { - "clients": { - "grpc": { - "libraryClient": "OrganizationSecurityProfileGroupServiceGapicClient", - "rpcs": { - "CreateSecurityProfile": { - "methods": [ - "createSecurityProfile" - ] - }, - "CreateSecurityProfileGroup": { - "methods": [ - "createSecurityProfileGroup" - ] - }, - "DeleteSecurityProfile": { - "methods": [ - "deleteSecurityProfile" - ] - }, - "DeleteSecurityProfileGroup": { - "methods": [ - "deleteSecurityProfileGroup" - ] - }, - "GetSecurityProfile": { - "methods": [ - "getSecurityProfile" - ] - }, - "GetSecurityProfileGroup": { - "methods": [ - "getSecurityProfileGroup" - ] - }, - "ListSecurityProfileGroups": { - "methods": [ - "listSecurityProfileGroups" - ] - }, - "ListSecurityProfiles": { - "methods": [ - "listSecurityProfiles" - ] - }, - "UpdateSecurityProfile": { - "methods": [ - "updateSecurityProfile" - ] - }, - "UpdateSecurityProfileGroup": { - "methods": [ - "updateSecurityProfileGroup" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json deleted file mode 100644 index 844d42f4b5db..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_client_config.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "interfaces": { - "google.cloud.networksecurity.v1.AddressGroupService": { - "retry_codes": { - "no_retry_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 - } - }, - "methods": { - "AddAddressGroupItems": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CloneAddressGroupItems": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAddressGroupReferences": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAddressGroups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RemoveAddressGroupItems": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_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" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php deleted file mode 100644 index 9b39d53c5bac..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_descriptor_config.php +++ /dev/null @@ -1,275 +0,0 @@ - [ - 'google.cloud.networksecurity.v1.AddressGroupService' => [ - 'AddAddressGroupItems' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CloneAddressGroupItems' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CreateAddressGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAddressGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RemoveAddressGroupItems' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'UpdateAddressGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group.name', - 'fieldAccessors' => [ - 'getAddressGroup', - 'getName', - ], - ], - ], - ], - 'GetAddressGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAddressGroupReferences' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAddressGroupReferences', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse', - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'ListAddressGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAddressGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupsResponse', - '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', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'addressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationAddressGroup' => 'organizations/{organization}/locations/{location}/addressGroups/{address_group}', - 'projectLocationAddressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php deleted file mode 100644 index 34e343d4d2cb..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/address_group_service_rest_client_config.php +++ /dev/null @@ -1,358 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networksecurity.v1.AddressGroupService' => [ - 'AddAddressGroupItems' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:addItems', - 'body' => '*', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CloneAddressGroupItems' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:cloneItems', - 'body' => '*', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CreateAddressGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/addressGroups', - 'body' => 'address_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'address_group_id', - ], - ], - 'DeleteAddressGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/addressGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAddressGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/addressGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAddressGroupReferences' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:listReferences', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'ListAddressGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/addressGroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveAddressGroupItems' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{address_group=projects/*/locations/*/addressGroups/*}:removeItems', - 'body' => '*', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'UpdateAddressGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{address_group.name=projects/*/locations/*/addressGroups/*}', - 'body' => 'address_group', - 'placeholders' => [ - 'address_group.name' => [ - 'getters' => [ - 'getAddressGroup', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json deleted file mode 100644 index 69d95d98d336..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "interfaces": { - "google.cloud.networksecurity.v1.NetworkSecurity": { - "retry_codes": { - "no_retry_codes": [], - "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 - }, - "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": { - "CreateAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAuthzPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateBackendAuthenticationConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateGatewaySecurityPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateGatewaySecurityPolicyRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTlsInspectionPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateUrlList": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAuthzPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackendAuthenticationConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGatewaySecurityPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGatewaySecurityPolicyRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTlsInspectionPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteUrlList": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuthzPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackendAuthenticationConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGatewaySecurityPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGatewaySecurityPolicyRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetTlsInspectionPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetUrlList": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListAuthorizationPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListAuthzPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListBackendAuthenticationConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListClientTlsPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListGatewaySecurityPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListGatewaySecurityPolicyRules": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListServerTlsPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListTlsInspectionPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListUrlLists": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAuthzPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateBackendAuthenticationConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateGatewaySecurityPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateGatewaySecurityPolicyRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTlsInspectionPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateUrlList": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php deleted file mode 100644 index 64c90a58a14c..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php +++ /dev/null @@ -1,926 +0,0 @@ - [ - 'google.cloud.networksecurity.v1.NetworkSecurity' => [ - 'CreateAuthorizationPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAuthzPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthzPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackendAuthenticationConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateClientTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGatewaySecurityPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGatewaySecurityPolicyRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateServerTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTlsInspectionPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUrlList' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\UrlList', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAuthorizationPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAuthzPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackendAuthenticationConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteClientTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGatewaySecurityPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGatewaySecurityPolicyRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServerTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTlsInspectionPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUrlList' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAuthorizationPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'authorization_policy.name', - 'fieldAccessors' => [ - 'getAuthorizationPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateAuthzPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthzPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'authz_policy.name', - 'fieldAccessors' => [ - 'getAuthzPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateBackendAuthenticationConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'backend_authentication_config.name', - 'fieldAccessors' => [ - 'getBackendAuthenticationConfig', - 'getName', - ], - ], - ], - ], - 'UpdateClientTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'client_tls_policy.name', - 'fieldAccessors' => [ - 'getClientTlsPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateGatewaySecurityPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'gateway_security_policy.name', - 'fieldAccessors' => [ - 'getGatewaySecurityPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateGatewaySecurityPolicyRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'gateway_security_policy_rule.name', - 'fieldAccessors' => [ - 'getGatewaySecurityPolicyRule', - 'getName', - ], - ], - ], - ], - 'UpdateServerTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'server_tls_policy.name', - 'fieldAccessors' => [ - 'getServerTlsPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateTlsInspectionPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'tls_inspection_policy.name', - 'fieldAccessors' => [ - 'getTlsInspectionPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateUrlList' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\UrlList', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'url_list.name', - 'fieldAccessors' => [ - 'getUrlList', - 'getName', - ], - ], - ], - ], - 'GetAuthorizationPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthzPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthzPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackendAuthenticationConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\BackendAuthenticationConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetClientTlsPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGatewaySecurityPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGatewaySecurityPolicyRule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\GatewaySecurityPolicyRule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetServerTlsPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTlsInspectionPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\TlsInspectionPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUrlList' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\UrlList', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAuthorizationPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAuthorizationPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAuthzPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAuthzPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAuthzPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackendAuthenticationConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackendAuthenticationConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListBackendAuthenticationConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListClientTlsPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClientTlsPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGatewaySecurityPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGatewaySecurityPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGatewaySecurityPolicyRules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGatewaySecurityPolicyRules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListGatewaySecurityPolicyRulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListServerTlsPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServerTlsPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTlsInspectionPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTlsInspectionPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListTlsInspectionPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUrlLists' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getUrlLists', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListUrlListsResponse', - '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', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'authorizationPolicy' => 'projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}', - 'authzPolicy' => 'projects/{project}/locations/{location}/authzPolicies/{authz_policy}', - 'backendAuthenticationConfig' => 'projects/{project}/locations/{location}/backendAuthenticationConfigs/{backend_authentication_config}', - 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', - 'certificate' => 'projects/{project}/locations/{location}/certificates/{certificate}', - 'clientTlsPolicy' => 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}', - 'gatewaySecurityPolicy' => 'projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}', - 'gatewaySecurityPolicyRule' => 'projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}', - 'location' => 'projects/{project}/locations/{location}', - 'serverTlsPolicy' => 'projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}', - 'tlsInspectionPolicy' => 'projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}', - 'trustConfig' => 'projects/{project}/locations/{location}/trustConfigs/{trust_config}', - 'urlList' => 'projects/{project}/locations/{location}/urlLists/{url_list}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php deleted file mode 100644 index 36f7a0b2ef40..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php +++ /dev/null @@ -1,799 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networksecurity.v1.NetworkSecurity' => [ - 'CreateAuthorizationPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', - 'body' => 'authorization_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'authorization_policy_id', - ], - ], - 'CreateAuthzPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authzPolicies', - 'body' => 'authz_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'authz_policy_id', - ], - ], - 'CreateBackendAuthenticationConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs', - 'body' => 'backend_authentication_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backend_authentication_config_id', - ], - ], - 'CreateClientTlsPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', - 'body' => 'client_tls_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'client_tls_policy_id', - ], - ], - 'CreateGatewaySecurityPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies', - 'body' => 'gateway_security_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'gateway_security_policy_id', - ], - ], - 'CreateGatewaySecurityPolicyRule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules', - 'body' => 'gateway_security_policy_rule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateServerTlsPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', - 'body' => 'server_tls_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'server_tls_policy_id', - ], - ], - 'CreateTlsInspectionPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies', - 'body' => 'tls_inspection_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'tls_inspection_policy_id', - ], - ], - 'CreateUrlList' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/urlLists', - 'body' => 'url_list', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'url_list_id', - ], - ], - 'DeleteAuthorizationPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAuthzPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/authzPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackendAuthenticationConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteClientTlsPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGatewaySecurityPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGatewaySecurityPolicyRule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServerTlsPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTlsInspectionPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUrlList' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/urlLists/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthorizationPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthzPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/authzPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackendAuthenticationConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backendAuthenticationConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetClientTlsPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGatewaySecurityPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGatewaySecurityPolicyRule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetServerTlsPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTlsInspectionPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsInspectionPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUrlList' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/urlLists/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAuthorizationPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAuthzPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authzPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackendAuthenticationConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backendAuthenticationConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListClientTlsPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGatewaySecurityPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gatewaySecurityPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGatewaySecurityPolicyRules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gatewaySecurityPolicies/*}/rules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListServerTlsPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTlsInspectionPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsInspectionPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListUrlLists' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/urlLists', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAuthorizationPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}', - 'body' => 'authorization_policy', - 'placeholders' => [ - 'authorization_policy.name' => [ - 'getters' => [ - 'getAuthorizationPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateAuthzPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{authz_policy.name=projects/*/locations/*/authzPolicies/*}', - 'body' => 'authz_policy', - 'placeholders' => [ - 'authz_policy.name' => [ - 'getters' => [ - 'getAuthzPolicy', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateBackendAuthenticationConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backend_authentication_config.name=projects/*/locations/*/backendAuthenticationConfigs/*}', - 'body' => 'backend_authentication_config', - 'placeholders' => [ - 'backend_authentication_config.name' => [ - 'getters' => [ - 'getBackendAuthenticationConfig', - 'getName', - ], - ], - ], - ], - 'UpdateClientTlsPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}', - 'body' => 'client_tls_policy', - 'placeholders' => [ - 'client_tls_policy.name' => [ - 'getters' => [ - 'getClientTlsPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateGatewaySecurityPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{gateway_security_policy.name=projects/*/locations/*/gatewaySecurityPolicies/*}', - 'body' => 'gateway_security_policy', - 'placeholders' => [ - 'gateway_security_policy.name' => [ - 'getters' => [ - 'getGatewaySecurityPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateGatewaySecurityPolicyRule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{gateway_security_policy_rule.name=projects/*/locations/*/gatewaySecurityPolicies/*/rules/*}', - 'body' => 'gateway_security_policy_rule', - 'placeholders' => [ - 'gateway_security_policy_rule.name' => [ - 'getters' => [ - 'getGatewaySecurityPolicyRule', - 'getName', - ], - ], - ], - ], - 'UpdateServerTlsPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}', - 'body' => 'server_tls_policy', - 'placeholders' => [ - 'server_tls_policy.name' => [ - 'getters' => [ - 'getServerTlsPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateTlsInspectionPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tls_inspection_policy.name=projects/*/locations/*/tlsInspectionPolicies/*}', - 'body' => 'tls_inspection_policy', - 'placeholders' => [ - 'tls_inspection_policy.name' => [ - 'getters' => [ - 'getTlsInspectionPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateUrlList' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{url_list.name=projects/*/locations/*/urlLists/*}', - 'body' => 'url_list', - 'placeholders' => [ - 'url_list.name' => [ - 'getters' => [ - 'getUrlList', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json deleted file mode 100644 index 092d7cf36101..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_client_config.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "interfaces": { - "google.cloud.networksecurity.v1.OrganizationAddressGroupService": { - "retry_codes": { - "no_retry_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 - } - }, - "methods": { - "AddAddressGroupItems": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CloneAddressGroupItems": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAddressGroupReferences": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAddressGroups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RemoveAddressGroupItems": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateAddressGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_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" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php deleted file mode 100644 index e1513495ea6d..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_descriptor_config.php +++ /dev/null @@ -1,275 +0,0 @@ - [ - 'google.cloud.networksecurity.v1.OrganizationAddressGroupService' => [ - 'AddAddressGroupItems' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CloneAddressGroupItems' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CreateAddressGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAddressGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RemoveAddressGroupItems' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'UpdateAddressGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'address_group.name', - 'fieldAccessors' => [ - 'getAddressGroup', - 'getName', - ], - ], - ], - ], - 'GetAddressGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AddressGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAddressGroupReferences' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAddressGroupReferences', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupReferencesResponse', - 'headerParams' => [ - [ - 'keyName' => 'address_group', - 'fieldAccessors' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'ListAddressGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAddressGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAddressGroupsResponse', - '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', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'addressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationAddressGroup' => 'organizations/{organization}/locations/{location}/addressGroups/{address_group}', - 'projectLocationAddressGroup' => 'projects/{project}/locations/{location}/addressGroups/{address_group}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php deleted file mode 100644 index 5500e9739c7e..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/organization_address_group_service_rest_client_config.php +++ /dev/null @@ -1,358 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networksecurity.v1.OrganizationAddressGroupService' => [ - 'AddAddressGroupItems' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:addItems', - 'body' => '*', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CloneAddressGroupItems' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:cloneItems', - 'body' => '*', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'CreateAddressGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/addressGroups', - 'body' => 'address_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'address_group_id', - ], - ], - 'DeleteAddressGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/addressGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAddressGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/addressGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAddressGroupReferences' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:listReferences', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'ListAddressGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/addressGroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveAddressGroupItems' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{address_group=organizations/*/locations/*/addressGroups/*}:removeItems', - 'body' => '*', - 'placeholders' => [ - 'address_group' => [ - 'getters' => [ - 'getAddressGroup', - ], - ], - ], - ], - 'UpdateAddressGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{address_group.name=organizations/*/locations/*/addressGroups/*}', - 'body' => 'address_group', - 'placeholders' => [ - 'address_group.name' => [ - 'getters' => [ - 'getAddressGroup', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/locations/*/addressGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php deleted file mode 100644 index 525ac6278695..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/AddressGroupServiceClientTest.php +++ /dev/null @@ -1,1528 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AddressGroupServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AddressGroupServiceClient($options); - } - - /** @test */ - public function addAddressGroupItemsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new AddAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->addAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/AddAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getItems(); - $this->assertProtobufEquals($items, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function addAddressGroupItemsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new AddAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->addAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cloneAddressGroupItemsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cloneAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new CloneAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setSourceAddressGroup($formattedSourceAddressGroup); - $response = $gapicClient->cloneAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/CloneAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getSourceAddressGroup(); - $this->assertProtobufEquals($formattedSourceAddressGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cloneAddressGroupItemsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new CloneAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setSourceAddressGroup($formattedSourceAddressGroup); - $response = $gapicClient->cloneAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAddressGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAddressGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $addressGroupId = 'addressGroupId-816169274'; - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new CreateAddressGroupRequest()) - ->setParent($formattedParent) - ->setAddressGroupId($addressGroupId) - ->setAddressGroup($addressGroup); - $response = $gapicClient->createAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/CreateAddressGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAddressGroupId(); - $this->assertProtobufEquals($addressGroupId, $actualValue); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($addressGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAddressGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $addressGroupId = 'addressGroupId-816169274'; - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new CreateAddressGroupRequest()) - ->setParent($formattedParent) - ->setAddressGroupId($addressGroupId) - ->setAddressGroup($addressGroup); - $response = $gapicClient->createAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAddressGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAddressGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new DeleteAddressGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/DeleteAddressGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAddressGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new DeleteAddressGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAddressGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new GetAddressGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getAddressGroup($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.networksecurity.v1.AddressGroupService/GetAddressGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAddressGroupExceptionTest() - { - $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->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new GetAddressGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getAddressGroup($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 listAddressGroupReferencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $addressGroupReferencesElement = new AddressGroupReference(); - $addressGroupReferences = [ - $addressGroupReferencesElement, - ]; - $expectedResponse = new ListAddressGroupReferencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAddressGroupReferences($addressGroupReferences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new ListAddressGroupReferencesRequest()) - ->setAddressGroup($formattedAddressGroup); - $response = $gapicClient->listAddressGroupReferences($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAddressGroupReferences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/ListAddressGroupReferences', $actualFuncCall); - $actualValue = $actualRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAddressGroupReferencesExceptionTest() - { - $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 - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new ListAddressGroupReferencesRequest()) - ->setAddressGroup($formattedAddressGroup); - try { - $gapicClient->listAddressGroupReferences($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 listAddressGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $addressGroupsElement = new AddressGroup(); - $addressGroups = [ - $addressGroupsElement, - ]; - $expectedResponse = new ListAddressGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAddressGroups($addressGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAddressGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAddressGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAddressGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/ListAddressGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAddressGroupsExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAddressGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAddressGroups($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 removeAddressGroupItemsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new RemoveAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->removeAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/RemoveAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getItems(); - $this->assertProtobufEquals($items, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeAddressGroupItemsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new RemoveAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->removeAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAddressGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAddressGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new UpdateAddressGroupRequest()) - ->setAddressGroup($addressGroup); - $response = $gapicClient->updateAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/UpdateAddressGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($addressGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAddressGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new UpdateAddressGroupRequest()) - ->setAddressGroup($addressGroup); - $response = $gapicClient->updateAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($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 addAddressGroupItemsAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new AddAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->addAddressGroupItemsAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.AddressGroupService/AddAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getItems(); - $this->assertProtobufEquals($items, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php deleted file mode 100644 index 16f3114a89fc..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php +++ /dev/null @@ -1,5477 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NetworkSecurityClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NetworkSecurityClient($options); - } - - /** @test */ - public function createAuthorizationPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = 'authorizationPolicyId-730349822'; - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->createAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); - $this->assertProtobufEquals($authorizationPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); - $this->assertProtobufEquals($authorizationPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAuthorizationPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = 'authorizationPolicyId-730349822'; - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->createAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAuthzPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthzPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthzPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAuthzPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authzPolicyId = 'authzPolicyId148183835'; - $authzPolicy = new AuthzPolicy(); - $authzPolicyName = 'authzPolicyName1154629711'; - $authzPolicy->setName($authzPolicyName); - $authzPolicyTarget = new Target(); - $targetResources = []; - $authzPolicyTarget->setResources($targetResources); - $authzPolicy->setTarget($authzPolicyTarget); - $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; - $authzPolicy->setAction($authzPolicyAction); - $request = (new CreateAuthzPolicyRequest()) - ->setParent($formattedParent) - ->setAuthzPolicyId($authzPolicyId) - ->setAuthzPolicy($authzPolicy); - $response = $gapicClient->createAuthzPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthzPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAuthzPolicyId(); - $this->assertProtobufEquals($authzPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getAuthzPolicy(); - $this->assertProtobufEquals($authzPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthzPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAuthzPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthzPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authzPolicyId = 'authzPolicyId148183835'; - $authzPolicy = new AuthzPolicy(); - $authzPolicyName = 'authzPolicyName1154629711'; - $authzPolicy->setName($authzPolicyName); - $authzPolicyTarget = new Target(); - $targetResources = []; - $authzPolicyTarget->setResources($targetResources); - $authzPolicy->setTarget($authzPolicyTarget); - $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; - $authzPolicy->setAction($authzPolicyAction); - $request = (new CreateAuthzPolicyRequest()) - ->setParent($formattedParent) - ->setAuthzPolicyId($authzPolicyId) - ->setAuthzPolicy($authzPolicy); - $response = $gapicClient->createAuthzPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthzPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackendAuthenticationConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackendAuthenticationConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $clientCertificate = 'clientCertificate1953512227'; - $trustConfig = 'trustConfig1834807049'; - $etag = 'etag3123477'; - $expectedResponse = new BackendAuthenticationConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setClientCertificate($clientCertificate); - $expectedResponse->setTrustConfig($trustConfig); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackendAuthenticationConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backendAuthenticationConfigId = 'backendAuthenticationConfigId-1658023556'; - $backendAuthenticationConfig = new BackendAuthenticationConfig(); - $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; - $backendAuthenticationConfig->setName($backendAuthenticationConfigName); - $request = (new CreateBackendAuthenticationConfigRequest()) - ->setParent($formattedParent) - ->setBackendAuthenticationConfigId($backendAuthenticationConfigId) - ->setBackendAuthenticationConfig($backendAuthenticationConfig); - $response = $gapicClient->createBackendAuthenticationConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateBackendAuthenticationConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackendAuthenticationConfigId(); - $this->assertProtobufEquals($backendAuthenticationConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getBackendAuthenticationConfig(); - $this->assertProtobufEquals($backendAuthenticationConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackendAuthenticationConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackendAuthenticationConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackendAuthenticationConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backendAuthenticationConfigId = 'backendAuthenticationConfigId-1658023556'; - $backendAuthenticationConfig = new BackendAuthenticationConfig(); - $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; - $backendAuthenticationConfig->setName($backendAuthenticationConfigName); - $request = (new CreateBackendAuthenticationConfigRequest()) - ->setParent($formattedParent) - ->setBackendAuthenticationConfigId($backendAuthenticationConfigId) - ->setBackendAuthenticationConfig($backendAuthenticationConfig); - $response = $gapicClient->createBackendAuthenticationConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackendAuthenticationConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClientTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClientTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = 'clientTlsPolicyId244525968'; - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) - ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->createClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClientTlsPolicyId(); - $this->assertProtobufEquals($clientTlsPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getClientTlsPolicy(); - $this->assertProtobufEquals($clientTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClientTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = 'clientTlsPolicyId244525968'; - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) - ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->createClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGatewaySecurityPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGatewaySecurityPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; - $expectedResponse = new GatewaySecurityPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGatewaySecurityPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $gatewaySecurityPolicyId = 'gatewaySecurityPolicyId-1291912476'; - $gatewaySecurityPolicy = new GatewaySecurityPolicy(); - $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; - $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); - $request = (new CreateGatewaySecurityPolicyRequest()) - ->setParent($formattedParent) - ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId) - ->setGatewaySecurityPolicy($gatewaySecurityPolicy); - $response = $gapicClient->createGatewaySecurityPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateGatewaySecurityPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyId(); - $this->assertProtobufEquals($gatewaySecurityPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getGatewaySecurityPolicy(); - $this->assertProtobufEquals($gatewaySecurityPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGatewaySecurityPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGatewaySecurityPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $gatewaySecurityPolicyId = 'gatewaySecurityPolicyId-1291912476'; - $gatewaySecurityPolicy = new GatewaySecurityPolicy(); - $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; - $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); - $request = (new CreateGatewaySecurityPolicyRequest()) - ->setParent($formattedParent) - ->setGatewaySecurityPolicyId($gatewaySecurityPolicyId) - ->setGatewaySecurityPolicy($gatewaySecurityPolicy); - $response = $gapicClient->createGatewaySecurityPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGatewaySecurityPolicyRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $enabled = false; - $priority = 1165461084; - $description = 'description-1724546052'; - $sessionMatcher = 'sessionMatcher-2055881591'; - $applicationMatcher = 'applicationMatcher-488643261'; - $tlsInspectionEnabled = true; - $expectedResponse = new GatewaySecurityPolicyRule(); - $expectedResponse->setName($name); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setPriority($priority); - $expectedResponse->setDescription($description); - $expectedResponse->setSessionMatcher($sessionMatcher); - $expectedResponse->setApplicationMatcher($applicationMatcher); - $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); - $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; - $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); - $gatewaySecurityPolicyRuleEnabled = false; - $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); - $gatewaySecurityPolicyRulePriority = 797716438; - $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); - $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; - $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); - $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; - $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); - $request = (new CreateGatewaySecurityPolicyRuleRequest()) - ->setParent($formattedParent) - ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); - $response = $gapicClient->createGatewaySecurityPolicyRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateGatewaySecurityPolicyRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyRule(); - $this->assertProtobufEquals($gatewaySecurityPolicyRule, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyRuleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGatewaySecurityPolicyRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGatewaySecurityPolicyRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); - $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; - $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); - $gatewaySecurityPolicyRuleEnabled = false; - $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); - $gatewaySecurityPolicyRulePriority = 797716438; - $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); - $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; - $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); - $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; - $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); - $request = (new CreateGatewaySecurityPolicyRuleRequest()) - ->setParent($formattedParent) - ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); - $response = $gapicClient->createGatewaySecurityPolicyRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGatewaySecurityPolicyRuleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServerTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createServerTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) - ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->createServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getServerTlsPolicyId(); - $this->assertProtobufEquals($serverTlsPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getServerTlsPolicy(); - $this->assertProtobufEquals($serverTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServerTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) - ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->createServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTlsInspectionPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTlsInspectionPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $caPool = 'caPool536760157'; - $trustConfig = 'trustConfig1834807049'; - $excludePublicCaSet = true; - $expectedResponse = new TlsInspectionPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCaPool($caPool); - $expectedResponse->setTrustConfig($trustConfig); - $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTlsInspectionPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tlsInspectionPolicyId = 'tlsInspectionPolicyId1705280257'; - $tlsInspectionPolicy = new TlsInspectionPolicy(); - $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; - $tlsInspectionPolicy->setName($tlsInspectionPolicyName); - $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); - $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); - $request = (new CreateTlsInspectionPolicyRequest()) - ->setParent($formattedParent) - ->setTlsInspectionPolicyId($tlsInspectionPolicyId) - ->setTlsInspectionPolicy($tlsInspectionPolicy); - $response = $gapicClient->createTlsInspectionPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateTlsInspectionPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTlsInspectionPolicyId(); - $this->assertProtobufEquals($tlsInspectionPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getTlsInspectionPolicy(); - $this->assertProtobufEquals($tlsInspectionPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTlsInspectionPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTlsInspectionPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTlsInspectionPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tlsInspectionPolicyId = 'tlsInspectionPolicyId1705280257'; - $tlsInspectionPolicy = new TlsInspectionPolicy(); - $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; - $tlsInspectionPolicy->setName($tlsInspectionPolicyName); - $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); - $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); - $request = (new CreateTlsInspectionPolicyRequest()) - ->setParent($formattedParent) - ->setTlsInspectionPolicyId($tlsInspectionPolicyId) - ->setTlsInspectionPolicy($tlsInspectionPolicy); - $response = $gapicClient->createTlsInspectionPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTlsInspectionPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUrlListTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUrlListTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new UrlList(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createUrlListTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $urlListId = 'urlListId-108977780'; - $urlList = new UrlList(); - $urlListName = 'urlListName-1239061800'; - $urlList->setName($urlListName); - $urlListValues = []; - $urlList->setValues($urlListValues); - $request = (new CreateUrlListRequest()) - ->setParent($formattedParent) - ->setUrlListId($urlListId) - ->setUrlList($urlList); - $response = $gapicClient->createUrlList($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateUrlList', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getUrlListId(); - $this->assertProtobufEquals($urlListId, $actualValue); - $actualValue = $actualApiRequestObject->getUrlList(); - $this->assertProtobufEquals($urlList, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUrlListTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUrlListExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUrlListTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $urlListId = 'urlListId-108977780'; - $urlList = new UrlList(); - $urlListName = 'urlListName-1239061800'; - $urlList->setName($urlListName); - $urlListValues = []; - $urlList->setValues($urlListValues); - $request = (new CreateUrlListRequest()) - ->setParent($formattedParent) - ->setUrlListId($urlListId) - ->setUrlList($urlList); - $response = $gapicClient->createUrlList($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUrlListTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAuthorizationPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new DeleteAuthorizationPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAuthorizationPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new DeleteAuthorizationPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAuthzPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthzPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAuthzPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); - $request = (new DeleteAuthzPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAuthzPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthzPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthzPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAuthzPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthzPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); - $request = (new DeleteAuthzPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAuthzPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthzPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackendAuthenticationConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackendAuthenticationConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackendAuthenticationConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); - $request = (new DeleteBackendAuthenticationConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackendAuthenticationConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteBackendAuthenticationConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackendAuthenticationConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackendAuthenticationConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackendAuthenticationConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); - $request = (new DeleteBackendAuthenticationConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackendAuthenticationConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackendAuthenticationConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClientTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClientTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new DeleteClientTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClientTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new DeleteClientTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGatewaySecurityPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGatewaySecurityPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $request = (new DeleteGatewaySecurityPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGatewaySecurityPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteGatewaySecurityPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGatewaySecurityPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $request = (new DeleteGatewaySecurityPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGatewaySecurityPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGatewaySecurityPolicyRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); - $request = (new DeleteGatewaySecurityPolicyRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGatewaySecurityPolicyRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteGatewaySecurityPolicyRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyRuleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGatewaySecurityPolicyRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGatewaySecurityPolicyRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); - $request = (new DeleteGatewaySecurityPolicyRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGatewaySecurityPolicyRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGatewaySecurityPolicyRuleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServerTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteServerTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new DeleteServerTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServerTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new DeleteServerTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTlsInspectionPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTlsInspectionPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTlsInspectionPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); - $request = (new DeleteTlsInspectionPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTlsInspectionPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteTlsInspectionPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTlsInspectionPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTlsInspectionPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTlsInspectionPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); - $request = (new DeleteTlsInspectionPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTlsInspectionPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTlsInspectionPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteUrlListTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUrlListTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteUrlListTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); - $request = (new DeleteUrlListRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteUrlList($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteUrlList', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUrlListTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteUrlListExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUrlListTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); - $request = (new DeleteUrlListRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteUrlList($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUrlListTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAuthorizationPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new GetAuthorizationPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuthorizationPolicy($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.networksecurity.v1.NetworkSecurity/GetAuthorizationPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthorizationPolicyExceptionTest() - { - $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->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new GetAuthorizationPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuthorizationPolicy($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 getAuthzPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new AuthzPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); - $request = (new GetAuthzPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuthzPolicy($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.networksecurity.v1.NetworkSecurity/GetAuthzPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthzPolicyExceptionTest() - { - $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->authzPolicyName('[PROJECT]', '[LOCATION]', '[AUTHZ_POLICY]'); - $request = (new GetAuthzPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuthzPolicy($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 getBackendAuthenticationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $clientCertificate = 'clientCertificate1953512227'; - $trustConfig = 'trustConfig1834807049'; - $etag = 'etag3123477'; - $expectedResponse = new BackendAuthenticationConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setClientCertificate($clientCertificate); - $expectedResponse->setTrustConfig($trustConfig); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); - $request = (new GetBackendAuthenticationConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackendAuthenticationConfig($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.networksecurity.v1.NetworkSecurity/GetBackendAuthenticationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackendAuthenticationConfigExceptionTest() - { - $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->backendAuthenticationConfigName('[PROJECT]', '[LOCATION]', '[BACKEND_AUTHENTICATION_CONFIG]'); - $request = (new GetBackendAuthenticationConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackendAuthenticationConfig($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 getClientTlsPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new GetClientTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getClientTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetClientTlsPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClientTlsPolicyExceptionTest() - { - $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->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new GetClientTlsPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getClientTlsPolicy($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 getGatewaySecurityPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; - $expectedResponse = new GatewaySecurityPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $request = (new GetGatewaySecurityPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getGatewaySecurityPolicy($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.networksecurity.v1.NetworkSecurity/GetGatewaySecurityPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGatewaySecurityPolicyExceptionTest() - { - $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->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $request = (new GetGatewaySecurityPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getGatewaySecurityPolicy($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 getGatewaySecurityPolicyRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $enabled = false; - $priority = 1165461084; - $description = 'description-1724546052'; - $sessionMatcher = 'sessionMatcher-2055881591'; - $applicationMatcher = 'applicationMatcher-488643261'; - $tlsInspectionEnabled = true; - $expectedResponse = new GatewaySecurityPolicyRule(); - $expectedResponse->setName($name2); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setPriority($priority); - $expectedResponse->setDescription($description); - $expectedResponse->setSessionMatcher($sessionMatcher); - $expectedResponse->setApplicationMatcher($applicationMatcher); - $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); - $request = (new GetGatewaySecurityPolicyRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getGatewaySecurityPolicyRule($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.networksecurity.v1.NetworkSecurity/GetGatewaySecurityPolicyRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGatewaySecurityPolicyRuleExceptionTest() - { - $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->gatewaySecurityPolicyRuleName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]', '[RULE]'); - $request = (new GetGatewaySecurityPolicyRuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getGatewaySecurityPolicyRule($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 getServerTlsPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new GetServerTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getServerTlsPolicy($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.networksecurity.v1.NetworkSecurity/GetServerTlsPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServerTlsPolicyExceptionTest() - { - $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->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new GetServerTlsPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getServerTlsPolicy($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 getTlsInspectionPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $caPool = 'caPool536760157'; - $trustConfig = 'trustConfig1834807049'; - $excludePublicCaSet = true; - $expectedResponse = new TlsInspectionPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCaPool($caPool); - $expectedResponse->setTrustConfig($trustConfig); - $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); - $request = (new GetTlsInspectionPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getTlsInspectionPolicy($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.networksecurity.v1.NetworkSecurity/GetTlsInspectionPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTlsInspectionPolicyExceptionTest() - { - $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->tlsInspectionPolicyName('[PROJECT]', '[LOCATION]', '[TLS_INSPECTION_POLICY]'); - $request = (new GetTlsInspectionPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getTlsInspectionPolicy($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 getUrlListTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new UrlList(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); - $request = (new GetUrlListRequest()) - ->setName($formattedName); - $response = $gapicClient->getUrlList($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.networksecurity.v1.NetworkSecurity/GetUrlList', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUrlListExceptionTest() - { - $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->urlListName('[PROJECT]', '[LOCATION]', '[URL_LIST]'); - $request = (new GetUrlListRequest()) - ->setName($formattedName); - try { - $gapicClient->getUrlList($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 listAuthorizationPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $authorizationPoliciesElement = new AuthorizationPolicy(); - $authorizationPolicies = [ - $authorizationPoliciesElement, - ]; - $expectedResponse = new ListAuthorizationPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuthorizationPolicies($authorizationPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthorizationPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAuthorizationPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuthorizationPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthorizationPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuthorizationPoliciesExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthorizationPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAuthorizationPolicies($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 listAuthzPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $authzPoliciesElement = new AuthzPolicy(); - $authzPolicies = [ - $authzPoliciesElement, - ]; - $expectedResponse = new ListAuthzPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuthzPolicies($authzPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthzPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAuthzPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuthzPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthzPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuthzPoliciesExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthzPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAuthzPolicies($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 listBackendAuthenticationConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backendAuthenticationConfigsElement = new BackendAuthenticationConfig(); - $backendAuthenticationConfigs = [ - $backendAuthenticationConfigsElement, - ]; - $expectedResponse = new ListBackendAuthenticationConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackendAuthenticationConfigs($backendAuthenticationConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackendAuthenticationConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackendAuthenticationConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackendAuthenticationConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListBackendAuthenticationConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackendAuthenticationConfigsExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackendAuthenticationConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackendAuthenticationConfigs($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 listClientTlsPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clientTlsPoliciesElement = new ClientTlsPolicy(); - $clientTlsPolicies = [ - $clientTlsPoliciesElement, - ]; - $expectedResponse = new ListClientTlsPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClientTlsPolicies($clientTlsPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientTlsPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClientTlsPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClientTlsPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListClientTlsPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClientTlsPoliciesExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientTlsPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClientTlsPolicies($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 listGatewaySecurityPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $gatewaySecurityPoliciesElement = new GatewaySecurityPolicy(); - $gatewaySecurityPolicies = [ - $gatewaySecurityPoliciesElement, - ]; - $expectedResponse = new ListGatewaySecurityPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGatewaySecurityPolicies($gatewaySecurityPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGatewaySecurityPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGatewaySecurityPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGatewaySecurityPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListGatewaySecurityPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGatewaySecurityPoliciesExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGatewaySecurityPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGatewaySecurityPolicies($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 listGatewaySecurityPolicyRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $gatewaySecurityPolicyRulesElement = new GatewaySecurityPolicyRule(); - $gatewaySecurityPolicyRules = [ - $gatewaySecurityPolicyRulesElement, - ]; - $expectedResponse = new ListGatewaySecurityPolicyRulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGatewaySecurityPolicyRules($gatewaySecurityPolicyRules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $request = (new ListGatewaySecurityPolicyRulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGatewaySecurityPolicyRules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGatewaySecurityPolicyRules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListGatewaySecurityPolicyRules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGatewaySecurityPolicyRulesExceptionTest() - { - $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->gatewaySecurityPolicyName('[PROJECT]', '[LOCATION]', '[GATEWAY_SECURITY_POLICY]'); - $request = (new ListGatewaySecurityPolicyRulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGatewaySecurityPolicyRules($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 listServerTlsPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $serverTlsPoliciesElement = new ServerTlsPolicy(); - $serverTlsPolicies = [ - $serverTlsPoliciesElement, - ]; - $expectedResponse = new ListServerTlsPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServerTlsPolicies($serverTlsPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServerTlsPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listServerTlsPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServerTlsPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListServerTlsPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServerTlsPoliciesExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServerTlsPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listServerTlsPolicies($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 listTlsInspectionPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tlsInspectionPoliciesElement = new TlsInspectionPolicy(); - $tlsInspectionPolicies = [ - $tlsInspectionPoliciesElement, - ]; - $expectedResponse = new ListTlsInspectionPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTlsInspectionPolicies($tlsInspectionPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTlsInspectionPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTlsInspectionPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTlsInspectionPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListTlsInspectionPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTlsInspectionPoliciesExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTlsInspectionPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTlsInspectionPolicies($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 listUrlListsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $urlListsElement = new UrlList(); - $urlLists = [ - $urlListsElement, - ]; - $expectedResponse = new ListUrlListsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUrlLists($urlLists); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListUrlListsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listUrlLists($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUrlLists()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListUrlLists', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUrlListsExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListUrlListsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listUrlLists($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 updateAuthorizationPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest()) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->updateAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); - $this->assertProtobufEquals($authorizationPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAuthorizationPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest()) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->updateAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAuthzPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthzPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthzPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAuthzPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $authzPolicy = new AuthzPolicy(); - $authzPolicyName = 'authzPolicyName1154629711'; - $authzPolicy->setName($authzPolicyName); - $authzPolicyTarget = new Target(); - $targetResources = []; - $authzPolicyTarget->setResources($targetResources); - $authzPolicy->setTarget($authzPolicyTarget); - $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; - $authzPolicy->setAction($authzPolicyAction); - $request = (new UpdateAuthzPolicyRequest()) - ->setUpdateMask($updateMask) - ->setAuthzPolicy($authzPolicy); - $response = $gapicClient->updateAuthzPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthzPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAuthzPolicy(); - $this->assertProtobufEquals($authzPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthzPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAuthzPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthzPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $authzPolicy = new AuthzPolicy(); - $authzPolicyName = 'authzPolicyName1154629711'; - $authzPolicy->setName($authzPolicyName); - $authzPolicyTarget = new Target(); - $targetResources = []; - $authzPolicyTarget->setResources($targetResources); - $authzPolicy->setTarget($authzPolicyTarget); - $authzPolicyAction = AuthzAction::AUTHZ_ACTION_UNSPECIFIED; - $authzPolicy->setAction($authzPolicyAction); - $request = (new UpdateAuthzPolicyRequest()) - ->setUpdateMask($updateMask) - ->setAuthzPolicy($authzPolicy); - $response = $gapicClient->updateAuthzPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthzPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackendAuthenticationConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackendAuthenticationConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $clientCertificate = 'clientCertificate1953512227'; - $trustConfig = 'trustConfig1834807049'; - $etag = 'etag3123477'; - $expectedResponse = new BackendAuthenticationConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setClientCertificate($clientCertificate); - $expectedResponse->setTrustConfig($trustConfig); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackendAuthenticationConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $backendAuthenticationConfig = new BackendAuthenticationConfig(); - $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; - $backendAuthenticationConfig->setName($backendAuthenticationConfigName); - $request = (new UpdateBackendAuthenticationConfigRequest()) - ->setBackendAuthenticationConfig($backendAuthenticationConfig); - $response = $gapicClient->updateBackendAuthenticationConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateBackendAuthenticationConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getBackendAuthenticationConfig(); - $this->assertProtobufEquals($backendAuthenticationConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackendAuthenticationConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackendAuthenticationConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackendAuthenticationConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $backendAuthenticationConfig = new BackendAuthenticationConfig(); - $backendAuthenticationConfigName = 'backendAuthenticationConfigName1025423417'; - $backendAuthenticationConfig->setName($backendAuthenticationConfigName); - $request = (new UpdateBackendAuthenticationConfigRequest()) - ->setBackendAuthenticationConfig($backendAuthenticationConfig); - $response = $gapicClient->updateBackendAuthenticationConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackendAuthenticationConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClientTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClientTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest()) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->updateClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getClientTlsPolicy(); - $this->assertProtobufEquals($clientTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClientTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest()) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->updateClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGatewaySecurityPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGatewaySecurityPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $tlsInspectionPolicy = 'tlsInspectionPolicy77909017'; - $expectedResponse = new GatewaySecurityPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setTlsInspectionPolicy($tlsInspectionPolicy); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGatewaySecurityPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $gatewaySecurityPolicy = new GatewaySecurityPolicy(); - $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; - $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); - $request = (new UpdateGatewaySecurityPolicyRequest()) - ->setGatewaySecurityPolicy($gatewaySecurityPolicy); - $response = $gapicClient->updateGatewaySecurityPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateGatewaySecurityPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGatewaySecurityPolicy(); - $this->assertProtobufEquals($gatewaySecurityPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGatewaySecurityPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGatewaySecurityPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $gatewaySecurityPolicy = new GatewaySecurityPolicy(); - $gatewaySecurityPolicyName = 'gatewaySecurityPolicyName672884641'; - $gatewaySecurityPolicy->setName($gatewaySecurityPolicyName); - $request = (new UpdateGatewaySecurityPolicyRequest()) - ->setGatewaySecurityPolicy($gatewaySecurityPolicy); - $response = $gapicClient->updateGatewaySecurityPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGatewaySecurityPolicyRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $enabled = false; - $priority = 1165461084; - $description = 'description-1724546052'; - $sessionMatcher = 'sessionMatcher-2055881591'; - $applicationMatcher = 'applicationMatcher-488643261'; - $tlsInspectionEnabled = true; - $expectedResponse = new GatewaySecurityPolicyRule(); - $expectedResponse->setName($name); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setPriority($priority); - $expectedResponse->setDescription($description); - $expectedResponse->setSessionMatcher($sessionMatcher); - $expectedResponse->setApplicationMatcher($applicationMatcher); - $expectedResponse->setTlsInspectionEnabled($tlsInspectionEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); - $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; - $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); - $gatewaySecurityPolicyRuleEnabled = false; - $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); - $gatewaySecurityPolicyRulePriority = 797716438; - $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); - $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; - $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); - $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; - $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); - $request = (new UpdateGatewaySecurityPolicyRuleRequest()) - ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); - $response = $gapicClient->updateGatewaySecurityPolicyRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateGatewaySecurityPolicyRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGatewaySecurityPolicyRule(); - $this->assertProtobufEquals($gatewaySecurityPolicyRule, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyRuleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGatewaySecurityPolicyRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGatewaySecurityPolicyRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $gatewaySecurityPolicyRule = new GatewaySecurityPolicyRule(); - $gatewaySecurityPolicyRuleName = 'gatewaySecurityPolicyRuleName383654333'; - $gatewaySecurityPolicyRule->setName($gatewaySecurityPolicyRuleName); - $gatewaySecurityPolicyRuleEnabled = false; - $gatewaySecurityPolicyRule->setEnabled($gatewaySecurityPolicyRuleEnabled); - $gatewaySecurityPolicyRulePriority = 797716438; - $gatewaySecurityPolicyRule->setPriority($gatewaySecurityPolicyRulePriority); - $gatewaySecurityPolicyRuleSessionMatcher = 'gatewaySecurityPolicyRuleSessionMatcher94073454'; - $gatewaySecurityPolicyRule->setSessionMatcher($gatewaySecurityPolicyRuleSessionMatcher); - $gatewaySecurityPolicyRuleBasicProfile = BasicProfile::BASIC_PROFILE_UNSPECIFIED; - $gatewaySecurityPolicyRule->setBasicProfile($gatewaySecurityPolicyRuleBasicProfile); - $request = (new UpdateGatewaySecurityPolicyRuleRequest()) - ->setGatewaySecurityPolicyRule($gatewaySecurityPolicyRule); - $response = $gapicClient->updateGatewaySecurityPolicyRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGatewaySecurityPolicyRuleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateServerTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateServerTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest()) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->updateServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getServerTlsPolicy(); - $this->assertProtobufEquals($serverTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateServerTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest()) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->updateServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTlsInspectionPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTlsInspectionPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $caPool = 'caPool536760157'; - $trustConfig = 'trustConfig1834807049'; - $excludePublicCaSet = true; - $expectedResponse = new TlsInspectionPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCaPool($caPool); - $expectedResponse->setTrustConfig($trustConfig); - $expectedResponse->setExcludePublicCaSet($excludePublicCaSet); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTlsInspectionPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $tlsInspectionPolicy = new TlsInspectionPolicy(); - $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; - $tlsInspectionPolicy->setName($tlsInspectionPolicyName); - $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); - $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); - $request = (new UpdateTlsInspectionPolicyRequest()) - ->setTlsInspectionPolicy($tlsInspectionPolicy); - $response = $gapicClient->updateTlsInspectionPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateTlsInspectionPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTlsInspectionPolicy(); - $this->assertProtobufEquals($tlsInspectionPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTlsInspectionPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTlsInspectionPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTlsInspectionPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $tlsInspectionPolicy = new TlsInspectionPolicy(); - $tlsInspectionPolicyName = 'tlsInspectionPolicyName478805260'; - $tlsInspectionPolicy->setName($tlsInspectionPolicyName); - $tlsInspectionPolicyCaPool = $gapicClient->caPoolName('[PROJECT]', '[LOCATION]', '[CA_POOL]'); - $tlsInspectionPolicy->setCaPool($tlsInspectionPolicyCaPool); - $request = (new UpdateTlsInspectionPolicyRequest()) - ->setTlsInspectionPolicy($tlsInspectionPolicy); - $response = $gapicClient->updateTlsInspectionPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTlsInspectionPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateUrlListTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateUrlListTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new UrlList(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateUrlListTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $urlList = new UrlList(); - $urlListName = 'urlListName-1239061800'; - $urlList->setName($urlListName); - $urlListValues = []; - $urlList->setValues($urlListValues); - $request = (new UpdateUrlListRequest()) - ->setUrlList($urlList); - $response = $gapicClient->updateUrlList($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateUrlList', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUrlList(); - $this->assertProtobufEquals($urlList, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateUrlListTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateUrlListExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateUrlListTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $urlList = new UrlList(); - $urlListName = 'urlListName-1239061800'; - $urlList->setName($urlListName); - $urlListValues = []; - $urlList->setValues($urlListValues); - $request = (new UpdateUrlListRequest()) - ->setUrlList($urlList); - $response = $gapicClient->updateUrlList($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateUrlListTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($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 createAuthorizationPolicyAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = 'authorizationPolicyId-730349822'; - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->createAuthorizationPolicyAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); - $this->assertProtobufEquals($authorizationPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); - $this->assertProtobufEquals($authorizationPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php deleted file mode 100644 index eb80d451df21..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/OrganizationAddressGroupServiceClientTest.php +++ /dev/null @@ -1,1528 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return OrganizationAddressGroupServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new OrganizationAddressGroupServiceClient($options); - } - - /** @test */ - public function addAddressGroupItemsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new AddAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->addAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/AddAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getItems(); - $this->assertProtobufEquals($items, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function addAddressGroupItemsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new AddAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->addAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cloneAddressGroupItemsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cloneAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new CloneAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setSourceAddressGroup($formattedSourceAddressGroup); - $response = $gapicClient->cloneAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/CloneAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getSourceAddressGroup(); - $this->assertProtobufEquals($formattedSourceAddressGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cloneAddressGroupItemsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cloneAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $formattedSourceAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new CloneAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setSourceAddressGroup($formattedSourceAddressGroup); - $response = $gapicClient->cloneAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneAddressGroupItemsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAddressGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAddressGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $addressGroupId = 'addressGroupId-816169274'; - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new CreateAddressGroupRequest()) - ->setParent($formattedParent) - ->setAddressGroupId($addressGroupId) - ->setAddressGroup($addressGroup); - $response = $gapicClient->createAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/CreateAddressGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAddressGroupId(); - $this->assertProtobufEquals($addressGroupId, $actualValue); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($addressGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAddressGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $addressGroupId = 'addressGroupId-816169274'; - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new CreateAddressGroupRequest()) - ->setParent($formattedParent) - ->setAddressGroupId($addressGroupId) - ->setAddressGroup($addressGroup); - $response = $gapicClient->createAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAddressGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAddressGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAddressGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new DeleteAddressGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/DeleteAddressGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAddressGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new DeleteAddressGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAddressGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAddressGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new GetAddressGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getAddressGroup($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.networksecurity.v1.OrganizationAddressGroupService/GetAddressGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAddressGroupExceptionTest() - { - $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->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new GetAddressGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getAddressGroup($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 listAddressGroupReferencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $addressGroupReferencesElement = new AddressGroupReference(); - $addressGroupReferences = [ - $addressGroupReferencesElement, - ]; - $expectedResponse = new ListAddressGroupReferencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAddressGroupReferences($addressGroupReferences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new ListAddressGroupReferencesRequest()) - ->setAddressGroup($formattedAddressGroup); - $response = $gapicClient->listAddressGroupReferences($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAddressGroupReferences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/ListAddressGroupReferences', $actualFuncCall); - $actualValue = $actualRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAddressGroupReferencesExceptionTest() - { - $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 - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $request = (new ListAddressGroupReferencesRequest()) - ->setAddressGroup($formattedAddressGroup); - try { - $gapicClient->listAddressGroupReferences($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 listAddressGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $addressGroupsElement = new AddressGroup(); - $addressGroups = [ - $addressGroupsElement, - ]; - $expectedResponse = new ListAddressGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAddressGroups($addressGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAddressGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAddressGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAddressGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/ListAddressGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAddressGroupsExceptionTest() - { - $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->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAddressGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAddressGroups($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 removeAddressGroupItemsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new RemoveAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->removeAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/RemoveAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getItems(); - $this->assertProtobufEquals($items, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeAddressGroupItemsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new RemoveAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->removeAddressGroupItems($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeAddressGroupItemsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAddressGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAddressGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new UpdateAddressGroupRequest()) - ->setAddressGroup($addressGroup); - $response = $gapicClient->updateAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/UpdateAddressGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($addressGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAddressGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAddressGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $addressGroup = new AddressGroup(); - $addressGroupName = 'addressGroupName-892255210'; - $addressGroup->setName($addressGroupName); - $addressGroupType = Type::TYPE_UNSPECIFIED; - $addressGroup->setType($addressGroupType); - $addressGroupCapacity = 1210917061; - $addressGroup->setCapacity($addressGroupCapacity); - $request = (new UpdateAddressGroupRequest()) - ->setAddressGroup($addressGroup); - $response = $gapicClient->updateAddressGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAddressGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($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 addAddressGroupItemsAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAddressGroupItemsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacity = 67824454; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new AddressGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacity($capacity); - $expectedResponse->setSelfLink($selfLink); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addAddressGroupItemsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAddressGroup = $gapicClient->addressGroupName('[PROJECT]', '[LOCATION]', '[ADDRESS_GROUP]'); - $items = []; - $request = (new AddAddressGroupItemsRequest()) - ->setAddressGroup($formattedAddressGroup) - ->setItems($items); - $response = $gapicClient->addAddressGroupItemsAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.OrganizationAddressGroupService/AddAddressGroupItems', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAddressGroup(); - $this->assertProtobufEquals($formattedAddressGroup, $actualValue); - $actualValue = $actualApiRequestObject->getItems(); - $this->assertProtobufEquals($items, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAddressGroupItemsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}