From ca4bee9bc274e3aa545c467a2e7790a31f10fda0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 28 Nov 2024 11:00:51 +0000 Subject: [PATCH 1/2] docs: challenge is also returned for INVISIBLE keys PiperOrigin-RevId: 700933092 Source-Link: https://github.com/googleapis/googleapis/commit/072ae46e493035d1419caad40bccc1a4f1b977bf Source-Link: https://github.com/googleapis/googleapis-gen/commit/edb60149740467b710265c58a174358a3649611b Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiZWRiNjAxNDk3NDA0NjdiNzEwMjY1YzU4YTE3NDM1OGEzNjQ5NjExYiJ9 --- .../V1/Recaptchaenterprise.php | Bin 0 -> 24700 bytes .../V1/AccountDefenderAssessment.php | 67 + .../AccountDefenderLabel.php | 82 + .../V1/AccountVerificationInfo.php | 182 ++ .../V1/AccountVerificationInfo/Result.php | 123 ++ .../V1/AddIpOverrideRequest.php | 132 ++ .../V1/AddIpOverrideResponse.php | 33 + .../V1/AndroidKeySettings.php | 147 ++ .../V1/AnnotateAssessmentRequest.php | 303 +++ .../AnnotateAssessmentRequest/Annotation.php | 82 + .../V1/AnnotateAssessmentRequest/Reason.php | 165 ++ .../V1/AnnotateAssessmentResponse.php | 33 + .../V1/AppleDeveloperId.php | 147 ++ .../RecaptchaEnterprise/V1/Assessment.php | 599 ++++++ .../V1/AssessmentEnvironment.php | 126 ++ .../V1/ChallengeMetrics.php | 185 ++ .../V1/CreateAssessmentRequest.php | 132 ++ .../V1/CreateFirewallPolicyRequest.php | 132 ++ .../V1/CreateKeyRequest.php | 132 ++ .../V1/DeleteFirewallPolicyRequest.php | 86 + .../V1/DeleteKeyRequest.php | 86 + .../V1/EndpointVerificationInfo.php | 197 ++ .../Cloud/RecaptchaEnterprise/V1/Event.php | 640 +++++++ .../V1/Event/FraudPrevention.php | 70 + .../V1/ExpressKeySettings.php | 33 + .../RecaptchaEnterprise/V1/FirewallAction.php | 259 +++ .../V1/FirewallAction/AllowAction.php | 36 + .../V1/FirewallAction/BlockAction.php | 37 + .../IncludeRecaptchaScriptAction.php | 40 + .../V1/FirewallAction/RedirectAction.php | 37 + .../V1/FirewallAction/SetHeaderAction.php | 106 ++ .../V1/FirewallAction/SubstituteAction.php | 75 + .../RecaptchaEnterprise/V1/FirewallPolicy.php | 280 +++ .../V1/FirewallPolicyAssessment.php | 133 ++ .../V1/FraudPreventionAssessment.php | 215 +++ .../BehavioralTrustVerdict.php | 78 + .../CardTestingVerdict.php | 75 + .../StolenInstrumentVerdict.php | 75 + .../RecaptchaEnterprise/V1/FraudSignals.php | 125 ++ .../V1/FraudSignals/CardSignals.php | 70 + .../V1/FraudSignals/CardSignals/CardLabel.php | 74 + .../V1/FraudSignals/UserSignals.php | 116 ++ .../V1/GetFirewallPolicyRequest.php | 86 + .../RecaptchaEnterprise/V1/GetKeyRequest.php | 86 + .../V1/GetMetricsRequest.php | 86 + .../RecaptchaEnterprise/V1/IOSKeySettings.php | 165 ++ .../RecaptchaEnterprise/V1/IpOverrideData.php | 125 ++ .../V1/IpOverrideData/OverrideType.php | 58 + .../Cloud/RecaptchaEnterprise/V1/Key.php | 417 ++++ .../V1/ListFirewallPoliciesRequest.php | 162 ++ .../V1/ListFirewallPoliciesResponse.php | 105 ++ .../V1/ListIpOverridesRequest.php | 170 ++ .../V1/ListIpOverridesResponse.php | 105 ++ .../V1/ListKeysRequest.php | 162 ++ .../V1/ListKeysResponse.php | 105 ++ ...tRelatedAccountGroupMembershipsRequest.php | 178 ++ ...RelatedAccountGroupMembershipsResponse.php | 105 ++ .../V1/ListRelatedAccountGroupsRequest.php | 178 ++ .../V1/ListRelatedAccountGroupsResponse.php | 105 ++ .../Cloud/RecaptchaEnterprise/V1/Metrics.php | 195 ++ .../V1/MigrateKeyRequest.php | 133 ++ .../V1/PhoneFraudAssessment.php | 77 + .../V1/PrivatePasswordLeakVerification.php | 201 ++ .../V1/RelatedAccountGroup.php | 75 + .../V1/RelatedAccountGroupMembership.php | 164 ++ .../V1/RemoveIpOverrideRequest.php | 132 ++ .../V1/RemoveIpOverrideResponse.php | 33 + .../V1/ReorderFirewallPoliciesRequest.php | 128 ++ .../V1/ReorderFirewallPoliciesResponse.php | 33 + .../V1/RetrieveLegacySecretKeyRequest.php | 86 + .../V1/RetrieveLegacySecretKeyResponse.php | 80 + .../RecaptchaEnterprise/V1/RiskAnalysis.php | 185 ++ .../V1/RiskAnalysis/Challenge.php | 72 + .../V1/RiskAnalysis/ClassificationReason.php | 101 + .../V1/ScoreDistribution.php | 75 + .../RecaptchaEnterprise/V1/ScoreMetrics.php | 115 ++ ...hRelatedAccountGroupMembershipsRequest.php | 294 +++ ...RelatedAccountGroupMembershipsResponse.php | 105 ++ .../V1/SmsTollFraudVerdict.php | 105 ++ .../SmsTollFraudReason.php | 57 + .../RecaptchaEnterprise/V1/TestingOptions.php | 113 ++ .../V1/TestingOptions/TestingChallenge.php | 68 + .../V1/TokenProperties.php | 309 +++ .../V1/TokenProperties/InvalidReason.php | 93 + .../V1/TransactionData.php | 581 ++++++ .../V1/TransactionData/Address.php | 256 +++ .../V1/TransactionData/GatewayInfo.php | 184 ++ .../V1/TransactionData/Item.php | 180 ++ .../V1/TransactionData/User.php | 256 +++ .../V1/TransactionEvent.php | 199 ++ .../TransactionEvent/TransactionEventType.php | 214 +++ .../V1/UpdateFirewallPolicyRequest.php | 141 ++ .../V1/UpdateKeyRequest.php | 141 ++ .../Cloud/RecaptchaEnterprise/V1/UserId.php | 147 ++ .../Cloud/RecaptchaEnterprise/V1/UserInfo.php | 169 ++ .../RecaptchaEnterprise/V1/WafSettings.php | 102 + .../V1/WafSettings/WafFeature.php | 81 + .../V1/WafSettings/WafService.php | 78 + .../RecaptchaEnterprise/V1/WebKeySettings.php | 227 +++ .../ChallengeSecurityPreference.php | 72 + .../V1/WebKeySettings/IntegrationType.php | 76 + .../add_ip_override.php | 94 + .../annotate_assessment.php | 79 + .../create_assessment.php | 74 + .../create_firewall_policy.php | 76 + .../create_key.php | 77 + .../delete_firewall_policy.php | 73 + .../delete_key.php | 70 + .../get_firewall_policy.php | 75 + .../get_key.php | 72 + .../get_metrics.php | 73 + .../list_firewall_policies.php | 77 + .../list_ip_overrides.php | 77 + .../list_keys.php | 77 + ...list_related_account_group_memberships.php | 80 + .../list_related_account_groups.php | 77 + .../migrate_key.php | 77 + .../remove_ip_override.php | 95 + .../reorder_firewall_policies.php | 83 + .../retrieve_legacy_secret_key.php | 74 + ...arch_related_account_group_memberships.php | 78 + .../update_firewall_policy.php | 59 + .../update_key.php | 72 + .../RecaptchaEnterpriseServiceClient.php | 955 ++++++++++ .../RecaptchaEnterpriseServiceGapicClient.php | 1610 ++++++++++++++++ .../V1/RecaptchaEnterpriseServiceClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 128 ++ ...tcha_enterprise_service_client_config.json | 142 ++ ...a_enterprise_service_descriptor_config.php | 350 ++++ ..._enterprise_service_rest_client_config.php | 284 +++ .../RecaptchaEnterpriseServiceClientTest.php | 1676 +++++++++++++++++ .../RecaptchaEnterpriseServiceClientTest.php | 1517 +++++++++++++++ 132 files changed, 22661 insertions(+) create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/GPBMetadata/Google/Cloud/Recaptchaenterprise/V1/Recaptchaenterprise.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_client_config.json create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_descriptor_config.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php create mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/GPBMetadata/Google/Cloud/Recaptchaenterprise/V1/Recaptchaenterprise.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/GPBMetadata/Google/Cloud/Recaptchaenterprise/V1/Recaptchaenterprise.php new file mode 100644 index 0000000000000000000000000000000000000000..0577623efb24959f2671829c3bfaea1d19557ea5 GIT binary patch literal 24700 zcmd5^TWllOc{WK&D;;Vj?pWT{YJH){YkMv4Qdw^7IP@(;ijtV6NSYU|*H$v6$dSY> zMKT;xYt`L8qy^HV1&StUfxfgwkS1-@qCnFdnwR#WKoPVJ&^9f)MNv1sp?)g**oUIu zf6kd3Ig)3!euy8|;+Z-B`Okm;`~RPL?akhPk3AD#H#$bYJ}{c`oul|*--!46-9fj} zZO32ro9~fq@-Z0|prSzsTs5k3_`t~{px}71Q+vRbf z+gsOPWvtPzn`YeSF?*lI@n3Ja({455=Ab^n|1P&oz13+ATJ?78N3rAAif|Uyl#^L&Lp#Jl;13!+z&gjyD0gXaBYBLqx6D z+SWRqE>WS|F;gjLPY#IVCT7|#9OZ+}S!)^XX4=@VAGW&vQ%ucucDoNYt!zkc47@k{ z$Uv~{L2qyrd_j9E-{)rCymN}V)fU)(P(SDepIh!VwktTq;W0;~>?eF=KXG_{>4IFN-fKZg5H|_YUwX>*V3$}% z-;q2cU$`{(LJOQBA6|4l?91aHna4E@#B#-;1C|dhePursOCR7E z?HYTL6VKYgLA_JogSHi$1If$;H1G;o?h8g^plmP(jVB>5h5;y=T#+xIcnS#zp>zZ* zt6!O9v1-5GG3#8KlH&-&)|5@B|jSo{3xiz=s*<^Y2}deD4PO_%x;I{ zKO+VeHhEZY4~@kL_7oChH*9P`|HTQu*(D1b>u?gbAn{4+A4k}N-`dJ^Os$r+LPg6| zbH#$5-O3iKdi8cGtJeyZQZ|!Y%Vk$%k0=W)wwWzwHZ(leN~LmfD;o#&YBrP46|%8O5MsWh-QFZT zGFquxD`#U<$|ZJTWYC^*Mqz9!qZKmQd~8}d&lDh8UeBhr%uPL4c&nBx-;T`?{;qK? zpDkBojNV==YqeD!792ax2=t=L9AnPgv03GDw&?uE#!BUE1qc$7v9lvwnDJIETdBt8U1QdcV}!qWFLuuL+=8R1KXHa#l$Od@f+omWkn-~qm!B1O z%}?!&h>yek$_^yRwuPJn=aM;#sZP>kiDMD7p1`;Y#(kHa5gcxUog-J~lG%q`pv>h( z0Kb3@G#cF@q_ovsJi~Pfm#Zh)x&6AiZ!~q+bCQ}_F|o$Z4IF{jxu7pja;bVL5PqX# zB?Rur8FQQqWr>~F3g9u$Un7zQUdw0KbJg6YRwbFjZ_bmoJaJc8S!A)2R;k=7mRI#m zv0Tn(sPRuo7txYdf5$z)4aD3aOHCsGPlg&0{fzLBk!bCqf?Q{ek5%KHJ;xb_~5UJlHY%LiJ;OiJk2W1E~+XcZ?3#|J)`-lsDOV`1b?-(6x$A zwm6tAh@=^tHYBF%KTfadXF%Uz^J|+NFt7-gAh3EtzGZz4PnsrMz<+! zo3wXrw$z53FuFU?Y}g)fsh&$_0^xAXrV?ciiZF?QA*P2W1ty>!ISn)E@M1{)b1pfw zppcwOEngjx99XYP4J=)$=(S3=tV7`oI~gKFl`WTxW$^$a?>r1EmswmqtmLX$y;w*W zweo7Nuns$wDQ=eXSx8nyd5T>UZ$Z>^r5qVTf}`d0#aj@e3FQU$?C1+x8i?rm+-9z- zXW!n?Y88^UNe7)w84{EMH|Gk~Y`LK2VN_N2q=1vb>qQuH{jC~wlncNa2N|(PVIlSO zZ6SBi4^V9a2wqstWvcpSt^!S#*@(@ke-UC&mHMqi9BBy-+TCuynK$Zp+?<95ly?|*o5e}%sVYQyn8=K|}t_E80BN$$6aF;FZw))21db_Rny2!>Hx%bET za>11CngmngP)4^0LhknK!zS@Rg)nf&+zUk?fRJkhr(}Z}T?u?ERx(?A;6QWnEQcM8 zZ#nFWm?+NW^X$B^i~=Z*#yb324)@c+&Vr092R@3f&dxh9b)$3G>UTR7m@dw7_^Ckf z9jI9c0zcu@dmn1U2lc{Vgpg7|Yp%R6|GKy0V2M%Z$GzpK^TSNK;$QWbC)p%dCTaJRlI+#@$j&p6X#Eb@i=jYX0sISI?`8+B+Cb1@2sMviVjKQ4_1#ogS4 zTO@{)2$42*1q+mum3$shn>v$MF<0y|%Vq?H;VLf9W3g!RS|IML!5ET%DZt!jF(E6C zs4t!aw7Fz3Ugj*5;KJfaIR~v4*!;-25@(N#$Qhw9`bkHD)!EZUMuxaT zK75zO?1z?zFHBT0Q#eA31X7eF3F27aVe>n!cAFNqU{iD(O@0ip^K61RkBe0_8BC>) zB1=ptFnx>792k8RIXVN<{uD1fEXYkZ30-wyLMfjfTn-QfhVQc3Jy`m?^&?a~AZ)_U zekPExjqZD00J7z8>FXhOMxGo3hZ*EwT0KhZx>*(a$2!EYqko{1+ua7rFM}gDkH*=f z_2vPp5+(#=&^k19BueYtdy|T5kwyE)9@%ux!^E%7lU^4|*tU2=+$f$beJ#W$=*$q5 zx-%xu8;H=O@UXe=(?NQ&9T7o4NCuB%-G&2_A!1wMFd0q01*tDDj>NYvDI<~Qp|3rU z&=>QTcG(1-8Zw7&7uzeHzM!dy7&%VJG1U)E-TT~SL-D+EcsTOhp+))}o7Zv1R@NCAEcMqyY}(TA%4_UV zej?xind9Q|KAlW7`BAywk%M-jofh#gmJ?x7H2Gp6QQ&wrIZLQN!luMem~hD)j@cHRRQpjc#9LJi~-WMA_bUl8Yo+ zbIG+pTX6$UWT=aQdYzFGD-8MRV zA{#T8eDxG)SRnY;)c*>x1wYJy)YF+f(qDGs8fj+#G#^s!Ma1NkdZ(=6`C1|SHgfxv zPsB&G6^h^y47ia;x6M6M$?MH5`ZcD6otM%`pH8Ef}cBS6wUk2EOO z^ZFKN*-W8G)d9SKEg^v}^ATbCTO|Kt5%oI}_!-^+mbeE79PS0NDOWcUMQ3xZ4j+}L z$`#yPG9BpfMpj7V1SmKEd{U}ZLnP`%NdFOnOL@%ceJF9BpR%<@M1kj9?=<^eNC+AP z?ob|$zhXPb5y~I7x~9G}>@?d3CB(@qmQ0F5lPGRE9(qLm`4Btn!CQHfE#(SZT0TeB z3m>-PY;?0wyj4I-$^9PA1IM$e<=2YkO*nsHg*?HxOSv+BM3iYZv05u-!8aI2uBd|i z7gz-~qI9`t!t%qDX1An(FAbVE* zF}7$Gi(&e)ZIMYOeI>I#wTE2U>R+h0s|4M>`qEW);TW2bVI4W4B}84y_&)sJyvok| zFUtd5Lc?|P>c2+VEI%}vPf*@wvqLyMx|Ns^W;0-Rg_0f;P=XAdCrJUw{E#ikWZZ%# z$=xU>hz@SZOC=U{t%k($1(I2~fX(`mskgg#v7a4OyM!8>6g)>k%25aHN@(lRIk^cT zArMQ*#YSDrD0QeLikjN>9Rt}K%J0u5*MoD1MHClIzKuM=6PD{8Xmc#VN674u1<>(qr68so9CrS`LrU>OW(+?Z^S0luZGZS z0OxRE+%%3p);5~w?{6BiRM9WSh+F^ zQPjc5MFP_C?$rj1If#gWN_m-0U}sj9G4R%~$b1KmIs71CAXef5hWa`7WZ4+>TS$86 zjlFu~sA3?3qTO4Ye^n4u1S<*NHF1SK7ockbFyN=2UH3qH%@e3TC^&?nv04w=L^sRG z(-smPm?ZqP75JM&4iD8Y_(j4ljr*H+ryk7;sU;R$HQI&;i-+6T?}ykWAq(Czg>?uY zOZV4XY<{GcA~$>^kcfCO6Vd`1zC=vwd4|&2$BOp@OAciCaeu6&7!}w#FD0njCo1=+ zp~dmy)nJR@e-CwR!CLo-!l$`p-C)-PNR}6#`VAa{kP7bu>kxd-T?or*_WCe#v&$|C zx$(#IVbFBiiddZpohlRvpm&BRS&|IpGeSVfC?qa zEPP5xL0Xv=8(IYC8%+jlbF=d@5@KrqL(O;)@+i;xR5!`$ue^_c@2$u!E}xNqB&|Qx z*NBUbG3HY9U1aCl+|KJJH}t%`$!)v(?I{)kYf)st(y?^YK^FwJty*ujDoITd+Mlnt$njSY|(BbxkFAQPpDbdMJ(Fr*xh z4N&wf2E#B{tayO|Ls@@y0E*^-U>Iga@zx78XGaQCoY8{SNC6|kg8(zz8T7gP8X|{A zX27}Rhzi&Vl0%0WQD7mg{7bjTZ+Y-USTq@oN;1Pz6jKRgNFlyJ+1aMLC?S0!&@tYs z?^;a3fh}EQQP)lp`EviBGbnOsvh|xYWh(qiC{_DVD+hH^l_yS=wq@>bCuzO(qwE|+ zV6fZmAK3d+|0l%ey!)r5qD9S-{Ch}gqKj5$x@JS_%2nRyv$s>gSQ3 z7OU6~kPUsJiq>lCq6?TUM!bz|axuR}eQ*z?4pa4 zr~Iu-6*WHa=O_$VPs!mD^(EKrgC13QcF`8f$s+4xJ1mBNQG?7MRq^=!0#Xb?yBxj9 zBJ*s+vMv^cmG{{b_L1OxQT9fejQ7JCRR1=38h9>Q493D9)t0c20pS&gi_QUDk0Y?+ z#NK7|BS=vMO+AR~Wzh`nbJt*oO^ONv?;FT$WHUF@#kUciBd?51Nv@K^!6ChWh~UDq zY2yee*VqdVM^v&Iv=mow>qs=MWy`!wF;-JRX(OG>Qzn3?q0(BOt`%Tmv@ciyu~`TZp!Oz258T$Z7YH1f-I1 zYiG#&Y$&vre$8(|XuYZ(;<4cHuU!xDU<7x`!pQZ43!N>z(CeX)&_p=hrdB{IDTpFQ zFy}#|>8sZ4oU9!#FlF3ssPC}Y=bJsdmV>ffxFVbHBF~4jvK=_#LB4!CM5$;xCrUv!K=Syb0admeIb`vO z86~P>*KJ72*r#Za3@nPBr?#Ozux!1Fnmz7@aL$SFxE2i; z{6?;PK&(R@;j_Ew(}yw_uM>~+QR)q~M@d6R)L%fyzb6bka#g3ELovMH@AhR&tYV!I z?#7{RM0evzKXMOc*V_jwn{k49DBkrsNcBroY|a`N^jAu3l1sRZINr3dIq_nT7e+!O z)h6JV3sYA6@LHN zUUiF2qnR8hfC8Ctpo7(XM~G9FFl@N*AkZ7`p!7Ew4#W+Ipi(sgxne`HVc!O9W1x#h zMp@Pib}3>MwlUb?-H;aOrL!#RI%oRnI;5p1VYyEr=TZ#!-8_U?dX~jTH$ZV%uRhq9 zN}QbPrBAVWIL2;VaHYucg}Eys3-`DSX>0jV`T~1w*AkyP*EOlE*hW%>@7(i8x~|dfG;vYh+uWK%PZwX>1fP=jd@#`!wC7t){aoln?Po%# z$dxId^zrsB%JBYjtUZ9j?*`RwlO<9du?{|m2 zO@pp1QRAbXLV0`SGVcaYqNJ72*bNSV{bc%k-8JKlgO< ziU}r~BhZge6b`C{9ek{I{ICj}GJ>g~rTQ&=#-MB*U^Qpj5AQaX*y1>{awk6>V&_SK zoqgEK<&6>L@_?nx2UjNd*o84vB=hEw;dD;dQXIj|tFtwJyWm)bi`$-0oTx4AOuon) zi%fnP-iW(_&%eQXtzz; z%KOfbd&^JC*N?IC$tO;HuKq1ra?0a=fwvas|wg}qh>jIPDe{&Gz`-LsAyJ#F4qPLmY=9FO91PBgR?J|ay zG7j9{5`Wo6<@Li3OE-ZYm!pWDF(Bz9O7&>SwxaLf^d#c5o*#dH5xa==K79vI> z)Uk#BPJ9xh5}Q;Joj6;w7DQX;Rt}B9-i+H63uk2e?wVGq=5M1tls-z3FVGusWIt_ydR0TQ3kaRn7%yECv0rq{7o|CCZ>wiS}PA>8W8nYh#z zwlB3IKXTT#Ej%|%HhL}@?81n5m4s#Z?8L143Y&EgQfm^vs!}eaiQ4ZAEXa!TE8wwE z^4~ABB|D-;vPHVo6@&AW@>g~Tl0z;f*mWV%tl>LnPFP=JbyzIH_m~!1{R6gJdSN^Fk*9TCPfER$pcTHRqtxW~XTAc9F zhunQ_o(hLo>-M)(+EG#p4QkGN#E~14&Z}R?o9uw~!3BH)odgS+3pJ zp2wofW2VypZoch-E1#!9ec$+0D8{^6>nU}ddifyiBH_cfv`-_lFU4SoRl?PePM zG*`eaXkYW|XH(FtG$oqRlw_a`nWuAYDLBu(cwgfcbPxSUSzKbP{5JU6ZfOh1&-VKk zs|3gGO-Le^zUu0F<7jR_pNv~XO&o)(;A}Kk&Dh;<0TH&}w-7#W9RR!&{^`R6|A?OI zCEc=M-DA*EekH`1(-NZuONu)aEL?&UZ-tZU1@*G8(z5vPKy>Mlvid%5i+ExrCD=tz z&m0TSltr@>v(Y0{rTA>#*B&D>UUkI@JPPDHT2Yrz+)>>fkkY>X1%`7pXbNaJN2gi4 z3wF(5e74+R>BJ2t)oUkius;&5(jNa(HUc~DiKzs;q&60&2}Kypu^5{yHweLXtMyMP z3BIE-=U~NR!?rhWRlW&nahkaTN{chWI;X3FxKI|B)EjP9_?&W*;8=Z4_Y{7Sk2i*| z$(*&!Ob7EPg|+uiwXhEs6MN^X@7&kUOCP|>`pR#SaOrtfz2biq_g1Xet;}+2v;kN7 zJLG%l$URFU!K?(^tKU>>uUep!@`oUq?$chTTUG+^RQVHBkik8keH|&mq2L>Xl-HCri`8x90}$Ba5jE@wE@q@Z|XyBq^BdTY^_^{D9Mq3J28fiX z&)(N&r7odenOuXsq<$i>2I-5wX0lNKfx*S&fq zp@^_=%y`{fk%=WwdQSODn5oCC;i^_Bg}@5Whhi>3*5-qCdVMrvW%)S-iuK(#{52)z zf9$?gfP}g;lFILf+2tT54kcJSKoC$CVS?St4F*wih;d)LC^MB;$38>Kg(RcCA*dxj z{p5=Le7VNS*P1Dl*Sa7wOIzR7)Q_(I{k4|Z9}IeCYGvi_-Mf;j>;i0kIM^4TtG{No zgQkBe%$~-FmMsSKTjKC~8ifYgu;JvQN)!Nm@%J5xN)yYamJ4e_huv-Ga7*rSmj*KvKmV9(zaUz)$i?lJcN Db9MLR literal 0 HcmV?d00001 diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php new file mode 100644 index 000000000000..a9ab1644bb8c --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php @@ -0,0 +1,67 @@ +google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment + */ +class AccountDefenderAssessment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Labels for this request. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $labels + * Output only. Labels for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Labels for this request. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Output only. Labels for this request. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment\AccountDefenderLabel::class); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php new file mode 100644 index 000000000000..1b83b9790b34 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php @@ -0,0 +1,82 @@ +google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel + */ +class AccountDefenderLabel +{ + /** + * Default unspecified type. + * + * Generated from protobuf enum ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0; + */ + const ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0; + /** + * The request matches a known good profile for the user. + * + * Generated from protobuf enum PROFILE_MATCH = 1; + */ + const PROFILE_MATCH = 1; + /** + * The request is potentially a suspicious login event and must be further + * verified either through multi-factor authentication or another system. + * + * Generated from protobuf enum SUSPICIOUS_LOGIN_ACTIVITY = 2; + */ + const SUSPICIOUS_LOGIN_ACTIVITY = 2; + /** + * The request matched a profile that previously had suspicious account + * creation behavior. This can mean that this is a fake account. + * + * Generated from protobuf enum SUSPICIOUS_ACCOUNT_CREATION = 3; + */ + const SUSPICIOUS_ACCOUNT_CREATION = 3; + /** + * The account in the request has a high number of related accounts. It does + * not necessarily imply that the account is bad but can require further + * investigation. + * + * Generated from protobuf enum RELATED_ACCOUNTS_NUMBER_HIGH = 4; + */ + const RELATED_ACCOUNTS_NUMBER_HIGH = 4; + + private static $valueToName = [ + self::ACCOUNT_DEFENDER_LABEL_UNSPECIFIED => 'ACCOUNT_DEFENDER_LABEL_UNSPECIFIED', + self::PROFILE_MATCH => 'PROFILE_MATCH', + self::SUSPICIOUS_LOGIN_ACTIVITY => 'SUSPICIOUS_LOGIN_ACTIVITY', + self::SUSPICIOUS_ACCOUNT_CREATION => 'SUSPICIOUS_ACCOUNT_CREATION', + self::RELATED_ACCOUNTS_NUMBER_HIGH => 'RELATED_ACCOUNTS_NUMBER_HIGH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccountDefenderLabel::class, \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment_AccountDefenderLabel::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php new file mode 100644 index 000000000000..5e8e0f49030d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php @@ -0,0 +1,182 @@ +google.cloud.recaptchaenterprise.v1.AccountVerificationInfo + */ +class AccountVerificationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Endpoints that can be used for identity verification. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $endpoints; + /** + * Optional. Language code preference for the verification message, set as a + * IETF BCP 47 language code. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + /** + * Output only. Result of the latest account verification challenge. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result latest_verification_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_verification_result = 0; + /** + * Username of the account that is being verified. Deprecated. Customers + * should now provide the `account_id` field in `event.user_info`. + * + * Generated from protobuf field string username = 2 [deprecated = true]; + * @deprecated + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\EndpointVerificationInfo>|\Google\Protobuf\Internal\RepeatedField $endpoints + * Optional. Endpoints that can be used for identity verification. + * @type string $language_code + * Optional. Language code preference for the verification message, set as a + * IETF BCP 47 language code. + * @type int $latest_verification_result + * Output only. Result of the latest account verification challenge. + * @type string $username + * Username of the account that is being verified. Deprecated. Customers + * should now provide the `account_id` field in `event.user_info`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Endpoints that can be used for identity verification. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndpoints() + { + return $this->endpoints; + } + + /** + * Optional. Endpoints that can be used for identity verification. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\EndpointVerificationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\EndpointVerificationInfo::class); + $this->endpoints = $arr; + + return $this; + } + + /** + * Optional. Language code preference for the verification message, set as a + * IETF BCP 47 language code. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. Language code preference for the verification message, set as a + * IETF BCP 47 language code. + * + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Output only. Result of the latest account verification challenge. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result latest_verification_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLatestVerificationResult() + { + return $this->latest_verification_result; + } + + /** + * Output only. Result of the latest account verification challenge. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result latest_verification_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLatestVerificationResult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo\Result::class); + $this->latest_verification_result = $var; + + return $this; + } + + /** + * Username of the account that is being verified. Deprecated. Customers + * should now provide the `account_id` field in `event.user_info`. + * + * Generated from protobuf field string username = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getUsername() + { + @trigger_error('username is deprecated.', E_USER_DEPRECATED); + return $this->username; + } + + /** + * Username of the account that is being verified. Deprecated. Customers + * should now provide the `account_id` field in `event.user_info`. + * + * Generated from protobuf field string username = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setUsername($var) + { + @trigger_error('username is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php new file mode 100644 index 000000000000..2b3348060160 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php @@ -0,0 +1,123 @@ +google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result + */ +class Result +{ + /** + * No information about the latest account verification. + * + * Generated from protobuf enum RESULT_UNSPECIFIED = 0; + */ + const RESULT_UNSPECIFIED = 0; + /** + * The user was successfully verified. This means the account verification + * challenge was successfully completed. + * + * Generated from protobuf enum SUCCESS_USER_VERIFIED = 1; + */ + const SUCCESS_USER_VERIFIED = 1; + /** + * The user failed the verification challenge. + * + * Generated from protobuf enum ERROR_USER_NOT_VERIFIED = 2; + */ + const ERROR_USER_NOT_VERIFIED = 2; + /** + * The site is not properly onboarded to use the account verification + * feature. + * + * Generated from protobuf enum ERROR_SITE_ONBOARDING_INCOMPLETE = 3; + */ + const ERROR_SITE_ONBOARDING_INCOMPLETE = 3; + /** + * The recipient is not allowed for account verification. This can occur + * during integration but should not occur in production. + * + * Generated from protobuf enum ERROR_RECIPIENT_NOT_ALLOWED = 4; + */ + const ERROR_RECIPIENT_NOT_ALLOWED = 4; + /** + * The recipient has already been sent too many verification codes in a + * short amount of time. + * + * Generated from protobuf enum ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED = 5; + */ + const ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED = 5; + /** + * The verification flow could not be completed due to a critical internal + * error. + * + * Generated from protobuf enum ERROR_CRITICAL_INTERNAL = 6; + */ + const ERROR_CRITICAL_INTERNAL = 6; + /** + * The client has exceeded their two factor request quota for this period of + * time. + * + * Generated from protobuf enum ERROR_CUSTOMER_QUOTA_EXHAUSTED = 7; + */ + const ERROR_CUSTOMER_QUOTA_EXHAUSTED = 7; + /** + * The request cannot be processed at the time because of an incident. This + * bypass can be restricted to a problematic destination email domain, a + * customer, or could affect the entire service. + * + * Generated from protobuf enum ERROR_VERIFICATION_BYPASSED = 8; + */ + const ERROR_VERIFICATION_BYPASSED = 8; + /** + * The request parameters do not match with the token provided and cannot be + * processed. + * + * Generated from protobuf enum ERROR_VERDICT_MISMATCH = 9; + */ + const ERROR_VERDICT_MISMATCH = 9; + + private static $valueToName = [ + self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', + self::SUCCESS_USER_VERIFIED => 'SUCCESS_USER_VERIFIED', + self::ERROR_USER_NOT_VERIFIED => 'ERROR_USER_NOT_VERIFIED', + self::ERROR_SITE_ONBOARDING_INCOMPLETE => 'ERROR_SITE_ONBOARDING_INCOMPLETE', + self::ERROR_RECIPIENT_NOT_ALLOWED => 'ERROR_RECIPIENT_NOT_ALLOWED', + self::ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED => 'ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED', + self::ERROR_CRITICAL_INTERNAL => 'ERROR_CRITICAL_INTERNAL', + self::ERROR_CUSTOMER_QUOTA_EXHAUSTED => 'ERROR_CUSTOMER_QUOTA_EXHAUSTED', + self::ERROR_VERIFICATION_BYPASSED => 'ERROR_VERIFICATION_BYPASSED', + self::ERROR_VERDICT_MISMATCH => 'ERROR_VERDICT_MISMATCH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Result::class, \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo_Result::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php new file mode 100644 index 000000000000..7c007dfb749e --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php @@ -0,0 +1,132 @@ +google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest + */ +class AddIpOverrideRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the key to which the IP override is added, in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. IP override added to the key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ip_override_data = null; + + /** + * @param string $name Required. The name of the key to which the IP override is added, in the + * format `projects/{project}/keys/{key}`. Please see + * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. + * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData Required. IP override added to the key. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\AddIpOverrideRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData): self + { + return (new self()) + ->setName($name) + ->setIpOverrideData($ipOverrideData); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the key to which the IP override is added, in the + * format `projects/{project}/keys/{key}`. + * @type \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ip_override_data + * Required. IP override added to the key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the key to which the IP override is added, in the + * format `projects/{project}/keys/{key}`. + * + * 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 key to which the IP override is added, in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. IP override added to the key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData|null + */ + public function getIpOverrideData() + { + return $this->ip_override_data; + } + + public function hasIpOverrideData() + { + return isset($this->ip_override_data); + } + + public function clearIpOverrideData() + { + unset($this->ip_override_data); + } + + /** + * Required. IP override added to the key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $var + * @return $this + */ + public function setIpOverrideData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData::class); + $this->ip_override_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php new file mode 100644 index 000000000000..cfbc2dff2ace --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php @@ -0,0 +1,33 @@ +google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse + */ +class AddIpOverrideResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php new file mode 100644 index 000000000000..48395cbf6a84 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php @@ -0,0 +1,147 @@ +google.cloud.recaptchaenterprise.v1.AndroidKeySettings + */ +class AndroidKeySettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If set to true, allowed_package_names are not enforced. + * + * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_all_package_names = false; + /** + * Optional. Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + * + * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_package_names; + /** + * Optional. Set to true for keys that are used in an Android application that + * is available for download in app stores in addition to the Google Play + * Store. + * + * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $support_non_google_app_store_distribution = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $allow_all_package_names + * Optional. If set to true, allowed_package_names are not enforced. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_package_names + * Optional. Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + * @type bool $support_non_google_app_store_distribution + * Optional. Set to true for keys that are used in an Android application that + * is available for download in app stores in addition to the Google Play + * Store. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If set to true, allowed_package_names are not enforced. + * + * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowAllPackageNames() + { + return $this->allow_all_package_names; + } + + /** + * Optional. If set to true, allowed_package_names are not enforced. + * + * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowAllPackageNames($var) + { + GPBUtil::checkBool($var); + $this->allow_all_package_names = $var; + + return $this; + } + + /** + * Optional. Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + * + * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedPackageNames() + { + return $this->allowed_package_names; + } + + /** + * Optional. Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + * + * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedPackageNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_package_names = $arr; + + return $this; + } + + /** + * Optional. Set to true for keys that are used in an Android application that + * is available for download in app stores in addition to the Google Play + * Store. + * + * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSupportNonGoogleAppStoreDistribution() + { + return $this->support_non_google_app_store_distribution; + } + + /** + * Optional. Set to true for keys that are used in an Android application that + * is available for download in app stores in addition to the Google Play + * Store. + * + * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSupportNonGoogleAppStoreDistribution($var) + { + GPBUtil::checkBool($var); + $this->support_non_google_app_store_distribution = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php new file mode 100644 index 000000000000..e2a10ba13c89 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php @@ -0,0 +1,303 @@ +google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest + */ +class AnnotateAssessmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Assessment, in the format + * `projects/{project}/assessments/{assessment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $annotation = 0; + /** + * Optional. Reasons for the annotation that are assigned to the event. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $reasons; + /** + * Optional. A stable account identifier to apply to the assessment. This is + * an alternative to setting `account_id` in `CreateAssessment`, for example + * when a stable account identifier is not yet known in the initial request. + * + * Generated from protobuf field string account_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $account_id = ''; + /** + * Optional. A stable hashed account identifier to apply to the assessment. + * This is an alternative to setting `hashed_account_id` in + * `CreateAssessment`, for example when a stable account identifier is not yet + * known in the initial request. + * + * Generated from protobuf field bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hashed_account_id = ''; + /** + * Optional. If the assessment is part of a payment transaction, provide + * details on payment lifecycle events that occur in the transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $transaction_event = null; + + /** + * @param string $name Required. The resource name of the Assessment, in the format + * `projects/{project}/assessments/{assessment}`. Please see + * {@see RecaptchaEnterpriseServiceClient::assessmentName()} for help formatting this field. + * @param int $annotation Optional. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. + * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Annotation} + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest + * + * @experimental + */ + public static function build(string $name, int $annotation): self + { + return (new self()) + ->setName($name) + ->setAnnotation($annotation); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Assessment, in the format + * `projects/{project}/assessments/{assessment}`. + * @type int $annotation + * Optional. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. + * @type array|\Google\Protobuf\Internal\RepeatedField $reasons + * Optional. Reasons for the annotation that are assigned to the event. + * @type string $account_id + * Optional. A stable account identifier to apply to the assessment. This is + * an alternative to setting `account_id` in `CreateAssessment`, for example + * when a stable account identifier is not yet known in the initial request. + * @type string $hashed_account_id + * Optional. A stable hashed account identifier to apply to the assessment. + * This is an alternative to setting `hashed_account_id` in + * `CreateAssessment`, for example when a stable account identifier is not yet + * known in the initial request. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent $transaction_event + * Optional. If the assessment is part of a payment transaction, provide + * details on payment lifecycle events that occur in the transaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Assessment, in the format + * `projects/{project}/assessments/{assessment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Assessment, in the format + * `projects/{project}/assessments/{assessment}`. + * + * 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. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAnnotation() + { + return $this->annotation; + } + + /** + * Optional. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Annotation::class); + $this->annotation = $var; + + return $this; + } + + /** + * Optional. Reasons for the annotation that are assigned to the event. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasons() + { + return $this->reasons; + } + + /** + * Optional. Reasons for the annotation that are assigned to the event. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Reason::class); + $this->reasons = $arr; + + return $this; + } + + /** + * Optional. A stable account identifier to apply to the assessment. This is + * an alternative to setting `account_id` in `CreateAssessment`, for example + * when a stable account identifier is not yet known in the initial request. + * + * Generated from protobuf field string account_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccountId() + { + return $this->account_id; + } + + /** + * Optional. A stable account identifier to apply to the assessment. This is + * an alternative to setting `account_id` in `CreateAssessment`, for example + * when a stable account identifier is not yet known in the initial request. + * + * Generated from protobuf field string account_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccountId($var) + { + GPBUtil::checkString($var, True); + $this->account_id = $var; + + return $this; + } + + /** + * Optional. A stable hashed account identifier to apply to the assessment. + * This is an alternative to setting `hashed_account_id` in + * `CreateAssessment`, for example when a stable account identifier is not yet + * known in the initial request. + * + * Generated from protobuf field bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHashedAccountId() + { + return $this->hashed_account_id; + } + + /** + * Optional. A stable hashed account identifier to apply to the assessment. + * This is an alternative to setting `hashed_account_id` in + * `CreateAssessment`, for example when a stable account identifier is not yet + * known in the initial request. + * + * Generated from protobuf field bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHashedAccountId($var) + { + GPBUtil::checkString($var, False); + $this->hashed_account_id = $var; + + return $this; + } + + /** + * Optional. If the assessment is part of a payment transaction, provide + * details on payment lifecycle events that occur in the transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent|null + */ + public function getTransactionEvent() + { + return $this->transaction_event; + } + + public function hasTransactionEvent() + { + return isset($this->transaction_event); + } + + public function clearTransactionEvent() + { + unset($this->transaction_event); + } + + /** + * Optional. If the assessment is part of a payment transaction, provide + * details on payment lifecycle events that occur in the transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent $var + * @return $this + */ + public function setTransactionEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent::class); + $this->transaction_event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php new file mode 100644 index 000000000000..d46aa93d147d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php @@ -0,0 +1,82 @@ +google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation + */ +class Annotation +{ + /** + * Default unspecified type. + * + * Generated from protobuf enum ANNOTATION_UNSPECIFIED = 0; + */ + const ANNOTATION_UNSPECIFIED = 0; + /** + * Provides information that the event turned out to be legitimate. + * + * Generated from protobuf enum LEGITIMATE = 1; + */ + const LEGITIMATE = 1; + /** + * Provides information that the event turned out to be fraudulent. + * + * Generated from protobuf enum FRAUDULENT = 2; + */ + const FRAUDULENT = 2; + /** + * Provides information that the event was related to a login event in which + * the user typed the correct password. Deprecated, prefer indicating + * CORRECT_PASSWORD through the reasons field instead. + * + * Generated from protobuf enum PASSWORD_CORRECT = 3 [deprecated = true]; + */ + const PASSWORD_CORRECT = 3; + /** + * Provides information that the event was related to a login event in which + * the user typed the incorrect password. Deprecated, prefer indicating + * INCORRECT_PASSWORD through the reasons field instead. + * + * Generated from protobuf enum PASSWORD_INCORRECT = 4 [deprecated = true]; + */ + const PASSWORD_INCORRECT = 4; + + private static $valueToName = [ + self::ANNOTATION_UNSPECIFIED => 'ANNOTATION_UNSPECIFIED', + self::LEGITIMATE => 'LEGITIMATE', + self::FRAUDULENT => 'FRAUDULENT', + self::PASSWORD_CORRECT => 'PASSWORD_CORRECT', + self::PASSWORD_INCORRECT => 'PASSWORD_INCORRECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Annotation::class, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest_Annotation::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php new file mode 100644 index 000000000000..4b0d90d7be14 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php @@ -0,0 +1,165 @@ +google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason + */ +class Reason +{ + /** + * Default unspecified reason. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * Indicates that the transaction had a chargeback issued with no other + * details. When possible, specify the type by using CHARGEBACK_FRAUD or + * CHARGEBACK_DISPUTE instead. + * + * Generated from protobuf enum CHARGEBACK = 1; + */ + const CHARGEBACK = 1; + /** + * Indicates that the transaction had a chargeback issued related to an + * alleged unauthorized transaction from the cardholder's perspective (for + * example, the card number was stolen). + * + * Generated from protobuf enum CHARGEBACK_FRAUD = 8; + */ + const CHARGEBACK_FRAUD = 8; + /** + * Indicates that the transaction had a chargeback issued related to the + * cardholder having provided their card details but allegedly not being + * satisfied with the purchase (for example, misrepresentation, attempted + * cancellation). + * + * Generated from protobuf enum CHARGEBACK_DISPUTE = 9; + */ + const CHARGEBACK_DISPUTE = 9; + /** + * Indicates that the completed payment transaction was refunded by the + * seller. + * + * Generated from protobuf enum REFUND = 10; + */ + const REFUND = 10; + /** + * Indicates that the completed payment transaction was determined to be + * fraudulent by the seller, and was cancelled and refunded as a result. + * + * Generated from protobuf enum REFUND_FRAUD = 11; + */ + const REFUND_FRAUD = 11; + /** + * Indicates that the payment transaction was accepted, and the user was + * charged. + * + * Generated from protobuf enum TRANSACTION_ACCEPTED = 12; + */ + const TRANSACTION_ACCEPTED = 12; + /** + * Indicates that the payment transaction was declined, for example due to + * invalid card details. + * + * Generated from protobuf enum TRANSACTION_DECLINED = 13; + */ + const TRANSACTION_DECLINED = 13; + /** + * Indicates the transaction associated with the assessment is suspected of + * being fraudulent based on the payment method, billing details, shipping + * address or other transaction information. + * + * Generated from protobuf enum PAYMENT_HEURISTICS = 2; + */ + const PAYMENT_HEURISTICS = 2; + /** + * Indicates that the user was served a 2FA challenge. An old assessment + * with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been + * overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow. + * This is equivalent to `FAILED_TWO_FACTOR`. + * + * Generated from protobuf enum INITIATED_TWO_FACTOR = 7; + */ + const INITIATED_TWO_FACTOR = 7; + /** + * Indicates that the user passed a 2FA challenge. + * + * Generated from protobuf enum PASSED_TWO_FACTOR = 3; + */ + const PASSED_TWO_FACTOR = 3; + /** + * Indicates that the user failed a 2FA challenge. + * + * Generated from protobuf enum FAILED_TWO_FACTOR = 4; + */ + const FAILED_TWO_FACTOR = 4; + /** + * Indicates the user provided the correct password. + * + * Generated from protobuf enum CORRECT_PASSWORD = 5; + */ + const CORRECT_PASSWORD = 5; + /** + * Indicates the user provided an incorrect password. + * + * Generated from protobuf enum INCORRECT_PASSWORD = 6; + */ + const INCORRECT_PASSWORD = 6; + /** + * Indicates that the user sent unwanted and abusive messages to other users + * of the platform, such as spam, scams, phishing, or social engineering. + * + * Generated from protobuf enum SOCIAL_SPAM = 14; + */ + const SOCIAL_SPAM = 14; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::CHARGEBACK => 'CHARGEBACK', + self::CHARGEBACK_FRAUD => 'CHARGEBACK_FRAUD', + self::CHARGEBACK_DISPUTE => 'CHARGEBACK_DISPUTE', + self::REFUND => 'REFUND', + self::REFUND_FRAUD => 'REFUND_FRAUD', + self::TRANSACTION_ACCEPTED => 'TRANSACTION_ACCEPTED', + self::TRANSACTION_DECLINED => 'TRANSACTION_DECLINED', + self::PAYMENT_HEURISTICS => 'PAYMENT_HEURISTICS', + self::INITIATED_TWO_FACTOR => 'INITIATED_TWO_FACTOR', + self::PASSED_TWO_FACTOR => 'PASSED_TWO_FACTOR', + self::FAILED_TWO_FACTOR => 'FAILED_TWO_FACTOR', + self::CORRECT_PASSWORD => 'CORRECT_PASSWORD', + self::INCORRECT_PASSWORD => 'INCORRECT_PASSWORD', + self::SOCIAL_SPAM => 'SOCIAL_SPAM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reason::class, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest_Reason::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php new file mode 100644 index 000000000000..f38a573bcb4d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php @@ -0,0 +1,33 @@ +google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse + */ +class AnnotateAssessmentResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php new file mode 100644 index 000000000000..3e68e2c4d4a8 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php @@ -0,0 +1,147 @@ +google.cloud.recaptchaenterprise.v1.AppleDeveloperId + */ +class AppleDeveloperId extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input only. A private key (downloaded as a text file with a .p8 + * file extension) generated for your Apple Developer account. Ensure that + * Apple DeviceCheck is enabled for the private key. + * + * Generated from protobuf field string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $private_key = ''; + /** + * Required. The Apple developer key ID (10-character string). + * + * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_id = ''; + /** + * Required. The Apple team ID (10-character string) owning the provisioning + * profile used to build your application. + * + * Generated from protobuf field string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $team_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_key + * Required. Input only. A private key (downloaded as a text file with a .p8 + * file extension) generated for your Apple Developer account. Ensure that + * Apple DeviceCheck is enabled for the private key. + * @type string $key_id + * Required. The Apple developer key ID (10-character string). + * @type string $team_id + * Required. The Apple team ID (10-character string) owning the provisioning + * profile used to build your application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input only. A private key (downloaded as a text file with a .p8 + * file extension) generated for your Apple Developer account. Ensure that + * Apple DeviceCheck is enabled for the private key. + * + * Generated from protobuf field string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPrivateKey() + { + return $this->private_key; + } + + /** + * Required. Input only. A private key (downloaded as a text file with a .p8 + * file extension) generated for your Apple Developer account. Ensure that + * Apple DeviceCheck is enabled for the private key. + * + * Generated from protobuf field string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrivateKey($var) + { + GPBUtil::checkString($var, True); + $this->private_key = $var; + + return $this; + } + + /** + * Required. The Apple developer key ID (10-character string). + * + * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKeyId() + { + return $this->key_id; + } + + /** + * Required. The Apple developer key ID (10-character string). + * + * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKeyId($var) + { + GPBUtil::checkString($var, True); + $this->key_id = $var; + + return $this; + } + + /** + * Required. The Apple team ID (10-character string) owning the provisioning + * profile used to build your application. + * + * Generated from protobuf field string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTeamId() + { + return $this->team_id; + } + + /** + * Required. The Apple team ID (10-character string) owning the provisioning + * profile used to build your application. + * + * Generated from protobuf field string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTeamId($var) + { + GPBUtil::checkString($var, True); + $this->team_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php new file mode 100644 index 000000000000..841569a1b296 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php @@ -0,0 +1,599 @@ +google.cloud.recaptchaenterprise.v1.Assessment + */ +class Assessment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name for the Assessment in the format + * `projects/{project}/assessments/{assessment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The event being assessed. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event = null; + /** + * Output only. The risk analysis result for the event being assessed. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $risk_analysis = null; + /** + * Output only. Properties of the provided event token. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $token_properties = null; + /** + * Optional. Account verification information for identity verification. The + * assessment event must include a token and site key to use this feature. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $account_verification = null; + /** + * Output only. Assessment returned by account defender when an account + * identifier is provided. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $account_defender_assessment = null; + /** + * Optional. The private password leak verification field contains the + * parameters that are used to to check for leaks privately without sharing + * user credentials. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $private_password_leak_verification = null; + /** + * Output only. Assessment returned when firewall policies belonging to the + * project are evaluated using the field firewall_policy_evaluation. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $firewall_policy_assessment = null; + /** + * Output only. Assessment returned by Fraud Prevention when TransactionData + * is provided. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $fraud_prevention_assessment = null; + /** + * Output only. Fraud Signals specific to the users involved in a payment + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $fraud_signals = null; + /** + * Output only. Assessment returned when a site key, a token, and a phone + * number as `user_id` are provided. Account defender and SMS toll fraud + * protection need to be enabled. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $phone_fraud_assessment = null; + /** + * Optional. The environment creating the assessment. This describes your + * environment (the system invoking CreateAssessment), NOT the environment of + * your user. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $assessment_environment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name for the Assessment in the format + * `projects/{project}/assessments/{assessment}`. + * @type \Google\Cloud\RecaptchaEnterprise\V1\Event $event + * Optional. The event being assessed. + * @type \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis $risk_analysis + * Output only. The risk analysis result for the event being assessed. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties $token_properties + * Output only. Properties of the provided event token. + * @type \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo $account_verification + * Optional. Account verification information for identity verification. The + * assessment event must include a token and site key to use this feature. + * @type \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment $account_defender_assessment + * Output only. Assessment returned by account defender when an account + * identifier is provided. + * @type \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification $private_password_leak_verification + * Optional. The private password leak verification field contains the + * parameters that are used to to check for leaks privately without sharing + * user credentials. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment $firewall_policy_assessment + * Output only. Assessment returned when firewall policies belonging to the + * project are evaluated using the field firewall_policy_evaluation. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment $fraud_prevention_assessment + * Output only. Assessment returned by Fraud Prevention when TransactionData + * is provided. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals $fraud_signals + * Output only. Fraud Signals specific to the users involved in a payment + * transaction. + * @type \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment $phone_fraud_assessment + * Output only. Assessment returned when a site key, a token, and a phone + * number as `user_id` are provided. Account defender and SMS toll fraud + * protection need to be enabled. + * @type \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment $assessment_environment + * Optional. The environment creating the assessment. This describes your + * environment (the system invoking CreateAssessment), NOT the environment of + * your user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name for the Assessment in the format + * `projects/{project}/assessments/{assessment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The resource name for the Assessment in the format + * `projects/{project}/assessments/{assessment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The event being assessed. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Optional. The event being assessed. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Event::class); + $this->event = $var; + + return $this; + } + + /** + * Output only. The risk analysis result for the event being assessed. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis|null + */ + public function getRiskAnalysis() + { + return $this->risk_analysis; + } + + public function hasRiskAnalysis() + { + return isset($this->risk_analysis); + } + + public function clearRiskAnalysis() + { + unset($this->risk_analysis); + } + + /** + * Output only. The risk analysis result for the event being assessed. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis $var + * @return $this + */ + public function setRiskAnalysis($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis::class); + $this->risk_analysis = $var; + + return $this; + } + + /** + * Output only. Properties of the provided event token. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties|null + */ + public function getTokenProperties() + { + return $this->token_properties; + } + + public function hasTokenProperties() + { + return isset($this->token_properties); + } + + public function clearTokenProperties() + { + unset($this->token_properties); + } + + /** + * Output only. Properties of the provided event token. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties $var + * @return $this + */ + public function setTokenProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties::class); + $this->token_properties = $var; + + return $this; + } + + /** + * Optional. Account verification information for identity verification. The + * assessment event must include a token and site key to use this feature. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo|null + */ + public function getAccountVerification() + { + return $this->account_verification; + } + + public function hasAccountVerification() + { + return isset($this->account_verification); + } + + public function clearAccountVerification() + { + unset($this->account_verification); + } + + /** + * Optional. Account verification information for identity verification. The + * assessment event must include a token and site key to use this feature. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo $var + * @return $this + */ + public function setAccountVerification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo::class); + $this->account_verification = $var; + + return $this; + } + + /** + * Output only. Assessment returned by account defender when an account + * identifier is provided. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment|null + */ + public function getAccountDefenderAssessment() + { + return $this->account_defender_assessment; + } + + public function hasAccountDefenderAssessment() + { + return isset($this->account_defender_assessment); + } + + public function clearAccountDefenderAssessment() + { + unset($this->account_defender_assessment); + } + + /** + * Output only. Assessment returned by account defender when an account + * identifier is provided. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment $var + * @return $this + */ + public function setAccountDefenderAssessment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment::class); + $this->account_defender_assessment = $var; + + return $this; + } + + /** + * Optional. The private password leak verification field contains the + * parameters that are used to to check for leaks privately without sharing + * user credentials. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification|null + */ + public function getPrivatePasswordLeakVerification() + { + return $this->private_password_leak_verification; + } + + public function hasPrivatePasswordLeakVerification() + { + return isset($this->private_password_leak_verification); + } + + public function clearPrivatePasswordLeakVerification() + { + unset($this->private_password_leak_verification); + } + + /** + * Optional. The private password leak verification field contains the + * parameters that are used to to check for leaks privately without sharing + * user credentials. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification $var + * @return $this + */ + public function setPrivatePasswordLeakVerification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification::class); + $this->private_password_leak_verification = $var; + + return $this; + } + + /** + * Output only. Assessment returned when firewall policies belonging to the + * project are evaluated using the field firewall_policy_evaluation. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment|null + */ + public function getFirewallPolicyAssessment() + { + return $this->firewall_policy_assessment; + } + + public function hasFirewallPolicyAssessment() + { + return isset($this->firewall_policy_assessment); + } + + public function clearFirewallPolicyAssessment() + { + unset($this->firewall_policy_assessment); + } + + /** + * Output only. Assessment returned when firewall policies belonging to the + * project are evaluated using the field firewall_policy_evaluation. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment $var + * @return $this + */ + public function setFirewallPolicyAssessment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment::class); + $this->firewall_policy_assessment = $var; + + return $this; + } + + /** + * Output only. Assessment returned by Fraud Prevention when TransactionData + * is provided. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment|null + */ + public function getFraudPreventionAssessment() + { + return $this->fraud_prevention_assessment; + } + + public function hasFraudPreventionAssessment() + { + return isset($this->fraud_prevention_assessment); + } + + public function clearFraudPreventionAssessment() + { + unset($this->fraud_prevention_assessment); + } + + /** + * Output only. Assessment returned by Fraud Prevention when TransactionData + * is provided. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment $var + * @return $this + */ + public function setFraudPreventionAssessment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment::class); + $this->fraud_prevention_assessment = $var; + + return $this; + } + + /** + * Output only. Fraud Signals specific to the users involved in a payment + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals|null + */ + public function getFraudSignals() + { + return $this->fraud_signals; + } + + public function hasFraudSignals() + { + return isset($this->fraud_signals); + } + + public function clearFraudSignals() + { + unset($this->fraud_signals); + } + + /** + * Output only. Fraud Signals specific to the users involved in a payment + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals $var + * @return $this + */ + public function setFraudSignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals::class); + $this->fraud_signals = $var; + + return $this; + } + + /** + * Output only. Assessment returned when a site key, a token, and a phone + * number as `user_id` are provided. Account defender and SMS toll fraud + * protection need to be enabled. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment|null + */ + public function getPhoneFraudAssessment() + { + return $this->phone_fraud_assessment; + } + + public function hasPhoneFraudAssessment() + { + return isset($this->phone_fraud_assessment); + } + + public function clearPhoneFraudAssessment() + { + unset($this->phone_fraud_assessment); + } + + /** + * Output only. Assessment returned when a site key, a token, and a phone + * number as `user_id` are provided. Account defender and SMS toll fraud + * protection need to be enabled. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment $var + * @return $this + */ + public function setPhoneFraudAssessment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment::class); + $this->phone_fraud_assessment = $var; + + return $this; + } + + /** + * Optional. The environment creating the assessment. This describes your + * environment (the system invoking CreateAssessment), NOT the environment of + * your user. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment|null + */ + public function getAssessmentEnvironment() + { + return $this->assessment_environment; + } + + public function hasAssessmentEnvironment() + { + return isset($this->assessment_environment); + } + + public function clearAssessmentEnvironment() + { + unset($this->assessment_environment); + } + + /** + * Optional. The environment creating the assessment. This describes your + * environment (the system invoking CreateAssessment), NOT the environment of + * your user. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment $var + * @return $this + */ + public function setAssessmentEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment::class); + $this->assessment_environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php new file mode 100644 index 000000000000..049d27d43544 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php @@ -0,0 +1,126 @@ +google.cloud.recaptchaenterprise.v1.AssessmentEnvironment + */ +class AssessmentEnvironment extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Identifies the client module initiating the CreateAssessment + * request. This can be the link to the client module's project. Examples + * include: + * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" + * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" + * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" + * - "wordpress.org/plugins/recaptcha-something" + * + * Generated from protobuf field string client = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client = ''; + /** + * Optional. The version of the client module. For example, "1.0.0". + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client + * Optional. Identifies the client module initiating the CreateAssessment + * request. This can be the link to the client module's project. Examples + * include: + * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" + * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" + * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" + * - "wordpress.org/plugins/recaptcha-something" + * @type string $version + * Optional. The version of the client module. For example, "1.0.0". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Identifies the client module initiating the CreateAssessment + * request. This can be the link to the client module's project. Examples + * include: + * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" + * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" + * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" + * - "wordpress.org/plugins/recaptcha-something" + * + * Generated from protobuf field string client = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Optional. Identifies the client module initiating the CreateAssessment + * request. This can be the link to the client module's project. Examples + * include: + * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" + * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" + * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" + * - "wordpress.org/plugins/recaptcha-something" + * + * Generated from protobuf field string client = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Optional. The version of the client module. For example, "1.0.0". + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The version of the client module. For example, "1.0.0". + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php new file mode 100644 index 000000000000..a1ce9c36cfc4 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php @@ -0,0 +1,185 @@ +google.cloud.recaptchaenterprise.v1.ChallengeMetrics + */ +class ChallengeMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent + * to a count of pageloads for pages that include reCAPTCHA. + * + * Generated from protobuf field int64 pageload_count = 1; + */ + protected $pageload_count = 0; + /** + * Count of nocaptchas (successful verification without a challenge) issued. + * + * Generated from protobuf field int64 nocaptcha_count = 2; + */ + protected $nocaptcha_count = 0; + /** + * Count of submitted challenge solutions that were incorrect or otherwise + * deemed suspicious such that a subsequent challenge was triggered. + * + * Generated from protobuf field int64 failed_count = 3; + */ + protected $failed_count = 0; + /** + * Count of nocaptchas (successful verification without a challenge) plus + * submitted challenge solutions that were correct and resulted in + * verification. + * + * Generated from protobuf field int64 passed_count = 4; + */ + protected $passed_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $pageload_count + * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent + * to a count of pageloads for pages that include reCAPTCHA. + * @type int|string $nocaptcha_count + * Count of nocaptchas (successful verification without a challenge) issued. + * @type int|string $failed_count + * Count of submitted challenge solutions that were incorrect or otherwise + * deemed suspicious such that a subsequent challenge was triggered. + * @type int|string $passed_count + * Count of nocaptchas (successful verification without a challenge) plus + * submitted challenge solutions that were correct and resulted in + * verification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent + * to a count of pageloads for pages that include reCAPTCHA. + * + * Generated from protobuf field int64 pageload_count = 1; + * @return int|string + */ + public function getPageloadCount() + { + return $this->pageload_count; + } + + /** + * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent + * to a count of pageloads for pages that include reCAPTCHA. + * + * Generated from protobuf field int64 pageload_count = 1; + * @param int|string $var + * @return $this + */ + public function setPageloadCount($var) + { + GPBUtil::checkInt64($var); + $this->pageload_count = $var; + + return $this; + } + + /** + * Count of nocaptchas (successful verification without a challenge) issued. + * + * Generated from protobuf field int64 nocaptcha_count = 2; + * @return int|string + */ + public function getNocaptchaCount() + { + return $this->nocaptcha_count; + } + + /** + * Count of nocaptchas (successful verification without a challenge) issued. + * + * Generated from protobuf field int64 nocaptcha_count = 2; + * @param int|string $var + * @return $this + */ + public function setNocaptchaCount($var) + { + GPBUtil::checkInt64($var); + $this->nocaptcha_count = $var; + + return $this; + } + + /** + * Count of submitted challenge solutions that were incorrect or otherwise + * deemed suspicious such that a subsequent challenge was triggered. + * + * Generated from protobuf field int64 failed_count = 3; + * @return int|string + */ + public function getFailedCount() + { + return $this->failed_count; + } + + /** + * Count of submitted challenge solutions that were incorrect or otherwise + * deemed suspicious such that a subsequent challenge was triggered. + * + * Generated from protobuf field int64 failed_count = 3; + * @param int|string $var + * @return $this + */ + public function setFailedCount($var) + { + GPBUtil::checkInt64($var); + $this->failed_count = $var; + + return $this; + } + + /** + * Count of nocaptchas (successful verification without a challenge) plus + * submitted challenge solutions that were correct and resulted in + * verification. + * + * Generated from protobuf field int64 passed_count = 4; + * @return int|string + */ + public function getPassedCount() + { + return $this->passed_count; + } + + /** + * Count of nocaptchas (successful verification without a challenge) plus + * submitted challenge solutions that were correct and resulted in + * verification. + * + * Generated from protobuf field int64 passed_count = 4; + * @param int|string $var + * @return $this + */ + public function setPassedCount($var) + { + GPBUtil::checkInt64($var); + $this->passed_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php new file mode 100644 index 000000000000..942b225a585f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php @@ -0,0 +1,132 @@ +google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest + */ +class CreateAssessmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project in which the assessment is created, + * in the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The assessment details. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Assessment assessment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $assessment = null; + + /** + * @param string $parent Required. The name of the project in which the assessment is created, + * in the format `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\RecaptchaEnterprise\V1\Assessment $assessment Required. The assessment details. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\CreateAssessmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\RecaptchaEnterprise\V1\Assessment $assessment): self + { + return (new self()) + ->setParent($parent) + ->setAssessment($assessment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project in which the assessment is created, + * in the format `projects/{project}`. + * @type \Google\Cloud\RecaptchaEnterprise\V1\Assessment $assessment + * Required. The assessment details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project in which the assessment is created, + * in the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project in which the assessment is created, + * in the format `projects/{project}`. + * + * 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 assessment details. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Assessment assessment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\Assessment|null + */ + public function getAssessment() + { + return $this->assessment; + } + + public function hasAssessment() + { + return isset($this->assessment); + } + + public function clearAssessment() + { + unset($this->assessment); + } + + /** + * Required. The assessment details. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Assessment assessment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\Assessment $var + * @return $this + */ + public function setAssessment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Assessment::class); + $this->assessment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php new file mode 100644 index 000000000000..0ffdf73d76d2 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php @@ -0,0 +1,132 @@ +google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest + */ +class CreateFirewallPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project this policy applies to, in the format + * `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Information to create the policy. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_policy = null; + + /** + * @param string $parent Required. The name of the project this policy applies to, in the format + * `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy Required. Information to create the policy. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\CreateFirewallPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy): self + { + return (new self()) + ->setParent($parent) + ->setFirewallPolicy($firewallPolicy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project this policy applies to, in the format + * `projects/{project}`. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewall_policy + * Required. Information to create the policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project this policy applies to, in the format + * `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project this policy applies to, in the format + * `projects/{project}`. + * + * 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. Information to create the policy. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy|null + */ + public function getFirewallPolicy() + { + return $this->firewall_policy; + } + + public function hasFirewallPolicy() + { + return isset($this->firewall_policy); + } + + public function clearFirewallPolicy() + { + unset($this->firewall_policy); + } + + /** + * Required. Information to create the policy. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $var + * @return $this + */ + public function setFirewallPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); + $this->firewall_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php new file mode 100644 index 000000000000..24d4ef5c9285 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php @@ -0,0 +1,132 @@ +google.cloud.recaptchaenterprise.v1.CreateKeyRequest + */ +class CreateKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project in which the key is created, in the + * format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Information to create a reCAPTCHA Enterprise key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = null; + + /** + * @param string $parent Required. The name of the project in which the key is created, in the + * format `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $key Required. Information to create a reCAPTCHA Enterprise key. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\CreateKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\RecaptchaEnterprise\V1\Key $key): self + { + return (new self()) + ->setParent($parent) + ->setKey($key); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project in which the key is created, in the + * format `projects/{project}`. + * @type \Google\Cloud\RecaptchaEnterprise\V1\Key $key + * Required. Information to create a reCAPTCHA Enterprise key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project in which the key is created, in the + * format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project in which the key is created, in the + * format `projects/{project}`. + * + * 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. Information to create a reCAPTCHA Enterprise key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\Key|null + */ + public function getKey() + { + return $this->key; + } + + public function hasKey() + { + return isset($this->key); + } + + public function clearKey() + { + unset($this->key); + } + + /** + * Required. Information to create a reCAPTCHA Enterprise key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Key::class); + $this->key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php new file mode 100644 index 000000000000..8d57bd78b9bd --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest + */ +class DeleteFirewallPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * 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 policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. Please see + * {@see RecaptchaEnterpriseServiceClient::firewallPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\DeleteFirewallPolicyRequest + * + * @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 policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * 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 policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php new file mode 100644 index 000000000000..f949c7b62a31 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.recaptchaenterprise.v1.DeleteKeyRequest + */ +class DeleteKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the key to be deleted, in the format + * `projects/{project}/keys/{key}`. + * + * 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 key to be deleted, in the format + * `projects/{project}/keys/{key}`. Please see + * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\DeleteKeyRequest + * + * @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 key to be deleted, in the format + * `projects/{project}/keys/{key}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the key to be deleted, in the format + * `projects/{project}/keys/{key}`. + * + * 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 key to be deleted, in the format + * `projects/{project}/keys/{key}`. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php new file mode 100644 index 000000000000..44cd0299f8f6 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php @@ -0,0 +1,197 @@ +google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo + */ +class EndpointVerificationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Token to provide to the client to trigger endpoint + * verification. It must be used within 15 minutes. + * + * Generated from protobuf field string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $request_token = ''; + /** + * Output only. Timestamp of the last successful verification for the + * endpoint, if any. + * + * Generated from protobuf field .google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_verification_time = null; + protected $endpoint; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email_address + * Email address for which to trigger a verification request. + * @type string $phone_number + * Phone number for which to trigger a verification request. Should be given + * in E.164 format. + * @type string $request_token + * Output only. Token to provide to the client to trigger endpoint + * verification. It must be used within 15 minutes. + * @type \Google\Protobuf\Timestamp $last_verification_time + * Output only. Timestamp of the last successful verification for the + * endpoint, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Email address for which to trigger a verification request. + * + * Generated from protobuf field string email_address = 1; + * @return string + */ + public function getEmailAddress() + { + return $this->readOneof(1); + } + + public function hasEmailAddress() + { + return $this->hasOneof(1); + } + + /** + * Email address for which to trigger a verification request. + * + * Generated from protobuf field string email_address = 1; + * @param string $var + * @return $this + */ + public function setEmailAddress($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Phone number for which to trigger a verification request. Should be given + * in E.164 format. + * + * Generated from protobuf field string phone_number = 2; + * @return string + */ + public function getPhoneNumber() + { + return $this->readOneof(2); + } + + public function hasPhoneNumber() + { + return $this->hasOneof(2); + } + + /** + * Phone number for which to trigger a verification request. Should be given + * in E.164 format. + * + * Generated from protobuf field string phone_number = 2; + * @param string $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. Token to provide to the client to trigger endpoint + * verification. It must be used within 15 minutes. + * + * Generated from protobuf field string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRequestToken() + { + return $this->request_token; + } + + /** + * Output only. Token to provide to the client to trigger endpoint + * verification. It must be used within 15 minutes. + * + * Generated from protobuf field string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRequestToken($var) + { + GPBUtil::checkString($var, True); + $this->request_token = $var; + + return $this; + } + + /** + * Output only. Timestamp of the last successful verification for the + * endpoint, if any. + * + * Generated from protobuf field .google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastVerificationTime() + { + return $this->last_verification_time; + } + + public function hasLastVerificationTime() + { + return isset($this->last_verification_time); + } + + public function clearLastVerificationTime() + { + unset($this->last_verification_time); + } + + /** + * Output only. Timestamp of the last successful verification for the + * endpoint, if any. + * + * Generated from protobuf field .google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastVerificationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_verification_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getEndpoint() + { + return $this->whichOneof("endpoint"); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php new file mode 100644 index 000000000000..bffdd6b41357 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php @@ -0,0 +1,640 @@ +google.cloud.recaptchaenterprise.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The user response token provided by the reCAPTCHA Enterprise + * client-side integration on your site. + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $token = ''; + /** + * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your + * site and generate the token. + * + * Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $site_key = ''; + /** + * Optional. The user agent present in the request from the user's device + * related to this event. + * + * Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $user_agent = ''; + /** + * Optional. The IP address in the request from the user's device related to + * this event. + * + * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $user_ip_address = ''; + /** + * Optional. The expected action for this type of event. This should be the + * same action provided at token generation time on client-side platforms + * already integrated with recaptcha enterprise. + * + * Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $expected_action = ''; + /** + * Optional. Deprecated: use `user_info.account_id` instead. + * Unique stable hashed user identifier for the request. The identifier must + * be hashed using hmac-sha256 with stable secret. + * + * Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $hashed_account_id = ''; + /** + * Optional. Flag for a reCAPTCHA express request for an assessment without a + * token. If enabled, `site_key` must reference an Express site key. + * + * Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $express = false; + /** + * Optional. The URI resource the user requested that triggered an assessment. + * + * Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $requested_uri = ''; + /** + * Optional. Flag for running WAF token assessment. + * If enabled, the token must be specified, and have been created by a + * WAF-enabled key. + * + * Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $waf_token_assessment = false; + /** + * Optional. JA3 fingerprint for SSL clients. + * + * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ja3 = ''; + /** + * Optional. HTTP header information about the request. + * + * Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $headers; + /** + * Optional. Flag for enabling firewall policy config assessment. + * If this flag is enabled, the firewall policy is evaluated and a + * suggested firewall action is returned in the response. + * + * Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $firewall_policy_evaluation = false; + /** + * Optional. Data describing a payment transaction to be assessed. Sending + * this data enables reCAPTCHA Enterprise Fraud Prevention and the + * FraudPreventionAssessment component in the response. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $transaction_data = null; + /** + * Optional. Information about the user that generates this event, when they + * can be identified. They are often identified through the use of an account + * for logged-in requests or login/registration requests, or by providing user + * identifiers for guest actions like checkout. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $user_info = null; + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $fraud_prevention = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token + * Optional. The user response token provided by the reCAPTCHA Enterprise + * client-side integration on your site. + * @type string $site_key + * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your + * site and generate the token. + * @type string $user_agent + * Optional. The user agent present in the request from the user's device + * related to this event. + * @type string $user_ip_address + * Optional. The IP address in the request from the user's device related to + * this event. + * @type string $expected_action + * Optional. The expected action for this type of event. This should be the + * same action provided at token generation time on client-side platforms + * already integrated with recaptcha enterprise. + * @type string $hashed_account_id + * Optional. Deprecated: use `user_info.account_id` instead. + * Unique stable hashed user identifier for the request. The identifier must + * be hashed using hmac-sha256 with stable secret. + * @type bool $express + * Optional. Flag for a reCAPTCHA express request for an assessment without a + * token. If enabled, `site_key` must reference an Express site key. + * @type string $requested_uri + * Optional. The URI resource the user requested that triggered an assessment. + * @type bool $waf_token_assessment + * Optional. Flag for running WAF token assessment. + * If enabled, the token must be specified, and have been created by a + * WAF-enabled key. + * @type string $ja3 + * Optional. JA3 fingerprint for SSL clients. + * @type array|\Google\Protobuf\Internal\RepeatedField $headers + * Optional. HTTP header information about the request. + * @type bool $firewall_policy_evaluation + * Optional. Flag for enabling firewall policy config assessment. + * If this flag is enabled, the firewall policy is evaluated and a + * suggested firewall action is returned in the response. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData $transaction_data + * Optional. Data describing a payment transaction to be assessed. Sending + * this data enables reCAPTCHA Enterprise Fraud Prevention and the + * FraudPreventionAssessment component in the response. + * @type \Google\Cloud\RecaptchaEnterprise\V1\UserInfo $user_info + * Optional. Information about the user that generates this event, when they + * can be identified. They are often identified through the use of an account + * for logged-in requests or login/registration requests, or by providing user + * identifiers for guest actions like checkout. + * @type int $fraud_prevention + * Optional. The Fraud Prevention setting for this assessment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The user response token provided by the reCAPTCHA Enterprise + * client-side integration on your site. + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Optional. The user response token provided by the reCAPTCHA Enterprise + * client-side integration on your site. + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your + * site and generate the token. + * + * Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSiteKey() + { + return $this->site_key; + } + + /** + * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your + * site and generate the token. + * + * Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSiteKey($var) + { + GPBUtil::checkString($var, True); + $this->site_key = $var; + + return $this; + } + + /** + * Optional. The user agent present in the request from the user's device + * related to this event. + * + * Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * Optional. The user agent present in the request from the user's device + * related to this event. + * + * Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkString($var, True); + $this->user_agent = $var; + + return $this; + } + + /** + * Optional. The IP address in the request from the user's device related to + * this event. + * + * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getUserIpAddress() + { + return $this->user_ip_address; + } + + /** + * Optional. The IP address in the request from the user's device related to + * this event. + * + * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUserIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->user_ip_address = $var; + + return $this; + } + + /** + * Optional. The expected action for this type of event. This should be the + * same action provided at token generation time on client-side platforms + * already integrated with recaptcha enterprise. + * + * Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExpectedAction() + { + return $this->expected_action; + } + + /** + * Optional. The expected action for this type of event. This should be the + * same action provided at token generation time on client-side platforms + * already integrated with recaptcha enterprise. + * + * Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExpectedAction($var) + { + GPBUtil::checkString($var, True); + $this->expected_action = $var; + + return $this; + } + + /** + * Optional. Deprecated: use `user_info.account_id` instead. + * Unique stable hashed user identifier for the request. The identifier must + * be hashed using hmac-sha256 with stable secret. + * + * Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getHashedAccountId() + { + @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); + return $this->hashed_account_id; + } + + /** + * Optional. Deprecated: use `user_info.account_id` instead. + * Unique stable hashed user identifier for the request. The identifier must + * be hashed using hmac-sha256 with stable secret. + * + * Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setHashedAccountId($var) + { + @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, False); + $this->hashed_account_id = $var; + + return $this; + } + + /** + * Optional. Flag for a reCAPTCHA express request for an assessment without a + * token. If enabled, `site_key` must reference an Express site key. + * + * Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getExpress() + { + return $this->express; + } + + /** + * Optional. Flag for a reCAPTCHA express request for an assessment without a + * token. If enabled, `site_key` must reference an Express site key. + * + * Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setExpress($var) + { + GPBUtil::checkBool($var); + $this->express = $var; + + return $this; + } + + /** + * Optional. The URI resource the user requested that triggered an assessment. + * + * Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestedUri() + { + return $this->requested_uri; + } + + /** + * Optional. The URI resource the user requested that triggered an assessment. + * + * Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestedUri($var) + { + GPBUtil::checkString($var, True); + $this->requested_uri = $var; + + return $this; + } + + /** + * Optional. Flag for running WAF token assessment. + * If enabled, the token must be specified, and have been created by a + * WAF-enabled key. + * + * Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getWafTokenAssessment() + { + return $this->waf_token_assessment; + } + + /** + * Optional. Flag for running WAF token assessment. + * If enabled, the token must be specified, and have been created by a + * WAF-enabled key. + * + * Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setWafTokenAssessment($var) + { + GPBUtil::checkBool($var); + $this->waf_token_assessment = $var; + + return $this; + } + + /** + * Optional. JA3 fingerprint for SSL clients. + * + * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getJa3() + { + return $this->ja3; + } + + /** + * Optional. JA3 fingerprint for SSL clients. + * + * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setJa3($var) + { + GPBUtil::checkString($var, True); + $this->ja3 = $var; + + return $this; + } + + /** + * Optional. HTTP header information about the request. + * + * Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Optional. HTTP header information about the request. + * + * Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * Optional. Flag for enabling firewall policy config assessment. + * If this flag is enabled, the firewall policy is evaluated and a + * suggested firewall action is returned in the response. + * + * Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getFirewallPolicyEvaluation() + { + return $this->firewall_policy_evaluation; + } + + /** + * Optional. Flag for enabling firewall policy config assessment. + * If this flag is enabled, the firewall policy is evaluated and a + * suggested firewall action is returned in the response. + * + * Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setFirewallPolicyEvaluation($var) + { + GPBUtil::checkBool($var); + $this->firewall_policy_evaluation = $var; + + return $this; + } + + /** + * Optional. Data describing a payment transaction to be assessed. Sending + * this data enables reCAPTCHA Enterprise Fraud Prevention and the + * FraudPreventionAssessment component in the response. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData|null + */ + public function getTransactionData() + { + return $this->transaction_data; + } + + public function hasTransactionData() + { + return isset($this->transaction_data); + } + + public function clearTransactionData() + { + unset($this->transaction_data); + } + + /** + * Optional. Data describing a payment transaction to be assessed. Sending + * this data enables reCAPTCHA Enterprise Fraud Prevention and the + * FraudPreventionAssessment component in the response. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData $var + * @return $this + */ + public function setTransactionData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData::class); + $this->transaction_data = $var; + + return $this; + } + + /** + * Optional. Information about the user that generates this event, when they + * can be identified. They are often identified through the use of an account + * for logged-in requests or login/registration requests, or by providing user + * identifiers for guest actions like checkout. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\UserInfo|null + */ + public function getUserInfo() + { + return $this->user_info; + } + + public function hasUserInfo() + { + return isset($this->user_info); + } + + public function clearUserInfo() + { + unset($this->user_info); + } + + /** + * Optional. Information about the user that generates this event, when they + * can be identified. They are often identified through the use of an account + * for logged-in requests or login/registration requests, or by providing user + * identifiers for guest actions like checkout. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\UserInfo $var + * @return $this + */ + public function setUserInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\UserInfo::class); + $this->user_info = $var; + + return $this; + } + + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFraudPrevention() + { + return $this->fraud_prevention; + } + + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFraudPrevention($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\Event\FraudPrevention::class); + $this->fraud_prevention = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php new file mode 100644 index 000000000000..5650681f23e6 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php @@ -0,0 +1,70 @@ +google.cloud.recaptchaenterprise.v1.Event.FraudPrevention + */ +class FraudPrevention +{ + /** + * Default, unspecified setting. If opted in for automatic detection, + * `fraud_prevention_assessment` is returned based on the request. + * Otherwise, `fraud_prevention_assessment` is returned if + * `transaction_data` is present in the `Event` and Fraud Prevention is + * enabled in the Google Cloud console. + * + * Generated from protobuf enum FRAUD_PREVENTION_UNSPECIFIED = 0; + */ + const FRAUD_PREVENTION_UNSPECIFIED = 0; + /** + * Enable Fraud Prevention for this assessment, if Fraud Prevention is + * enabled in the Google Cloud console. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * Disable Fraud Prevention for this assessment, regardless of opt-in + * status or Google Cloud console settings. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::FRAUD_PREVENTION_UNSPECIFIED => 'FRAUD_PREVENTION_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FraudPrevention::class, \Google\Cloud\RecaptchaEnterprise\V1\Event_FraudPrevention::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php new file mode 100644 index 000000000000..6fcd12db202c --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php @@ -0,0 +1,33 @@ +google.cloud.recaptchaenterprise.v1.ExpressKeySettings + */ +class ExpressKeySettings extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php new file mode 100644 index 000000000000..b5be30f5734f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php @@ -0,0 +1,259 @@ +google.cloud.recaptchaenterprise.v1.FirewallAction + */ +class FirewallAction extends \Google\Protobuf\Internal\Message +{ + protected $firewall_action_oneof; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction $allow + * The user request did not match any policy and should be allowed + * access to the requested resource. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction $block + * This action denies access to a given page. The user gets an HTTP + * error code. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction $include_recaptcha_script + * This action injects reCAPTCHA JavaScript code into the HTML page + * returned by the site backend. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction $redirect + * This action redirects the request to a reCAPTCHA interstitial to + * attach a token. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction $substitute + * This action transparently serves a different page to an offending + * user. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction $set_header + * This action sets a custom header but allow the request to continue + * to the customer backend. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * The user request did not match any policy and should be allowed + * access to the requested resource. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction|null + */ + public function getAllow() + { + return $this->readOneof(1); + } + + public function hasAllow() + { + return $this->hasOneof(1); + } + + /** + * The user request did not match any policy and should be allowed + * access to the requested resource. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction $var + * @return $this + */ + public function setAllow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * This action denies access to a given page. The user gets an HTTP + * error code. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction|null + */ + public function getBlock() + { + return $this->readOneof(2); + } + + public function hasBlock() + { + return $this->hasOneof(2); + } + + /** + * This action denies access to a given page. The user gets an HTTP + * error code. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction $var + * @return $this + */ + public function setBlock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * This action injects reCAPTCHA JavaScript code into the HTML page + * returned by the site backend. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction include_recaptcha_script = 6; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction|null + */ + public function getIncludeRecaptchaScript() + { + return $this->readOneof(6); + } + + public function hasIncludeRecaptchaScript() + { + return $this->hasOneof(6); + } + + /** + * This action injects reCAPTCHA JavaScript code into the HTML page + * returned by the site backend. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction include_recaptcha_script = 6; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction $var + * @return $this + */ + public function setIncludeRecaptchaScript($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * This action redirects the request to a reCAPTCHA interstitial to + * attach a token. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction|null + */ + public function getRedirect() + { + return $this->readOneof(5); + } + + public function hasRedirect() + { + return $this->hasOneof(5); + } + + /** + * This action redirects the request to a reCAPTCHA interstitial to + * attach a token. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction $var + * @return $this + */ + public function setRedirect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * This action transparently serves a different page to an offending + * user. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction|null + */ + public function getSubstitute() + { + return $this->readOneof(3); + } + + public function hasSubstitute() + { + return $this->hasOneof(3); + } + + /** + * This action transparently serves a different page to an offending + * user. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction $var + * @return $this + */ + public function setSubstitute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * This action sets a custom header but allow the request to continue + * to the customer backend. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction|null + */ + public function getSetHeader() + { + return $this->readOneof(4); + } + + public function hasSetHeader() + { + return $this->hasOneof(4); + } + + /** + * This action sets a custom header but allow the request to continue + * to the customer backend. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction $var + * @return $this + */ + public function setSetHeader($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getFirewallActionOneof() + { + return $this->whichOneof("firewall_action_oneof"); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php new file mode 100644 index 000000000000..20547eb88cfb --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php @@ -0,0 +1,36 @@ +google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction + */ +class AllowAction extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AllowAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_AllowAction::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php new file mode 100644 index 000000000000..a8793c63387b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php @@ -0,0 +1,37 @@ +google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction + */ +class BlockAction extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BlockAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_BlockAction::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php new file mode 100644 index 000000000000..9c2df380e9b8 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php @@ -0,0 +1,40 @@ +google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction + */ +class IncludeRecaptchaScriptAction extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IncludeRecaptchaScriptAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_IncludeRecaptchaScriptAction::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php new file mode 100644 index 000000000000..308c3b4c9f5a --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php @@ -0,0 +1,37 @@ +google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction + */ +class RedirectAction extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RedirectAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_RedirectAction::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php new file mode 100644 index 000000000000..65d715f16ef0 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php @@ -0,0 +1,106 @@ +google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + */ +class SetHeaderAction extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The header key to set in the request to the backend server. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key = ''; + /** + * Optional. The header value to set in the request to the backend server. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Optional. The header key to set in the request to the backend server. + * @type string $value + * Optional. The header value to set in the request to the backend server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The header key to set in the request to the backend server. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Optional. The header key to set in the request to the backend server. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Optional. The header value to set in the request to the backend server. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. The header value to set in the request to the backend server. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SetHeaderAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_SetHeaderAction::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php new file mode 100644 index 000000000000..ed45d8090c8f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php @@ -0,0 +1,75 @@ +google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction + */ +class SubstituteAction extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The address to redirect to. The target is a relative path in + * the current host. Example: "/blog/404.html". + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Optional. The address to redirect to. The target is a relative path in + * the current host. Example: "/blog/404.html". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The address to redirect to. The target is a relative path in + * the current host. Example: "/blog/404.html". + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. The address to redirect to. The target is a relative path in + * the current host. Example: "/blog/404.html". + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SubstituteAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_SubstituteAction::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php new file mode 100644 index 000000000000..a034eab27923 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php @@ -0,0 +1,280 @@ +google.cloud.recaptchaenterprise.v1.FirewallPolicy + */ +class FirewallPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for the FirewallPolicy in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. A description of what this policy aims to achieve, for + * convenience purposes. The description can at most include 256 UTF-8 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The path for which this policy applies, specified as a glob + * pattern. For more information on glob, see the [manual + * page](https://man7.org/linux/man-pages/man7/glob.7.html). + * A path has a max length of 200 characters. + * + * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + /** + * Optional. A CEL (Common Expression Language) conditional expression that + * specifies if this policy applies to an incoming user request. If this + * condition evaluates to true and the requested path matched the path + * pattern, the associated actions should be executed by the caller. The + * condition string is checked for CEL syntax correctness on creation. For + * more information, see the [CEL spec](https://github.com/google/cel-spec) + * and its [language + * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). + * A condition has a max length of 500 characters. + * + * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $condition = ''; + /** + * Optional. The actions that the caller should take regarding user access. + * There should be at most one terminal action. A terminal action is any + * action that forces a response, such as `AllowAction`, + * `BlockAction` or `SubstituteAction`. + * Zero or more non-terminal actions such as `SetHeader` might be + * specified. A single policy can contain up to 16 actions. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $actions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for the FirewallPolicy in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @type string $description + * Optional. A description of what this policy aims to achieve, for + * convenience purposes. The description can at most include 256 UTF-8 + * characters. + * @type string $path + * Optional. The path for which this policy applies, specified as a glob + * pattern. For more information on glob, see the [manual + * page](https://man7.org/linux/man-pages/man7/glob.7.html). + * A path has a max length of 200 characters. + * @type string $condition + * Optional. A CEL (Common Expression Language) conditional expression that + * specifies if this policy applies to an incoming user request. If this + * condition evaluates to true and the requested path matched the path + * pattern, the associated actions should be executed by the caller. The + * condition string is checked for CEL syntax correctness on creation. For + * more information, see the [CEL spec](https://github.com/google/cel-spec) + * and its [language + * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). + * A condition has a max length of 500 characters. + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallAction>|\Google\Protobuf\Internal\RepeatedField $actions + * Optional. The actions that the caller should take regarding user access. + * There should be at most one terminal action. A terminal action is any + * action that forces a response, such as `AllowAction`, + * `BlockAction` or `SubstituteAction`. + * Zero or more non-terminal actions such as `SetHeader` might be + * specified. A single policy can contain up to 16 actions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for the FirewallPolicy in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for the FirewallPolicy in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A description of what this policy aims to achieve, for + * convenience purposes. The description can at most include 256 UTF-8 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of what this policy aims to achieve, for + * convenience purposes. The description can at most include 256 UTF-8 + * 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; + } + + /** + * Optional. The path for which this policy applies, specified as a glob + * pattern. For more information on glob, see the [manual + * page](https://man7.org/linux/man-pages/man7/glob.7.html). + * A path has a max length of 200 characters. + * + * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. The path for which this policy applies, specified as a glob + * pattern. For more information on glob, see the [manual + * page](https://man7.org/linux/man-pages/man7/glob.7.html). + * A path has a max length of 200 characters. + * + * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional. A CEL (Common Expression Language) conditional expression that + * specifies if this policy applies to an incoming user request. If this + * condition evaluates to true and the requested path matched the path + * pattern, the associated actions should be executed by the caller. The + * condition string is checked for CEL syntax correctness on creation. For + * more information, see the [CEL spec](https://github.com/google/cel-spec) + * and its [language + * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). + * A condition has a max length of 500 characters. + * + * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * Optional. A CEL (Common Expression Language) conditional expression that + * specifies if this policy applies to an incoming user request. If this + * condition evaluates to true and the requested path matched the path + * pattern, the associated actions should be executed by the caller. The + * condition string is checked for CEL syntax correctness on creation. For + * more information, see the [CEL spec](https://github.com/google/cel-spec) + * and its [language + * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). + * A condition has a max length of 500 characters. + * + * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * Optional. The actions that the caller should take regarding user access. + * There should be at most one terminal action. A terminal action is any + * action that forces a response, such as `AllowAction`, + * `BlockAction` or `SubstituteAction`. + * Zero or more non-terminal actions such as `SetHeader` might be + * specified. A single policy can contain up to 16 actions. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActions() + { + return $this->actions; + } + + /** + * Optional. The actions that the caller should take regarding user access. + * There should be at most one terminal action. A terminal action is any + * action that forces a response, such as `AllowAction`, + * `BlockAction` or `SubstituteAction`. + * Zero or more non-terminal actions such as `SetHeader` might be + * specified. A single policy can contain up to 16 actions. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallAction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction::class); + $this->actions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php new file mode 100644 index 000000000000..628b81b99597 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php @@ -0,0 +1,133 @@ +google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment + */ +class FirewallPolicyAssessment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. If the processing of a policy config fails, an error is + * populated and the firewall_policy is left empty. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The policy that matched the request. If more than one policy + * may match, this is the first match. If no policy matches the incoming + * request, the policy field is left empty. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $firewall_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $error + * Output only. If the processing of a policy config fails, an error is + * populated and the firewall_policy is left empty. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewall_policy + * Output only. The policy that matched the request. If more than one policy + * may match, this is the first match. If no policy matches the incoming + * request, the policy field is left empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. If the processing of a policy config fails, an error is + * populated and the firewall_policy is left empty. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. If the processing of a policy config fails, an error is + * populated and the firewall_policy is left empty. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The policy that matched the request. If more than one policy + * may match, this is the first match. If no policy matches the incoming + * request, the policy field is left empty. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy|null + */ + public function getFirewallPolicy() + { + return $this->firewall_policy; + } + + public function hasFirewallPolicy() + { + return isset($this->firewall_policy); + } + + public function clearFirewallPolicy() + { + unset($this->firewall_policy); + } + + /** + * Output only. The policy that matched the request. If more than one policy + * may match, this is the first match. If no policy matches the incoming + * request, the policy field is left empty. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $var + * @return $this + */ + public function setFirewallPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); + $this->firewall_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php new file mode 100644 index 000000000000..616799349e7b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php @@ -0,0 +1,215 @@ +google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment + */ +class FraudPreventionAssessment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Probability of this transaction being fraudulent. Summarizes + * the combined risk of attack vectors below. Values are from 0.0 (lowest) + * to 1.0 (highest). + * + * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transaction_risk = 0.0; + /** + * Output only. Assessment of this transaction for risk of a stolen + * instrument. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict stolen_instrument_verdict = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $stolen_instrument_verdict = null; + /** + * Output only. Assessment of this transaction for risk of being part of a + * card testing attack. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict card_testing_verdict = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $card_testing_verdict = null; + /** + * Output only. Assessment of this transaction for behavioral trust. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $behavioral_trust_verdict = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $transaction_risk + * Output only. Probability of this transaction being fraudulent. Summarizes + * the combined risk of attack vectors below. Values are from 0.0 (lowest) + * to 1.0 (highest). + * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict $stolen_instrument_verdict + * Output only. Assessment of this transaction for risk of a stolen + * instrument. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict $card_testing_verdict + * Output only. Assessment of this transaction for risk of being part of a + * card testing attack. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict $behavioral_trust_verdict + * Output only. Assessment of this transaction for behavioral trust. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Probability of this transaction being fraudulent. Summarizes + * the combined risk of attack vectors below. Values are from 0.0 (lowest) + * to 1.0 (highest). + * + * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getTransactionRisk() + { + return $this->transaction_risk; + } + + /** + * Output only. Probability of this transaction being fraudulent. Summarizes + * the combined risk of attack vectors below. Values are from 0.0 (lowest) + * to 1.0 (highest). + * + * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setTransactionRisk($var) + { + GPBUtil::checkFloat($var); + $this->transaction_risk = $var; + + return $this; + } + + /** + * Output only. Assessment of this transaction for risk of a stolen + * instrument. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict stolen_instrument_verdict = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict|null + */ + public function getStolenInstrumentVerdict() + { + return $this->stolen_instrument_verdict; + } + + public function hasStolenInstrumentVerdict() + { + return isset($this->stolen_instrument_verdict); + } + + public function clearStolenInstrumentVerdict() + { + unset($this->stolen_instrument_verdict); + } + + /** + * Output only. Assessment of this transaction for risk of a stolen + * instrument. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict stolen_instrument_verdict = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict $var + * @return $this + */ + public function setStolenInstrumentVerdict($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict::class); + $this->stolen_instrument_verdict = $var; + + return $this; + } + + /** + * Output only. Assessment of this transaction for risk of being part of a + * card testing attack. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict card_testing_verdict = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict|null + */ + public function getCardTestingVerdict() + { + return $this->card_testing_verdict; + } + + public function hasCardTestingVerdict() + { + return isset($this->card_testing_verdict); + } + + public function clearCardTestingVerdict() + { + unset($this->card_testing_verdict); + } + + /** + * Output only. Assessment of this transaction for risk of being part of a + * card testing attack. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict card_testing_verdict = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict $var + * @return $this + */ + public function setCardTestingVerdict($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict::class); + $this->card_testing_verdict = $var; + + return $this; + } + + /** + * Output only. Assessment of this transaction for behavioral trust. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict|null + */ + public function getBehavioralTrustVerdict() + { + return $this->behavioral_trust_verdict; + } + + public function hasBehavioralTrustVerdict() + { + return isset($this->behavioral_trust_verdict); + } + + public function clearBehavioralTrustVerdict() + { + unset($this->behavioral_trust_verdict); + } + + /** + * Output only. Assessment of this transaction for behavioral trust. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict $var + * @return $this + */ + public function setBehavioralTrustVerdict($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict::class); + $this->behavioral_trust_verdict = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php new file mode 100644 index 000000000000..46e30e6ef746 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php @@ -0,0 +1,78 @@ +google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + */ +class BehavioralTrustVerdict extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Probability of this transaction attempt being executed in a + * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 + * (highest). + * + * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $trust = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $trust + * Output only. Probability of this transaction attempt being executed in a + * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 + * (highest). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Probability of this transaction attempt being executed in a + * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 + * (highest). + * + * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getTrust() + { + return $this->trust; + } + + /** + * Output only. Probability of this transaction attempt being executed in a + * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 + * (highest). + * + * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setTrust($var) + { + GPBUtil::checkFloat($var); + $this->trust = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BehavioralTrustVerdict::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment_BehavioralTrustVerdict::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php new file mode 100644 index 000000000000..1673fe7932b5 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php @@ -0,0 +1,75 @@ +google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + */ +class CardTestingVerdict extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Probability of this transaction attempt being part of a card + * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $risk = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $risk + * Output only. Probability of this transaction attempt being part of a card + * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Probability of this transaction attempt being part of a card + * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getRisk() + { + return $this->risk; + } + + /** + * Output only. Probability of this transaction attempt being part of a card + * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setRisk($var) + { + GPBUtil::checkFloat($var); + $this->risk = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardTestingVerdict::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment_CardTestingVerdict::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php new file mode 100644 index 000000000000..b8774e74ca67 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php @@ -0,0 +1,75 @@ +google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict + */ +class StolenInstrumentVerdict extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Probability of this transaction being executed with a stolen + * instrument. Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $risk = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $risk + * Output only. Probability of this transaction being executed with a stolen + * instrument. Values are from 0.0 (lowest) to 1.0 (highest). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Probability of this transaction being executed with a stolen + * instrument. Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getRisk() + { + return $this->risk; + } + + /** + * Output only. Probability of this transaction being executed with a stolen + * instrument. Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setRisk($var) + { + GPBUtil::checkFloat($var); + $this->risk = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StolenInstrumentVerdict::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment_StolenInstrumentVerdict::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php new file mode 100644 index 000000000000..aba0ccfcd4bb --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php @@ -0,0 +1,125 @@ +google.cloud.recaptchaenterprise.v1.FraudSignals + */ +class FraudSignals extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Signals describing the end user in this transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $user_signals = null; + /** + * Output only. Signals describing the payment card or cards used in this + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $card_signals = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals $user_signals + * Output only. Signals describing the end user in this transaction. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals $card_signals + * Output only. Signals describing the payment card or cards used in this + * transaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Signals describing the end user in this transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals|null + */ + public function getUserSignals() + { + return $this->user_signals; + } + + public function hasUserSignals() + { + return isset($this->user_signals); + } + + public function clearUserSignals() + { + unset($this->user_signals); + } + + /** + * Output only. Signals describing the end user in this transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals $var + * @return $this + */ + public function setUserSignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals::class); + $this->user_signals = $var; + + return $this; + } + + /** + * Output only. Signals describing the payment card or cards used in this + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals|null + */ + public function getCardSignals() + { + return $this->card_signals; + } + + public function hasCardSignals() + { + return isset($this->card_signals); + } + + public function clearCardSignals() + { + unset($this->card_signals); + } + + /** + * Output only. Signals describing the payment card or cards used in this + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals $var + * @return $this + */ + public function setCardSignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals::class); + $this->card_signals = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php new file mode 100644 index 000000000000..1c6e40b18d82 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php @@ -0,0 +1,70 @@ +google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals + */ +class CardSignals extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The labels for the payment card in this transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $card_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $card_labels + * Output only. The labels for the payment card in this transaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The labels for the payment card in this transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCardLabels() + { + return $this->card_labels; + } + + /** + * Output only. The labels for the payment card in this transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCardLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals\CardLabel::class); + $this->card_labels = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardSignals::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals_CardSignals::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php new file mode 100644 index 000000000000..e3e8e94649f8 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php @@ -0,0 +1,74 @@ +google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel + */ +class CardLabel +{ + /** + * No label specified. + * + * Generated from protobuf enum CARD_LABEL_UNSPECIFIED = 0; + */ + const CARD_LABEL_UNSPECIFIED = 0; + /** + * This card has been detected as prepaid. + * + * Generated from protobuf enum PREPAID = 1; + */ + const PREPAID = 1; + /** + * This card has been detected as virtual, such as a card number generated + * for a single transaction or merchant. + * + * Generated from protobuf enum VIRTUAL = 2; + */ + const VIRTUAL = 2; + /** + * This card has been detected as being used in an unexpected geographic + * location. + * + * Generated from protobuf enum UNEXPECTED_LOCATION = 3; + */ + const UNEXPECTED_LOCATION = 3; + + private static $valueToName = [ + self::CARD_LABEL_UNSPECIFIED => 'CARD_LABEL_UNSPECIFIED', + self::PREPAID => 'PREPAID', + self::VIRTUAL => 'VIRTUAL', + self::UNEXPECTED_LOCATION => 'UNEXPECTED_LOCATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardLabel::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals_CardSignals_CardLabel::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php new file mode 100644 index 000000000000..2d8305d3bd61 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php @@ -0,0 +1,116 @@ +google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals + */ +class UserSignals extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. This user (based on email, phone, and other identifiers) has + * been seen on the internet for at least this number of days. + * + * Generated from protobuf field int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active_days_lower_bound = 0; + /** + * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic + * components in their identity, such as a randomly generated email address, + * temporary phone number, or fake shipping address. + * + * Generated from protobuf field float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $synthetic_risk = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $active_days_lower_bound + * Output only. This user (based on email, phone, and other identifiers) has + * been seen on the internet for at least this number of days. + * @type float $synthetic_risk + * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic + * components in their identity, such as a randomly generated email address, + * temporary phone number, or fake shipping address. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. This user (based on email, phone, and other identifiers) has + * been seen on the internet for at least this number of days. + * + * Generated from protobuf field int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getActiveDaysLowerBound() + { + return $this->active_days_lower_bound; + } + + /** + * Output only. This user (based on email, phone, and other identifiers) has + * been seen on the internet for at least this number of days. + * + * Generated from protobuf field int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setActiveDaysLowerBound($var) + { + GPBUtil::checkInt32($var); + $this->active_days_lower_bound = $var; + + return $this; + } + + /** + * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic + * components in their identity, such as a randomly generated email address, + * temporary phone number, or fake shipping address. + * + * Generated from protobuf field float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getSyntheticRisk() + { + return $this->synthetic_risk; + } + + /** + * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic + * components in their identity, such as a randomly generated email address, + * temporary phone number, or fake shipping address. + * + * Generated from protobuf field float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setSyntheticRisk($var) + { + GPBUtil::checkFloat($var); + $this->synthetic_risk = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UserSignals::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals_UserSignals::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php new file mode 100644 index 000000000000..e5a80411e06a --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest + */ +class GetFirewallPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * 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 requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. Please see + * {@see RecaptchaEnterpriseServiceClient::firewallPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\GetFirewallPolicyRequest + * + * @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 requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * 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 requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php new file mode 100644 index 000000000000..741076d93558 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.recaptchaenterprise.v1.GetKeyRequest + */ +class GetKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the requested key, in the format + * `projects/{project}/keys/{key}`. + * + * 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 requested key, in the format + * `projects/{project}/keys/{key}`. Please see + * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\GetKeyRequest + * + * @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 requested key, in the format + * `projects/{project}/keys/{key}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the requested key, in the format + * `projects/{project}/keys/{key}`. + * + * 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 requested key, in the format + * `projects/{project}/keys/{key}`. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php new file mode 100644 index 000000000000..495178abf209 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php @@ -0,0 +1,86 @@ +google.cloud.recaptchaenterprise.v1.GetMetricsRequest + */ +class GetMetricsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the requested metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * 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 requested metrics, in the format + * `projects/{project}/keys/{key}/metrics`. Please see + * {@see RecaptchaEnterpriseServiceClient::metricsName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\GetMetricsRequest + * + * @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 requested metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the requested metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * 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 requested metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php new file mode 100644 index 000000000000..85d11376701d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php @@ -0,0 +1,165 @@ +google.cloud.recaptchaenterprise.v1.IOSKeySettings + */ +class IOSKeySettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If set to true, allowed_bundle_ids are not enforced. + * + * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_all_bundle_ids = false; + /** + * Optional. iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + * + * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_bundle_ids; + /** + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple + * App Attest and Apple DeviceCheck to protect your app from abuse. Providing + * these fields allows reCAPTCHA to get a better assessment of the integrity + * of your app. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $apple_developer_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $allow_all_bundle_ids + * Optional. If set to true, allowed_bundle_ids are not enforced. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_bundle_ids + * Optional. iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + * @type \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId $apple_developer_id + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple + * App Attest and Apple DeviceCheck to protect your app from abuse. Providing + * these fields allows reCAPTCHA to get a better assessment of the integrity + * of your app. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If set to true, allowed_bundle_ids are not enforced. + * + * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowAllBundleIds() + { + return $this->allow_all_bundle_ids; + } + + /** + * Optional. If set to true, allowed_bundle_ids are not enforced. + * + * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowAllBundleIds($var) + { + GPBUtil::checkBool($var); + $this->allow_all_bundle_ids = $var; + + return $this; + } + + /** + * Optional. iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + * + * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedBundleIds() + { + return $this->allowed_bundle_ids; + } + + /** + * Optional. iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + * + * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedBundleIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_bundle_ids = $arr; + + return $this; + } + + /** + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple + * App Attest and Apple DeviceCheck to protect your app from abuse. Providing + * these fields allows reCAPTCHA to get a better assessment of the integrity + * of your app. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId|null + */ + public function getAppleDeveloperId() + { + return $this->apple_developer_id; + } + + public function hasAppleDeveloperId() + { + return isset($this->apple_developer_id); + } + + public function clearAppleDeveloperId() + { + unset($this->apple_developer_id); + } + + /** + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple + * App Attest and Apple DeviceCheck to protect your app from abuse. Providing + * these fields allows reCAPTCHA to get a better assessment of the integrity + * of your app. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId $var + * @return $this + */ + public function setAppleDeveloperId($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId::class); + $this->apple_developer_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php new file mode 100644 index 000000000000..0a6c440ab298 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php @@ -0,0 +1,125 @@ +google.cloud.recaptchaenterprise.v1.IpOverrideData + */ +class IpOverrideData extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The IP address to override (can be IPv4, IPv6 or CIDR). + * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. + * The IP override must be a public IP address. + * Example of IPv4: 168.192.5.6 + * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B + * Example of IPv4 with CIDR: 168.192.5.0/24 + * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 + * + * Generated from protobuf field string ip = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + */ + protected $ip = ''; + /** + * Required. Describes the type of IP override. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType override_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $override_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip + * Required. The IP address to override (can be IPv4, IPv6 or CIDR). + * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. + * The IP override must be a public IP address. + * Example of IPv4: 168.192.5.6 + * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B + * Example of IPv4 with CIDR: 168.192.5.0/24 + * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 + * @type int $override_type + * Required. Describes the type of IP override. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The IP address to override (can be IPv4, IPv6 or CIDR). + * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. + * The IP override must be a public IP address. + * Example of IPv4: 168.192.5.6 + * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B + * Example of IPv4 with CIDR: 168.192.5.0/24 + * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 + * + * Generated from protobuf field string ip = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @return string + */ + public function getIp() + { + return $this->ip; + } + + /** + * Required. The IP address to override (can be IPv4, IPv6 or CIDR). + * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. + * The IP override must be a public IP address. + * Example of IPv4: 168.192.5.6 + * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B + * Example of IPv4 with CIDR: 168.192.5.0/24 + * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 + * + * Generated from protobuf field string ip = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIp($var) + { + GPBUtil::checkString($var, True); + $this->ip = $var; + + return $this; + } + + /** + * Required. Describes the type of IP override. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType override_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOverrideType() + { + return $this->override_type; + } + + /** + * Required. Describes the type of IP override. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType override_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOverrideType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData\OverrideType::class); + $this->override_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php new file mode 100644 index 000000000000..f14e440d9c4b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php @@ -0,0 +1,58 @@ +google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType + */ +class OverrideType +{ + /** + * Default override type that indicates this enum hasn't been specified. + * + * Generated from protobuf enum OVERRIDE_TYPE_UNSPECIFIED = 0; + */ + const OVERRIDE_TYPE_UNSPECIFIED = 0; + /** + * Allowlist the IP address; i.e. give a `risk_analysis.score` of 0.9 for + * all valid assessments. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + + private static $valueToName = [ + self::OVERRIDE_TYPE_UNSPECIFIED => 'OVERRIDE_TYPE_UNSPECIFIED', + self::ALLOW => 'ALLOW', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OverrideType::class, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData_OverrideType::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php new file mode 100644 index 000000000000..0f900489ad42 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php @@ -0,0 +1,417 @@ +google.cloud.recaptchaenterprise.v1.Key + */ +class Key extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for the Key in the format + * `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Human-readable display name of this key. Modifiable by user. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. See [Creating and managing labels] + * (https://cloud.google.com/recaptcha/docs/labels). + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. The timestamp corresponding to the creation of this key. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Optional. Options for user acceptance testing. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $testing_options = null; + /** + * Optional. Settings for WAF + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $waf_settings = null; + protected $platform_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for the Key in the format + * `projects/{project}/keys/{key}`. + * @type string $display_name + * Required. Human-readable display name of this key. Modifiable by user. + * @type \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings $web_settings + * Settings for keys that can be used by websites. + * @type \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings $android_settings + * Settings for keys that can be used by Android apps. + * @type \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings $ios_settings + * Settings for keys that can be used by iOS apps. + * @type \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings $express_settings + * Settings for keys that can be used by reCAPTCHA Express. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. See [Creating and managing labels] + * (https://cloud.google.com/recaptcha/docs/labels). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp corresponding to the creation of this key. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions $testing_options + * Optional. Options for user acceptance testing. + * @type \Google\Cloud\RecaptchaEnterprise\V1\WafSettings $waf_settings + * Optional. Settings for WAF + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for the Key in the format + * `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for the Key in the format + * `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Human-readable display name of this key. Modifiable by user. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Human-readable display name of this key. Modifiable by user. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Settings for keys that can be used by websites. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3; + * @return \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings|null + */ + public function getWebSettings() + { + return $this->readOneof(3); + } + + public function hasWebSettings() + { + return $this->hasOneof(3); + } + + /** + * Settings for keys that can be used by websites. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3; + * @param \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings $var + * @return $this + */ + public function setWebSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Settings for keys that can be used by Android apps. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4; + * @return \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings|null + */ + public function getAndroidSettings() + { + return $this->readOneof(4); + } + + public function hasAndroidSettings() + { + return $this->hasOneof(4); + } + + /** + * Settings for keys that can be used by Android apps. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4; + * @param \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings $var + * @return $this + */ + public function setAndroidSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Settings for keys that can be used by iOS apps. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5; + * @return \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings|null + */ + public function getIosSettings() + { + return $this->readOneof(5); + } + + public function hasIosSettings() + { + return $this->hasOneof(5); + } + + /** + * Settings for keys that can be used by iOS apps. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5; + * @param \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings $var + * @return $this + */ + public function setIosSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Settings for keys that can be used by reCAPTCHA Express. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ExpressKeySettings express_settings = 11; + * @return \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings|null + */ + public function getExpressSettings() + { + return $this->readOneof(11); + } + + public function hasExpressSettings() + { + return $this->hasOneof(11); + } + + /** + * Settings for keys that can be used by reCAPTCHA Express. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ExpressKeySettings express_settings = 11; + * @param \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings $var + * @return $this + */ + public function setExpressSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Optional. See [Creating and managing labels] + * (https://cloud.google.com/recaptcha/docs/labels). + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. See [Creating and managing labels] + * (https://cloud.google.com/recaptcha/docs/labels). + * + * Generated from protobuf field map labels = 6 [(.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. The timestamp corresponding to the creation of this key. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp corresponding to the creation of this key. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. Options for user acceptance testing. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions|null + */ + public function getTestingOptions() + { + return $this->testing_options; + } + + public function hasTestingOptions() + { + return isset($this->testing_options); + } + + public function clearTestingOptions() + { + unset($this->testing_options); + } + + /** + * Optional. Options for user acceptance testing. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions $var + * @return $this + */ + public function setTestingOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions::class); + $this->testing_options = $var; + + return $this; + } + + /** + * Optional. Settings for WAF + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\WafSettings|null + */ + public function getWafSettings() + { + return $this->waf_settings; + } + + public function hasWafSettings() + { + return isset($this->waf_settings); + } + + public function clearWafSettings() + { + unset($this->waf_settings); + } + + /** + * Optional. Settings for WAF + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\WafSettings $var + * @return $this + */ + public function setWafSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings::class); + $this->waf_settings = $var; + + return $this; + } + + /** + * @return string + */ + public function getPlatformSettings() + { + return $this->whichOneof("platform_settings"); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php new file mode 100644 index 000000000000..4fdc8e041b4c --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php @@ -0,0 +1,162 @@ +google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest + */ +class ListFirewallPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of policies to return. Default is 10. Max + * limit is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous. + * ListFirewallPoliciesRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the project to list the policies for, in the format + * `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\ListFirewallPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * @type int $page_size + * Optional. The maximum number of policies to return. Default is 10. Max + * limit is 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous. + * ListFirewallPoliciesRequest, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of policies to return. Default is 10. Max + * limit is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of policies to return. Default is 10. Max + * limit is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous. + * ListFirewallPoliciesRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous. + * ListFirewallPoliciesRequest, if any. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php new file mode 100644 index 000000000000..0abe284f4f3d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php @@ -0,0 +1,105 @@ +google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse + */ +class ListFirewallPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Policy details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + */ + private $firewall_policies; + /** + * Token to retrieve the next page of results. It is set to empty if no + * policies remain in results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy>|\Google\Protobuf\Internal\RepeatedField $firewall_policies + * Policy details. + * @type string $next_page_token + * Token to retrieve the next page of results. It is set to empty if no + * policies remain in results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Policy details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFirewallPolicies() + { + return $this->firewall_policies; + } + + /** + * Policy details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFirewallPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); + $this->firewall_policies = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results. It is set to empty if no + * policies remain in results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results. It is set to empty if no + * policies remain in results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php new file mode 100644 index 000000000000..52134e04752e --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php @@ -0,0 +1,170 @@ +google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest + */ +class ListIpOverridesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent key for which the IP overrides are listed, in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of overrides to return. Default is 10. Max + * limit is 100. If the number of overrides is less than the page_size, all + * overrides are returned. If the page size is more than 100, it is coerced to + * 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous + * ListIpOverridesRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent key for which the IP overrides are listed, in the + * format `projects/{project}/keys/{key}`. Please see + * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\ListIpOverridesRequest + * + * @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 key for which the IP overrides are listed, in the + * format `projects/{project}/keys/{key}`. + * @type int $page_size + * Optional. The maximum number of overrides to return. Default is 10. Max + * limit is 100. If the number of overrides is less than the page_size, all + * overrides are returned. If the page size is more than 100, it is coerced to + * 100. + * @type string $page_token + * Optional. The next_page_token value returned from a previous + * ListIpOverridesRequest, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent key for which the IP overrides are listed, in the + * format `projects/{project}/keys/{key}`. + * + * 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 key for which the IP overrides are listed, in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of overrides to return. Default is 10. Max + * limit is 100. If the number of overrides is less than the page_size, all + * overrides are returned. If the page size is more than 100, it is coerced to + * 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of overrides to return. Default is 10. Max + * limit is 100. If the number of overrides is less than the page_size, all + * overrides are returned. If the page size is more than 100, it is coerced to + * 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous + * ListIpOverridesRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous + * ListIpOverridesRequest, if any. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php new file mode 100644 index 000000000000..490069fb86c2 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php @@ -0,0 +1,105 @@ +google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse + */ +class ListIpOverridesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * IP Overrides details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_overrides = 1; + */ + private $ip_overrides; + /** + * Token to retrieve the next page of results. If this field is empty, no keys + * remain in the results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData>|\Google\Protobuf\Internal\RepeatedField $ip_overrides + * IP Overrides details. + * @type string $next_page_token + * Token to retrieve the next page of results. If this field is empty, no keys + * remain in the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * IP Overrides details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_overrides = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpOverrides() + { + return $this->ip_overrides; + } + + /** + * IP Overrides details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_overrides = 1; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData::class); + $this->ip_overrides = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results. If this field is empty, no keys + * remain in the results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results. If this field is empty, no keys + * remain in the results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php new file mode 100644 index 000000000000..f726c8ae2c4f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php @@ -0,0 +1,162 @@ +google.cloud.recaptchaenterprise.v1.ListKeysRequest + */ +class ListKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project that contains the keys that is + * listed, in the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the project that contains the keys that is + * listed, in the format `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\ListKeysRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project that contains the keys that is + * listed, in the format `projects/{project}`. + * @type int $page_size + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + * @type string $page_token + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project that contains the keys that is + * listed, in the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project that contains the keys that is + * listed, in the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + * + * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php new file mode 100644 index 000000000000..1041b3d7ebd6 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php @@ -0,0 +1,105 @@ +google.cloud.recaptchaenterprise.v1.ListKeysResponse + */ +class ListKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Key details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.Key keys = 1; + */ + private $keys; + /** + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\Key>|\Google\Protobuf\Internal\RepeatedField $keys + * Key details. + * @type string $next_page_token + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Key details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.Key keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKeys() + { + return $this->keys; + } + + /** + * Key details. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.Key keys = 1; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\Key>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\Key::class); + $this->keys = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php new file mode 100644 index 000000000000..236874e5076e --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php @@ -0,0 +1,178 @@ +google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest + */ +class ListRelatedAccountGroupMembershipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the related account group in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of accounts to return. The service might + * return fewer than this value. If unspecified, at most 50 accounts are + * returned. The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroupMemberships` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name for the related account group in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. Please see + * {@see RecaptchaEnterpriseServiceClient::relatedAccountGroupName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupMembershipsRequest + * + * @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 resource name for the related account group in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. + * @type int $page_size + * Optional. The maximum number of accounts to return. The service might + * return fewer than this value. If unspecified, at most 50 accounts are + * returned. The maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroupMemberships` must match the call that provided the + * page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the related account group in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. + * + * 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 resource name for the related account group in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of accounts to return. The service might + * return fewer than this value. If unspecified, at most 50 accounts are + * returned. The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of accounts to return. The service might + * return fewer than this value. If unspecified, at most 50 accounts are + * returned. The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroupMemberships` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroupMemberships` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php new file mode 100644 index 000000000000..893785ab4656 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php @@ -0,0 +1,105 @@ +google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse + */ +class ListRelatedAccountGroupMembershipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The memberships listed by the query. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; + */ + private $related_account_group_memberships; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $related_account_group_memberships + * The memberships listed by the query. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * The memberships listed by the query. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedAccountGroupMemberships() + { + return $this->related_account_group_memberships; + } + + /** + * The memberships listed by the query. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedAccountGroupMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership::class); + $this->related_account_group_memberships = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php new file mode 100644 index 000000000000..b9bd3de3314f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php @@ -0,0 +1,178 @@ +google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest + */ +class ListRelatedAccountGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project to list related account groups from, in + * the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroups` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the project to list related account groups from, in + * the format `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project to list related account groups from, in + * the format `projects/{project}`. + * @type int $page_size + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroups` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project to list related account groups from, in + * the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project to list related account groups from, in + * the format `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroups` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRelatedAccountGroups` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php new file mode 100644 index 000000000000..eabc47329cd6 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php @@ -0,0 +1,105 @@ +google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse + */ +class ListRelatedAccountGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The groups of related accounts listed by the query. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroup related_account_groups = 1; + */ + private $related_account_groups; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroup>|\Google\Protobuf\Internal\RepeatedField $related_account_groups + * The groups of related accounts listed by the query. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * The groups of related accounts listed by the query. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroup related_account_groups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedAccountGroups() + { + return $this->related_account_groups; + } + + /** + * The groups of related accounts listed by the query. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroup related_account_groups = 1; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedAccountGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroup::class); + $this->related_account_groups = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php new file mode 100644 index 000000000000..c0e9c3eb5ca7 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php @@ -0,0 +1,195 @@ +google.cloud.recaptchaenterprise.v1.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The name of the metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Inclusive start time aligned to a day (UTC). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Metrics are continuous and in order by dates, and in the granularity + * of day. All Key types should have score-based data. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ScoreMetrics score_metrics = 2; + */ + private $score_metrics; + /** + * Metrics are continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have + * challenge-based data. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ChallengeMetrics challenge_metrics = 3; + */ + private $challenge_metrics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The name of the metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * @type \Google\Protobuf\Timestamp $start_time + * Inclusive start time aligned to a day (UTC). + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\ScoreMetrics>|\Google\Protobuf\Internal\RepeatedField $score_metrics + * Metrics are continuous and in order by dates, and in the granularity + * of day. All Key types should have score-based data. + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\ChallengeMetrics>|\Google\Protobuf\Internal\RepeatedField $challenge_metrics + * Metrics are continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have + * challenge-based data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The name of the metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The name of the metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Inclusive start time aligned to a day (UTC). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Inclusive start time aligned to a day (UTC). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Metrics are continuous and in order by dates, and in the granularity + * of day. All Key types should have score-based data. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ScoreMetrics score_metrics = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScoreMetrics() + { + return $this->score_metrics; + } + + /** + * Metrics are continuous and in order by dates, and in the granularity + * of day. All Key types should have score-based data. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ScoreMetrics score_metrics = 2; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\ScoreMetrics>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScoreMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\ScoreMetrics::class); + $this->score_metrics = $arr; + + return $this; + } + + /** + * Metrics are continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have + * challenge-based data. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ChallengeMetrics challenge_metrics = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChallengeMetrics() + { + return $this->challenge_metrics; + } + + /** + * Metrics are continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have + * challenge-based data. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ChallengeMetrics challenge_metrics = 3; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\ChallengeMetrics>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChallengeMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\ChallengeMetrics::class); + $this->challenge_metrics = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php new file mode 100644 index 000000000000..3f952ea02cc9 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php @@ -0,0 +1,133 @@ +google.cloud.recaptchaenterprise.v1.MigrateKeyRequest + */ +class MigrateKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the key to be migrated, in the format + * `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If true, skips the billing check. + * A reCAPTCHA Enterprise key or migrated key behaves differently than a + * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see + * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid + * any disruption of your usage, we check that a billing account is present. + * If your usage of reCAPTCHA is under the free quota, you can safely skip the + * billing check and proceed with the migration. See + * https://cloud.google.com/recaptcha/docs/billing-information. + * + * Generated from protobuf field bool skip_billing_check = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_billing_check = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the key to be migrated, in the format + * `projects/{project}/keys/{key}`. + * @type bool $skip_billing_check + * Optional. If true, skips the billing check. + * A reCAPTCHA Enterprise key or migrated key behaves differently than a + * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see + * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid + * any disruption of your usage, we check that a billing account is present. + * If your usage of reCAPTCHA is under the free quota, you can safely skip the + * billing check and proceed with the migration. See + * https://cloud.google.com/recaptcha/docs/billing-information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the key to be migrated, in the format + * `projects/{project}/keys/{key}`. + * + * 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 key to be migrated, in the format + * `projects/{project}/keys/{key}`. + * + * 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 true, skips the billing check. + * A reCAPTCHA Enterprise key or migrated key behaves differently than a + * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see + * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid + * any disruption of your usage, we check that a billing account is present. + * If your usage of reCAPTCHA is under the free quota, you can safely skip the + * billing check and proceed with the migration. See + * https://cloud.google.com/recaptcha/docs/billing-information. + * + * Generated from protobuf field bool skip_billing_check = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSkipBillingCheck() + { + return $this->skip_billing_check; + } + + /** + * Optional. If true, skips the billing check. + * A reCAPTCHA Enterprise key or migrated key behaves differently than a + * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see + * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid + * any disruption of your usage, we check that a billing account is present. + * If your usage of reCAPTCHA is under the free quota, you can safely skip the + * billing check and proceed with the migration. See + * https://cloud.google.com/recaptcha/docs/billing-information. + * + * Generated from protobuf field bool skip_billing_check = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSkipBillingCheck($var) + { + GPBUtil::checkBool($var); + $this->skip_billing_check = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php new file mode 100644 index 000000000000..40d0697b61f6 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php @@ -0,0 +1,77 @@ +google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment + */ +class PhoneFraudAssessment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Assessment of this phone event for risk of SMS toll fraud. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict sms_toll_fraud_verdict = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sms_toll_fraud_verdict = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict $sms_toll_fraud_verdict + * Output only. Assessment of this phone event for risk of SMS toll fraud. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Assessment of this phone event for risk of SMS toll fraud. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict sms_toll_fraud_verdict = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict|null + */ + public function getSmsTollFraudVerdict() + { + return $this->sms_toll_fraud_verdict; + } + + public function hasSmsTollFraudVerdict() + { + return isset($this->sms_toll_fraud_verdict); + } + + public function clearSmsTollFraudVerdict() + { + unset($this->sms_toll_fraud_verdict); + } + + /** + * Output only. Assessment of this phone event for risk of SMS toll fraud. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict sms_toll_fraud_verdict = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict $var + * @return $this + */ + public function setSmsTollFraudVerdict($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict::class); + $this->sms_toll_fraud_verdict = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php new file mode 100644 index 000000000000..f753cd4aff26 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php @@ -0,0 +1,201 @@ +google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + */ +class PrivatePasswordLeakVerification extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * username. It is used to look up password leaks associated with that hash + * prefix. + * + * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lookup_hash_prefix = ''; + /** + * Optional. Encrypted Scrypt hash of the canonicalized username+password. It + * is re-encrypted by the server and returned through + * `reencrypted_user_credentials_hash`. + * + * Generated from protobuf field bytes encrypted_user_credentials_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encrypted_user_credentials_hash = ''; + /** + * Output only. List of prefixes of the encrypted potential password leaks + * that matched the given parameters. They must be compared with the + * client-side decryption prefix of `reencrypted_user_credentials_hash` + * + * Generated from protobuf field repeated bytes encrypted_leak_match_prefixes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $encrypted_leak_match_prefixes; + /** + * Output only. Corresponds to the re-encryption of the + * `encrypted_user_credentials_hash` field. It is used to match potential + * password leaks within `encrypted_leak_match_prefixes`. + * + * Generated from protobuf field bytes reencrypted_user_credentials_hash = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reencrypted_user_credentials_hash = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $lookup_hash_prefix + * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * username. It is used to look up password leaks associated with that hash + * prefix. + * @type string $encrypted_user_credentials_hash + * Optional. Encrypted Scrypt hash of the canonicalized username+password. It + * is re-encrypted by the server and returned through + * `reencrypted_user_credentials_hash`. + * @type array|\Google\Protobuf\Internal\RepeatedField $encrypted_leak_match_prefixes + * Output only. List of prefixes of the encrypted potential password leaks + * that matched the given parameters. They must be compared with the + * client-side decryption prefix of `reencrypted_user_credentials_hash` + * @type string $reencrypted_user_credentials_hash + * Output only. Corresponds to the re-encryption of the + * `encrypted_user_credentials_hash` field. It is used to match potential + * password leaks within `encrypted_leak_match_prefixes`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * username. It is used to look up password leaks associated with that hash + * prefix. + * + * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLookupHashPrefix() + { + return $this->lookup_hash_prefix; + } + + /** + * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * username. It is used to look up password leaks associated with that hash + * prefix. + * + * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLookupHashPrefix($var) + { + GPBUtil::checkString($var, False); + $this->lookup_hash_prefix = $var; + + return $this; + } + + /** + * Optional. Encrypted Scrypt hash of the canonicalized username+password. It + * is re-encrypted by the server and returned through + * `reencrypted_user_credentials_hash`. + * + * Generated from protobuf field bytes encrypted_user_credentials_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncryptedUserCredentialsHash() + { + return $this->encrypted_user_credentials_hash; + } + + /** + * Optional. Encrypted Scrypt hash of the canonicalized username+password. It + * is re-encrypted by the server and returned through + * `reencrypted_user_credentials_hash`. + * + * Generated from protobuf field bytes encrypted_user_credentials_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEncryptedUserCredentialsHash($var) + { + GPBUtil::checkString($var, False); + $this->encrypted_user_credentials_hash = $var; + + return $this; + } + + /** + * Output only. List of prefixes of the encrypted potential password leaks + * that matched the given parameters. They must be compared with the + * client-side decryption prefix of `reencrypted_user_credentials_hash` + * + * Generated from protobuf field repeated bytes encrypted_leak_match_prefixes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEncryptedLeakMatchPrefixes() + { + return $this->encrypted_leak_match_prefixes; + } + + /** + * Output only. List of prefixes of the encrypted potential password leaks + * that matched the given parameters. They must be compared with the + * client-side decryption prefix of `reencrypted_user_credentials_hash` + * + * Generated from protobuf field repeated bytes encrypted_leak_match_prefixes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEncryptedLeakMatchPrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->encrypted_leak_match_prefixes = $arr; + + return $this; + } + + /** + * Output only. Corresponds to the re-encryption of the + * `encrypted_user_credentials_hash` field. It is used to match potential + * password leaks within `encrypted_leak_match_prefixes`. + * + * Generated from protobuf field bytes reencrypted_user_credentials_hash = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getReencryptedUserCredentialsHash() + { + return $this->reencrypted_user_credentials_hash; + } + + /** + * Output only. Corresponds to the re-encryption of the + * `encrypted_user_credentials_hash` field. It is used to match potential + * password leaks within `encrypted_leak_match_prefixes`. + * + * Generated from protobuf field bytes reencrypted_user_credentials_hash = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setReencryptedUserCredentialsHash($var) + { + GPBUtil::checkString($var, False); + $this->reencrypted_user_credentials_hash = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php new file mode 100644 index 000000000000..29c2020bed64 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php @@ -0,0 +1,75 @@ +google.cloud.recaptchaenterprise.v1.RelatedAccountGroup + */ +class RelatedAccountGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier. The resource name for the related account group in + * the format + * `projects/{project}/relatedaccountgroups/{related_account_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Identifier. The resource name for the related account group in + * the format + * `projects/{project}/relatedaccountgroups/{related_account_group}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier. The resource name for the related account group in + * the format + * `projects/{project}/relatedaccountgroups/{related_account_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Identifier. The resource name for the related account group in + * the format + * `projects/{project}/relatedaccountgroups/{related_account_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php new file mode 100644 index 000000000000..e766bb4b5ade --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php @@ -0,0 +1,164 @@ +google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership + */ +class RelatedAccountGroupMembership extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier. The resource name for this membership in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The unique stable account identifier of the member. The identifier + * corresponds to an `account_id` provided in a previous `CreateAssessment` or + * `AnnotateAssessment` call. + * + * Generated from protobuf field string account_id = 4; + */ + protected $account_id = ''; + /** + * Deprecated: use `account_id` instead. + * The unique stable hashed account identifier of the member. The identifier + * corresponds to a `hashed_account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. + * + * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true]; + * @deprecated + */ + protected $hashed_account_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Identifier. The resource name for this membership in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. + * @type string $account_id + * The unique stable account identifier of the member. The identifier + * corresponds to an `account_id` provided in a previous `CreateAssessment` or + * `AnnotateAssessment` call. + * @type string $hashed_account_id + * Deprecated: use `account_id` instead. + * The unique stable hashed account identifier of the member. The identifier + * corresponds to a `hashed_account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier. The resource name for this membership in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Identifier. The resource name for this membership in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The unique stable account identifier of the member. The identifier + * corresponds to an `account_id` provided in a previous `CreateAssessment` or + * `AnnotateAssessment` call. + * + * Generated from protobuf field string account_id = 4; + * @return string + */ + public function getAccountId() + { + return $this->account_id; + } + + /** + * The unique stable account identifier of the member. The identifier + * corresponds to an `account_id` provided in a previous `CreateAssessment` or + * `AnnotateAssessment` call. + * + * Generated from protobuf field string account_id = 4; + * @param string $var + * @return $this + */ + public function setAccountId($var) + { + GPBUtil::checkString($var, True); + $this->account_id = $var; + + return $this; + } + + /** + * Deprecated: use `account_id` instead. + * The unique stable hashed account identifier of the member. The identifier + * corresponds to a `hashed_account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. + * + * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getHashedAccountId() + { + @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); + return $this->hashed_account_id; + } + + /** + * Deprecated: use `account_id` instead. + * The unique stable hashed account identifier of the member. The identifier + * corresponds to a `hashed_account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. + * + * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setHashedAccountId($var) + { + @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, False); + $this->hashed_account_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php new file mode 100644 index 000000000000..4da23b7f1319 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php @@ -0,0 +1,132 @@ +google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest + */ +class RemoveIpOverrideRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the key from which the IP override is removed, in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. IP override to be removed from the key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ip_override_data = null; + + /** + * @param string $name Required. The name of the key from which the IP override is removed, in the + * format `projects/{project}/keys/{key}`. Please see + * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. + * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData Required. IP override to be removed from the key. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\RemoveIpOverrideRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData): self + { + return (new self()) + ->setName($name) + ->setIpOverrideData($ipOverrideData); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the key from which the IP override is removed, in the + * format `projects/{project}/keys/{key}`. + * @type \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ip_override_data + * Required. IP override to be removed from the key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the key from which the IP override is removed, in the + * format `projects/{project}/keys/{key}`. + * + * 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 key from which the IP override is removed, in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. IP override to be removed from the key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData|null + */ + public function getIpOverrideData() + { + return $this->ip_override_data; + } + + public function hasIpOverrideData() + { + return isset($this->ip_override_data); + } + + public function clearIpOverrideData() + { + unset($this->ip_override_data); + } + + /** + * Required. IP override to be removed from the key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $var + * @return $this + */ + public function setIpOverrideData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData::class); + $this->ip_override_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php new file mode 100644 index 000000000000..c6cb317ffd7b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php @@ -0,0 +1,33 @@ +google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse + */ +class RemoveIpOverrideResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php new file mode 100644 index 000000000000..2ac90f60a3e4 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php @@ -0,0 +1,128 @@ +google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest + */ +class ReorderFirewallPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A list containing all policy names, in the new order. Each name + * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. The name of the project to list the policies for, in the format + * `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * @param string[] $names Required. A list containing all policy names, in the new order. Each name + * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. Please see + * {@see RecaptchaEnterpriseServiceClient::firewallPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\ReorderFirewallPoliciesRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. A list containing all policy names, in the new order. Each name + * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * + * 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. A list containing all policy names, in the new order. Each name + * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. A list containing all policy names, in the new order. Each name + * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php new file mode 100644 index 000000000000..a03f0e590b4f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php @@ -0,0 +1,33 @@ +google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse + */ +class ReorderFirewallPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php new file mode 100644 index 000000000000..5c242d9c65b8 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest + */ +class RetrieveLegacySecretKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The public key name linked to the requested secret key in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $key = ''; + + /** + * @param string $key Required. The public key name linked to the requested secret key in the + * format `projects/{project}/keys/{key}`. Please see + * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\RetrieveLegacySecretKeyRequest + * + * @experimental + */ + public static function build(string $key): self + { + return (new self()) + ->setKey($key); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Required. The public key name linked to the requested secret key in the + * format `projects/{project}/keys/{key}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The public key name linked to the requested secret key in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. The public key name linked to the requested secret key in the + * format `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php new file mode 100644 index 000000000000..397a75127a04 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php @@ -0,0 +1,80 @@ +google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse + */ +class RetrieveLegacySecretKeyResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The secret key (also known as shared secret) authorizes communication + * between your application backend and the reCAPTCHA Enterprise server to + * create an assessment. + * The secret key needs to be kept safe for security purposes. + * + * Generated from protobuf field string legacy_secret_key = 1; + */ + protected $legacy_secret_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $legacy_secret_key + * The secret key (also known as shared secret) authorizes communication + * between your application backend and the reCAPTCHA Enterprise server to + * create an assessment. + * The secret key needs to be kept safe for security purposes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * The secret key (also known as shared secret) authorizes communication + * between your application backend and the reCAPTCHA Enterprise server to + * create an assessment. + * The secret key needs to be kept safe for security purposes. + * + * Generated from protobuf field string legacy_secret_key = 1; + * @return string + */ + public function getLegacySecretKey() + { + return $this->legacy_secret_key; + } + + /** + * The secret key (also known as shared secret) authorizes communication + * between your application backend and the reCAPTCHA Enterprise server to + * create an assessment. + * The secret key needs to be kept safe for security purposes. + * + * Generated from protobuf field string legacy_secret_key = 1; + * @param string $var + * @return $this + */ + public function setLegacySecretKey($var) + { + GPBUtil::checkString($var, True); + $this->legacy_secret_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php new file mode 100644 index 000000000000..6fa203ea2940 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php @@ -0,0 +1,185 @@ +google.cloud.recaptchaenterprise.v1.RiskAnalysis + */ +class RiskAnalysis extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + * + * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = 0.0; + /** + * Output only. Reasons contributing to the risk analysis verdict. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $reasons; + /** + * Output only. Extended verdict reasons to be used for experimentation only. + * The set of possible reasons is subject to change. + * + * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $extended_verdict_reasons; + /** + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $challenge = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + * @type array|\Google\Protobuf\Internal\RepeatedField $reasons + * Output only. Reasons contributing to the risk analysis verdict. + * @type array|\Google\Protobuf\Internal\RepeatedField $extended_verdict_reasons + * Output only. Extended verdict reasons to be used for experimentation only. + * The set of possible reasons is subject to change. + * @type int $challenge + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + * + * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + * + * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Reasons contributing to the risk analysis verdict. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasons() + { + return $this->reasons; + } + + /** + * Output only. Reasons contributing to the risk analysis verdict. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis\ClassificationReason::class); + $this->reasons = $arr; + + return $this; + } + + /** + * Output only. Extended verdict reasons to be used for experimentation only. + * The set of possible reasons is subject to change. + * + * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExtendedVerdictReasons() + { + return $this->extended_verdict_reasons; + } + + /** + * Output only. Extended verdict reasons to be used for experimentation only. + * The set of possible reasons is subject to change. + * + * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExtendedVerdictReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->extended_verdict_reasons = $arr; + + return $this; + } + + /** + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getChallenge() + { + return $this->challenge; + } + + /** + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setChallenge($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis\Challenge::class); + $this->challenge = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php new file mode 100644 index 000000000000..d61a1944dd0c --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php @@ -0,0 +1,72 @@ +google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge + */ +class Challenge +{ + /** + * Default unspecified type. + * + * Generated from protobuf enum CHALLENGE_UNSPECIFIED = 0; + */ + const CHALLENGE_UNSPECIFIED = 0; + /** + * No challenge was presented for solving. + * + * Generated from protobuf enum NOCAPTCHA = 1; + */ + const NOCAPTCHA = 1; + /** + * A solution was submitted that was correct. + * + * Generated from protobuf enum PASSED = 2; + */ + const PASSED = 2; + /** + * A solution was submitted that was incorrect or otherwise + * deemed suspicious. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::CHALLENGE_UNSPECIFIED => 'CHALLENGE_UNSPECIFIED', + self::NOCAPTCHA => 'NOCAPTCHA', + self::PASSED => 'PASSED', + self::FAILED => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Challenge::class, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis_Challenge::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php new file mode 100644 index 000000000000..159b1c8c8e37 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php @@ -0,0 +1,101 @@ +google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason + */ +class ClassificationReason +{ + /** + * Default unspecified type. + * + * Generated from protobuf enum CLASSIFICATION_REASON_UNSPECIFIED = 0; + */ + const CLASSIFICATION_REASON_UNSPECIFIED = 0; + /** + * Interactions matched the behavior of an automated agent. + * + * Generated from protobuf enum AUTOMATION = 1; + */ + const AUTOMATION = 1; + /** + * The event originated from an illegitimate environment. + * + * Generated from protobuf enum UNEXPECTED_ENVIRONMENT = 2; + */ + const UNEXPECTED_ENVIRONMENT = 2; + /** + * Traffic volume from the event source is higher than normal. + * + * Generated from protobuf enum TOO_MUCH_TRAFFIC = 3; + */ + const TOO_MUCH_TRAFFIC = 3; + /** + * Interactions with the site were significantly different than expected + * patterns. + * + * Generated from protobuf enum UNEXPECTED_USAGE_PATTERNS = 4; + */ + const UNEXPECTED_USAGE_PATTERNS = 4; + /** + * Too little traffic has been received from this site thus far to generate + * quality risk analysis. + * + * Generated from protobuf enum LOW_CONFIDENCE_SCORE = 5; + */ + const LOW_CONFIDENCE_SCORE = 5; + /** + * The request matches behavioral characteristics of a carding attack. + * + * Generated from protobuf enum SUSPECTED_CARDING = 6; + */ + const SUSPECTED_CARDING = 6; + /** + * The request matches behavioral characteristics of chargebacks for fraud. + * + * Generated from protobuf enum SUSPECTED_CHARGEBACK = 7; + */ + const SUSPECTED_CHARGEBACK = 7; + + private static $valueToName = [ + self::CLASSIFICATION_REASON_UNSPECIFIED => 'CLASSIFICATION_REASON_UNSPECIFIED', + self::AUTOMATION => 'AUTOMATION', + self::UNEXPECTED_ENVIRONMENT => 'UNEXPECTED_ENVIRONMENT', + self::TOO_MUCH_TRAFFIC => 'TOO_MUCH_TRAFFIC', + self::UNEXPECTED_USAGE_PATTERNS => 'UNEXPECTED_USAGE_PATTERNS', + self::LOW_CONFIDENCE_SCORE => 'LOW_CONFIDENCE_SCORE', + self::SUSPECTED_CARDING => 'SUSPECTED_CARDING', + self::SUSPECTED_CHARGEBACK => 'SUSPECTED_CHARGEBACK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClassificationReason::class, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis_ClassificationReason::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php new file mode 100644 index 000000000000..0c0196f6624f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php @@ -0,0 +1,75 @@ +google.cloud.recaptchaenterprise.v1.ScoreDistribution + */ +class ScoreDistribution extends \Google\Protobuf\Internal\Message +{ + /** + * Map key is score value multiplied by 100. The scores are discrete values + * between [0, 1]. The maximum number of buckets is on order of a few dozen, + * but typically much lower (ie. 10). + * + * Generated from protobuf field map score_buckets = 1; + */ + private $score_buckets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $score_buckets + * Map key is score value multiplied by 100. The scores are discrete values + * between [0, 1]. The maximum number of buckets is on order of a few dozen, + * but typically much lower (ie. 10). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Map key is score value multiplied by 100. The scores are discrete values + * between [0, 1]. The maximum number of buckets is on order of a few dozen, + * but typically much lower (ie. 10). + * + * Generated from protobuf field map score_buckets = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getScoreBuckets() + { + return $this->score_buckets; + } + + /** + * Map key is score value multiplied by 100. The scores are discrete values + * between [0, 1]. The maximum number of buckets is on order of a few dozen, + * but typically much lower (ie. 10). + * + * Generated from protobuf field map score_buckets = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setScoreBuckets($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT64); + $this->score_buckets = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php new file mode 100644 index 000000000000..6b118c876894 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php @@ -0,0 +1,115 @@ +google.cloud.recaptchaenterprise.v1.ScoreMetrics + */ +class ScoreMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Aggregated score metrics for all traffic. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ScoreDistribution overall_metrics = 1; + */ + protected $overall_metrics = null; + /** + * Action-based metrics. The map key is the action name which specified by the + * site owners at time of the "execute" client-side call. + * + * Generated from protobuf field map action_metrics = 2; + */ + private $action_metrics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution $overall_metrics + * Aggregated score metrics for all traffic. + * @type array|\Google\Protobuf\Internal\MapField $action_metrics + * Action-based metrics. The map key is the action name which specified by the + * site owners at time of the "execute" client-side call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Aggregated score metrics for all traffic. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ScoreDistribution overall_metrics = 1; + * @return \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution|null + */ + public function getOverallMetrics() + { + return $this->overall_metrics; + } + + public function hasOverallMetrics() + { + return isset($this->overall_metrics); + } + + public function clearOverallMetrics() + { + unset($this->overall_metrics); + } + + /** + * Aggregated score metrics for all traffic. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ScoreDistribution overall_metrics = 1; + * @param \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution $var + * @return $this + */ + public function setOverallMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution::class); + $this->overall_metrics = $var; + + return $this; + } + + /** + * Action-based metrics. The map key is the action name which specified by the + * site owners at time of the "execute" client-side call. + * + * Generated from protobuf field map action_metrics = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getActionMetrics() + { + return $this->action_metrics; + } + + /** + * Action-based metrics. The map key is the action name which specified by the + * site owners at time of the "execute" client-side call. + * + * Generated from protobuf field map action_metrics = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setActionMetrics($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution::class); + $this->action_metrics = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php new file mode 100644 index 000000000000..0c6559fc52fa --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php @@ -0,0 +1,294 @@ +google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest + */ +class SearchRelatedAccountGroupMembershipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project to search related account group + * memberships from. Specify the project name in the following format: + * `projects/{project}`. + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project = ''; + /** + * Optional. The unique stable account identifier used to search connections. + * The identifier should correspond to an `account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + * or account_id must be set, but not both. + * + * Generated from protobuf field string account_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $account_id = ''; + /** + * Optional. Deprecated: use `account_id` instead. + * The unique stable hashed account identifier used to search connections. The + * identifier should correspond to a `hashed_account_id` provided in a + * previous `CreateAssessment` or `AnnotateAssessment` call. Either + * hashed_account_id or account_id must be set, but not both. + * + * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $hashed_account_id = ''; + /** + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous + * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `SearchRelatedAccountGroupMemberships` must match the call that provided + * the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $project Required. The name of the project to search related account group + * memberships from. Specify the project name in the following format: + * `projects/{project}`. Please see + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * @param string $hashedAccountId Optional. Deprecated: use `account_id` instead. + * The unique stable hashed account identifier used to search connections. The + * identifier should correspond to a `hashed_account_id` provided in a + * previous `CreateAssessment` or `AnnotateAssessment` call. Either + * hashed_account_id or account_id must be set, but not both. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\SearchRelatedAccountGroupMembershipsRequest + * + * @experimental + */ + public static function build(string $project, string $hashedAccountId): self + { + return (new self()) + ->setProject($project) + ->setHashedAccountId($hashedAccountId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Required. The name of the project to search related account group + * memberships from. Specify the project name in the following format: + * `projects/{project}`. + * @type string $account_id + * Optional. The unique stable account identifier used to search connections. + * The identifier should correspond to an `account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + * or account_id must be set, but not both. + * @type string $hashed_account_id + * Optional. Deprecated: use `account_id` instead. + * The unique stable hashed account identifier used to search connections. The + * identifier should correspond to a `hashed_account_id` provided in a + * previous `CreateAssessment` or `AnnotateAssessment` call. Either + * hashed_account_id or account_id must be set, but not both. + * @type int $page_size + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous + * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `SearchRelatedAccountGroupMemberships` must match the call that provided + * the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project to search related account group + * memberships from. Specify the project name in the following format: + * `projects/{project}`. + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The name of the project to search related account group + * memberships from. Specify the project name in the following format: + * `projects/{project}`. + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. The unique stable account identifier used to search connections. + * The identifier should correspond to an `account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + * or account_id must be set, but not both. + * + * Generated from protobuf field string account_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccountId() + { + return $this->account_id; + } + + /** + * Optional. The unique stable account identifier used to search connections. + * The identifier should correspond to an `account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + * or account_id must be set, but not both. + * + * Generated from protobuf field string account_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccountId($var) + { + GPBUtil::checkString($var, True); + $this->account_id = $var; + + return $this; + } + + /** + * Optional. Deprecated: use `account_id` instead. + * The unique stable hashed account identifier used to search connections. The + * identifier should correspond to a `hashed_account_id` provided in a + * previous `CreateAssessment` or `AnnotateAssessment` call. Either + * hashed_account_id or account_id must be set, but not both. + * + * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getHashedAccountId() + { + @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); + return $this->hashed_account_id; + } + + /** + * Optional. Deprecated: use `account_id` instead. + * The unique stable hashed account identifier used to search connections. The + * identifier should correspond to a `hashed_account_id` provided in a + * previous `CreateAssessment` or `AnnotateAssessment` call. Either + * hashed_account_id or account_id must be set, but not both. + * + * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setHashedAccountId($var) + { + @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, False); + $this->hashed_account_id = $var; + + return $this; + } + + /** + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of groups to return. The service might return + * fewer than this value. If unspecified, at most 50 groups are returned. The + * maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.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 + * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `SearchRelatedAccountGroupMemberships` must match the call that provided + * the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous + * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `SearchRelatedAccountGroupMemberships` must match the call that provided + * the page token. + * + * Generated from protobuf field string page_token = 4 [(.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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php new file mode 100644 index 000000000000..6099354ab5ef --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php @@ -0,0 +1,105 @@ +google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse + */ +class SearchRelatedAccountGroupMembershipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The queried memberships. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; + */ + private $related_account_group_memberships; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $related_account_group_memberships + * The queried memberships. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * The queried memberships. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedAccountGroupMemberships() + { + return $this->related_account_group_memberships; + } + + /** + * The queried memberships. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedAccountGroupMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership::class); + $this->related_account_group_memberships = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php new file mode 100644 index 000000000000..8f411544313d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php @@ -0,0 +1,105 @@ +google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict + */ +class SmsTollFraudVerdict extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Probability of an SMS event being fraudulent. + * Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $risk = 0.0; + /** + * Output only. Reasons contributing to the SMS toll fraud verdict. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $risk + * Output only. Probability of an SMS event being fraudulent. + * Values are from 0.0 (lowest) to 1.0 (highest). + * @type array|\Google\Protobuf\Internal\RepeatedField $reasons + * Output only. Reasons contributing to the SMS toll fraud verdict. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Probability of an SMS event being fraudulent. + * Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getRisk() + { + return $this->risk; + } + + /** + * Output only. Probability of an SMS event being fraudulent. + * Values are from 0.0 (lowest) to 1.0 (highest). + * + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setRisk($var) + { + GPBUtil::checkFloat($var); + $this->risk = $var; + + return $this; + } + + /** + * Output only. Reasons contributing to the SMS toll fraud verdict. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasons() + { + return $this->reasons; + } + + /** + * Output only. Reasons contributing to the SMS toll fraud verdict. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict\SmsTollFraudReason::class); + $this->reasons = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php new file mode 100644 index 000000000000..6e67f9b1eecd --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php @@ -0,0 +1,57 @@ +google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason + */ +class SmsTollFraudReason +{ + /** + * Default unspecified reason + * + * Generated from protobuf enum SMS_TOLL_FRAUD_REASON_UNSPECIFIED = 0; + */ + const SMS_TOLL_FRAUD_REASON_UNSPECIFIED = 0; + /** + * The provided phone number was invalid + * + * Generated from protobuf enum INVALID_PHONE_NUMBER = 1; + */ + const INVALID_PHONE_NUMBER = 1; + + private static $valueToName = [ + self::SMS_TOLL_FRAUD_REASON_UNSPECIFIED => 'SMS_TOLL_FRAUD_REASON_UNSPECIFIED', + self::INVALID_PHONE_NUMBER => 'INVALID_PHONE_NUMBER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SmsTollFraudReason::class, \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict_SmsTollFraudReason::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php new file mode 100644 index 000000000000..310161e1b0e2 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php @@ -0,0 +1,113 @@ +google.cloud.recaptchaenterprise.v1.TestingOptions + */ +class TestingOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. All assessments for this Key return this score. Must be between 0 + * (likely not legitimate) and 1 (likely legitimate) inclusive. + * + * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $testing_score = 0.0; + /** + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $testing_challenge = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $testing_score + * Optional. All assessments for this Key return this score. Must be between 0 + * (likely not legitimate) and 1 (likely legitimate) inclusive. + * @type int $testing_challenge + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. All assessments for this Key return this score. Must be between 0 + * (likely not legitimate) and 1 (likely legitimate) inclusive. + * + * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getTestingScore() + { + return $this->testing_score; + } + + /** + * Optional. All assessments for this Key return this score. Must be between 0 + * (likely not legitimate) and 1 (likely legitimate) inclusive. + * + * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setTestingScore($var) + { + GPBUtil::checkFloat($var); + $this->testing_score = $var; + + return $this; + } + + /** + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTestingChallenge() + { + return $this->testing_challenge; + } + + /** + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTestingChallenge($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions\TestingChallenge::class); + $this->testing_challenge = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php new file mode 100644 index 000000000000..c139614f3727 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php @@ -0,0 +1,68 @@ +google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge + */ +class TestingChallenge +{ + /** + * Perform the normal risk analysis and return either nocaptcha or a + * challenge depending on risk and trust factors. + * + * Generated from protobuf enum TESTING_CHALLENGE_UNSPECIFIED = 0; + */ + const TESTING_CHALLENGE_UNSPECIFIED = 0; + /** + * Challenge requests for this key always return a nocaptcha, which + * does not require a solution. + * + * Generated from protobuf enum NOCAPTCHA = 1; + */ + const NOCAPTCHA = 1; + /** + * Challenge requests for this key always return an unsolvable + * challenge. + * + * Generated from protobuf enum UNSOLVABLE_CHALLENGE = 2; + */ + const UNSOLVABLE_CHALLENGE = 2; + + private static $valueToName = [ + self::TESTING_CHALLENGE_UNSPECIFIED => 'TESTING_CHALLENGE_UNSPECIFIED', + self::NOCAPTCHA => 'NOCAPTCHA', + self::UNSOLVABLE_CHALLENGE => 'UNSOLVABLE_CHALLENGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TestingChallenge::class, \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions_TestingChallenge::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php new file mode 100644 index 000000000000..76d51f5b8d2b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php @@ -0,0 +1,309 @@ +google.cloud.recaptchaenterprise.v1.TokenProperties + */ +class TokenProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether the provided user response token is valid. When valid + * = false, the reason could be specified in invalid_reason or it could also + * be due to a user failing to solve a challenge or a sitekey mismatch (i.e + * the sitekey used to generate the token was different than the one specified + * in the assessment). + * + * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $valid = false; + /** + * Output only. Reason associated with the response when valid = false. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $invalid_reason = 0; + /** + * Output only. The timestamp corresponding to the generation of the token. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The hostname of the page on which the token was generated (Web + * keys only). + * + * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hostname = ''; + /** + * Output only. The name of the Android package with which the token was + * generated (Android keys only). + * + * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $android_package_name = ''; + /** + * Output only. The ID of the iOS bundle with which the token was generated + * (iOS keys only). + * + * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ios_bundle_id = ''; + /** + * Output only. Action name provided at token generation. + * + * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $action = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $valid + * Output only. Whether the provided user response token is valid. When valid + * = false, the reason could be specified in invalid_reason or it could also + * be due to a user failing to solve a challenge or a sitekey mismatch (i.e + * the sitekey used to generate the token was different than the one specified + * in the assessment). + * @type int $invalid_reason + * Output only. Reason associated with the response when valid = false. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp corresponding to the generation of the token. + * @type string $hostname + * Output only. The hostname of the page on which the token was generated (Web + * keys only). + * @type string $android_package_name + * Output only. The name of the Android package with which the token was + * generated (Android keys only). + * @type string $ios_bundle_id + * Output only. The ID of the iOS bundle with which the token was generated + * (iOS keys only). + * @type string $action + * Output only. Action name provided at token generation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether the provided user response token is valid. When valid + * = false, the reason could be specified in invalid_reason or it could also + * be due to a user failing to solve a challenge or a sitekey mismatch (i.e + * the sitekey used to generate the token was different than the one specified + * in the assessment). + * + * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getValid() + { + return $this->valid; + } + + /** + * Output only. Whether the provided user response token is valid. When valid + * = false, the reason could be specified in invalid_reason or it could also + * be due to a user failing to solve a challenge or a sitekey mismatch (i.e + * the sitekey used to generate the token was different than the one specified + * in the assessment). + * + * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setValid($var) + { + GPBUtil::checkBool($var); + $this->valid = $var; + + return $this; + } + + /** + * Output only. Reason associated with the response when valid = false. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getInvalidReason() + { + return $this->invalid_reason; + } + + /** + * Output only. Reason associated with the response when valid = false. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setInvalidReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties\InvalidReason::class); + $this->invalid_reason = $var; + + return $this; + } + + /** + * Output only. The timestamp corresponding to the generation of the token. + * + * 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 corresponding to the generation of the token. + * + * 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 hostname of the page on which the token was generated (Web + * keys only). + * + * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Output only. The hostname of the page on which the token was generated (Web + * keys only). + * + * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Output only. The name of the Android package with which the token was + * generated (Android keys only). + * + * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAndroidPackageName() + { + return $this->android_package_name; + } + + /** + * Output only. The name of the Android package with which the token was + * generated (Android keys only). + * + * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAndroidPackageName($var) + { + GPBUtil::checkString($var, True); + $this->android_package_name = $var; + + return $this; + } + + /** + * Output only. The ID of the iOS bundle with which the token was generated + * (iOS keys only). + * + * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIosBundleId() + { + return $this->ios_bundle_id; + } + + /** + * Output only. The ID of the iOS bundle with which the token was generated + * (iOS keys only). + * + * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIosBundleId($var) + { + GPBUtil::checkString($var, True); + $this->ios_bundle_id = $var; + + return $this; + } + + /** + * Output only. Action name provided at token generation. + * + * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Output only. Action name provided at token generation. + * + * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php new file mode 100644 index 000000000000..94f9c48b3293 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php @@ -0,0 +1,93 @@ +google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason + */ +class InvalidReason +{ + /** + * Default unspecified type. + * + * Generated from protobuf enum INVALID_REASON_UNSPECIFIED = 0; + */ + const INVALID_REASON_UNSPECIFIED = 0; + /** + * If the failure reason was not accounted for. + * + * Generated from protobuf enum UNKNOWN_INVALID_REASON = 1; + */ + const UNKNOWN_INVALID_REASON = 1; + /** + * The provided user verification token was malformed. + * + * Generated from protobuf enum MALFORMED = 2; + */ + const MALFORMED = 2; + /** + * The user verification token had expired. + * + * Generated from protobuf enum EXPIRED = 3; + */ + const EXPIRED = 3; + /** + * The user verification had already been seen. + * + * Generated from protobuf enum DUPE = 4; + */ + const DUPE = 4; + /** + * The user verification token was not present. + * + * Generated from protobuf enum MISSING = 5; + */ + const MISSING = 5; + /** + * A retriable error (such as network failure) occurred on the browser. + * Could easily be simulated by an attacker. + * + * Generated from protobuf enum BROWSER_ERROR = 6; + */ + const BROWSER_ERROR = 6; + + private static $valueToName = [ + self::INVALID_REASON_UNSPECIFIED => 'INVALID_REASON_UNSPECIFIED', + self::UNKNOWN_INVALID_REASON => 'UNKNOWN_INVALID_REASON', + self::MALFORMED => 'MALFORMED', + self::EXPIRED => 'EXPIRED', + self::DUPE => 'DUPE', + self::MISSING => 'MISSING', + self::BROWSER_ERROR => 'BROWSER_ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InvalidReason::class, \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties_InvalidReason::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php new file mode 100644 index 000000000000..4a838d957421 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php @@ -0,0 +1,581 @@ +google.cloud.recaptchaenterprise.v1.TransactionData + */ +class TransactionData extends \Google\Protobuf\Internal\Message +{ + /** + * Unique identifier for the transaction. This custom identifier can be used + * to reference this transaction in the future, for example, labeling a refund + * or chargeback event. Two attempts at the same transaction should use the + * same transaction id. + * + * Generated from protobuf field optional string transaction_id = 11; + */ + protected $transaction_id = null; + /** + * Optional. The payment method for the transaction. The allowed values are: + * * credit-card + * * debit-card + * * gift-card + * * processor-{name} (If a third-party is used, for example, + * processor-paypal) + * * custom-{name} (If an alternative method is used, for example, + * custom-crypto) + * + * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $payment_method = ''; + /** + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. + * + * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $card_bin = ''; + /** + * Optional. The last four digits of the card. + * + * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $card_last_four = ''; + /** + * Optional. The currency code in ISO-4217 format. + * + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $currency_code = ''; + /** + * Optional. The decimal value of the transaction in the specified currency. + * + * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = 0.0; + /** + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. + * + * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shipping_value = 0.0; + /** + * Optional. Destination address if this transaction involves shipping a + * physical item. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shipping_address = null; + /** + * Optional. Address associated with the payment method when applicable. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $billing_address = null; + /** + * Optional. Information about the user paying/initiating the transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $user = null; + /** + * Optional. Information about the user or users fulfilling the transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $merchants; + /** + * Optional. Items purchased in this transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $items; + /** + * Optional. Information about the payment gateway's response to the + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gateway_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction_id + * Unique identifier for the transaction. This custom identifier can be used + * to reference this transaction in the future, for example, labeling a refund + * or chargeback event. Two attempts at the same transaction should use the + * same transaction id. + * @type string $payment_method + * Optional. The payment method for the transaction. The allowed values are: + * * credit-card + * * debit-card + * * gift-card + * * processor-{name} (If a third-party is used, for example, + * processor-paypal) + * * custom-{name} (If an alternative method is used, for example, + * custom-crypto) + * @type string $card_bin + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. + * @type string $card_last_four + * Optional. The last four digits of the card. + * @type string $currency_code + * Optional. The currency code in ISO-4217 format. + * @type float $value + * Optional. The decimal value of the transaction in the specified currency. + * @type float $shipping_value + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $shipping_address + * Optional. Destination address if this transaction involves shipping a + * physical item. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $billing_address + * Optional. Address associated with the payment method when applicable. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User $user + * Optional. Information about the user paying/initiating the transaction. + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>|\Google\Protobuf\Internal\RepeatedField $merchants + * Optional. Information about the user or users fulfilling the transaction. + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>|\Google\Protobuf\Internal\RepeatedField $items + * Optional. Items purchased in this transaction. + * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo $gateway_info + * Optional. Information about the payment gateway's response to the + * transaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Unique identifier for the transaction. This custom identifier can be used + * to reference this transaction in the future, for example, labeling a refund + * or chargeback event. Two attempts at the same transaction should use the + * same transaction id. + * + * Generated from protobuf field optional string transaction_id = 11; + * @return string + */ + public function getTransactionId() + { + return isset($this->transaction_id) ? $this->transaction_id : ''; + } + + public function hasTransactionId() + { + return isset($this->transaction_id); + } + + public function clearTransactionId() + { + unset($this->transaction_id); + } + + /** + * Unique identifier for the transaction. This custom identifier can be used + * to reference this transaction in the future, for example, labeling a refund + * or chargeback event. Two attempts at the same transaction should use the + * same transaction id. + * + * Generated from protobuf field optional string transaction_id = 11; + * @param string $var + * @return $this + */ + public function setTransactionId($var) + { + GPBUtil::checkString($var, True); + $this->transaction_id = $var; + + return $this; + } + + /** + * Optional. The payment method for the transaction. The allowed values are: + * * credit-card + * * debit-card + * * gift-card + * * processor-{name} (If a third-party is used, for example, + * processor-paypal) + * * custom-{name} (If an alternative method is used, for example, + * custom-crypto) + * + * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPaymentMethod() + { + return $this->payment_method; + } + + /** + * Optional. The payment method for the transaction. The allowed values are: + * * credit-card + * * debit-card + * * gift-card + * * processor-{name} (If a third-party is used, for example, + * processor-paypal) + * * custom-{name} (If an alternative method is used, for example, + * custom-crypto) + * + * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPaymentMethod($var) + { + GPBUtil::checkString($var, True); + $this->payment_method = $var; + + return $this; + } + + /** + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. + * + * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCardBin() + { + return $this->card_bin; + } + + /** + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. + * + * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCardBin($var) + { + GPBUtil::checkString($var, True); + $this->card_bin = $var; + + return $this; + } + + /** + * Optional. The last four digits of the card. + * + * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCardLastFour() + { + return $this->card_last_four; + } + + /** + * Optional. The last four digits of the card. + * + * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCardLastFour($var) + { + GPBUtil::checkString($var, True); + $this->card_last_four = $var; + + return $this; + } + + /** + * Optional. The currency code in ISO-4217 format. + * + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCurrencyCode() + { + return $this->currency_code; + } + + /** + * Optional. The currency code in ISO-4217 format. + * + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCurrencyCode($var) + { + GPBUtil::checkString($var, True); + $this->currency_code = $var; + + return $this; + } + + /** + * Optional. The decimal value of the transaction in the specified currency. + * + * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. The decimal value of the transaction in the specified currency. + * + * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkDouble($var); + $this->value = $var; + + return $this; + } + + /** + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. + * + * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getShippingValue() + { + return $this->shipping_value; + } + + /** + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. + * + * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setShippingValue($var) + { + GPBUtil::checkDouble($var); + $this->shipping_value = $var; + + return $this; + } + + /** + * Optional. Destination address if this transaction involves shipping a + * physical item. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null + */ + public function getShippingAddress() + { + return $this->shipping_address; + } + + public function hasShippingAddress() + { + return isset($this->shipping_address); + } + + public function clearShippingAddress() + { + unset($this->shipping_address); + } + + /** + * Optional. Destination address if this transaction involves shipping a + * physical item. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $var + * @return $this + */ + public function setShippingAddress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address::class); + $this->shipping_address = $var; + + return $this; + } + + /** + * Optional. Address associated with the payment method when applicable. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null + */ + public function getBillingAddress() + { + return $this->billing_address; + } + + public function hasBillingAddress() + { + return isset($this->billing_address); + } + + public function clearBillingAddress() + { + unset($this->billing_address); + } + + /** + * Optional. Address associated with the payment method when applicable. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $var + * @return $this + */ + public function setBillingAddress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address::class); + $this->billing_address = $var; + + return $this; + } + + /** + * Optional. Information about the user paying/initiating the transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User|null + */ + public function getUser() + { + return $this->user; + } + + public function hasUser() + { + return isset($this->user); + } + + public function clearUser() + { + unset($this->user); + } + + /** + * Optional. Information about the user paying/initiating the transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User::class); + $this->user = $var; + + return $this; + } + + /** + * Optional. Information about the user or users fulfilling the transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMerchants() + { + return $this->merchants; + } + + /** + * Optional. Information about the user or users fulfilling the transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMerchants($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User::class); + $this->merchants = $arr; + + return $this; + } + + /** + * Optional. Items purchased in this transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Optional. Items purchased in this transaction. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item::class); + $this->items = $arr; + + return $this; + } + + /** + * Optional. Information about the payment gateway's response to the + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo|null + */ + public function getGatewayInfo() + { + return $this->gateway_info; + } + + public function hasGatewayInfo() + { + return isset($this->gateway_info); + } + + public function clearGatewayInfo() + { + unset($this->gateway_info); + } + + /** + * Optional. Information about the payment gateway's response to the + * transaction. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo $var + * @return $this + */ + public function setGatewayInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo::class); + $this->gateway_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php new file mode 100644 index 000000000000..53c471921b0d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php @@ -0,0 +1,256 @@ +google.cloud.recaptchaenterprise.v1.TransactionData.Address + */ +class Address extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The recipient name, potentially including information such as + * "care of". + * + * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $recipient = ''; + /** + * Optional. The first lines of the address. The first line generally + * contains the street name and number, and further lines may include + * information such as an apartment number. + * + * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $address; + /** + * Optional. The town/city of the address. + * + * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $locality = ''; + /** + * Optional. The state, province, or otherwise administrative area of the + * address. + * + * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $administrative_area = ''; + /** + * Optional. The CLDR country/region of the address. + * + * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $region_code = ''; + /** + * Optional. The postal or ZIP code of the address. + * + * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $postal_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $recipient + * Optional. The recipient name, potentially including information such as + * "care of". + * @type array|\Google\Protobuf\Internal\RepeatedField $address + * Optional. The first lines of the address. The first line generally + * contains the street name and number, and further lines may include + * information such as an apartment number. + * @type string $locality + * Optional. The town/city of the address. + * @type string $administrative_area + * Optional. The state, province, or otherwise administrative area of the + * address. + * @type string $region_code + * Optional. The CLDR country/region of the address. + * @type string $postal_code + * Optional. The postal or ZIP code of the address. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The recipient name, potentially including information such as + * "care of". + * + * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRecipient() + { + return $this->recipient; + } + + /** + * Optional. The recipient name, potentially including information such as + * "care of". + * + * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRecipient($var) + { + GPBUtil::checkString($var, True); + $this->recipient = $var; + + return $this; + } + + /** + * Optional. The first lines of the address. The first line generally + * contains the street name and number, and further lines may include + * information such as an apartment number. + * + * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAddress() + { + return $this->address; + } + + /** + * Optional. The first lines of the address. The first line generally + * contains the street name and number, and further lines may include + * information such as an apartment number. + * + * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAddress($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->address = $arr; + + return $this; + } + + /** + * Optional. The town/city of the address. + * + * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLocality() + { + return $this->locality; + } + + /** + * Optional. The town/city of the address. + * + * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLocality($var) + { + GPBUtil::checkString($var, True); + $this->locality = $var; + + return $this; + } + + /** + * Optional. The state, province, or otherwise administrative area of the + * address. + * + * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdministrativeArea() + { + return $this->administrative_area; + } + + /** + * Optional. The state, province, or otherwise administrative area of the + * address. + * + * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdministrativeArea($var) + { + GPBUtil::checkString($var, True); + $this->administrative_area = $var; + + return $this; + } + + /** + * Optional. The CLDR country/region of the address. + * + * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRegionCode() + { + return $this->region_code; + } + + /** + * Optional. The CLDR country/region of the address. + * + * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRegionCode($var) + { + GPBUtil::checkString($var, True); + $this->region_code = $var; + + return $this; + } + + /** + * Optional. The postal or ZIP code of the address. + * + * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPostalCode() + { + return $this->postal_code; + } + + /** + * Optional. The postal or ZIP code of the address. + * + * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPostalCode($var) + { + GPBUtil::checkString($var, True); + $this->postal_code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Address::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_Address::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php new file mode 100644 index 000000000000..c80b7df3a8bf --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php @@ -0,0 +1,184 @@ +google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo + */ +class GatewayInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. Gateway response code describing the state of the transaction. + * + * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gateway_response_code = ''; + /** + * Optional. AVS response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * + * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $avs_response_code = ''; + /** + * Optional. CVV response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * + * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cvv_response_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). + * @type string $gateway_response_code + * Optional. Gateway response code describing the state of the transaction. + * @type string $avs_response_code + * Optional. AVS response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * @type string $cvv_response_code + * Optional. CVV response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). + * + * 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. Gateway response code describing the state of the transaction. + * + * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGatewayResponseCode() + { + return $this->gateway_response_code; + } + + /** + * Optional. Gateway response code describing the state of the transaction. + * + * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGatewayResponseCode($var) + { + GPBUtil::checkString($var, True); + $this->gateway_response_code = $var; + + return $this; + } + + /** + * Optional. AVS response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * + * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAvsResponseCode() + { + return $this->avs_response_code; + } + + /** + * Optional. AVS response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * + * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAvsResponseCode($var) + { + GPBUtil::checkString($var, True); + $this->avs_response_code = $var; + + return $this; + } + + /** + * Optional. CVV response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * + * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCvvResponseCode() + { + return $this->cvv_response_code; + } + + /** + * Optional. CVV response code from the gateway + * (available only when reCAPTCHA Enterprise is called after authorization). + * + * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCvvResponseCode($var) + { + GPBUtil::checkString($var, True); + $this->cvv_response_code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GatewayInfo::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_GatewayInfo::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php new file mode 100644 index 000000000000..e9cf18afba81 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php @@ -0,0 +1,180 @@ +google.cloud.recaptchaenterprise.v1.TransactionData.Item + */ +class Item extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The full name of the item. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. + * + * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = 0.0; + /** + * Optional. The quantity of this item that is being purchased. + * + * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $quantity = 0; + /** + * Optional. When a merchant is specified, its corresponding account_id. + * Necessary to populate marketplace-style transactions. + * + * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $merchant_account_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. The full name of the item. + * @type float $value + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. + * @type int|string $quantity + * Optional. The quantity of this item that is being purchased. + * @type string $merchant_account_id + * Optional. When a merchant is specified, its corresponding account_id. + * Necessary to populate marketplace-style transactions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The full name of the item. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. The full name of the item. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. + * + * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. + * + * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkDouble($var); + $this->value = $var; + + return $this; + } + + /** + * Optional. The quantity of this item that is being purchased. + * + * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getQuantity() + { + return $this->quantity; + } + + /** + * Optional. The quantity of this item that is being purchased. + * + * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setQuantity($var) + { + GPBUtil::checkInt64($var); + $this->quantity = $var; + + return $this; + } + + /** + * Optional. When a merchant is specified, its corresponding account_id. + * Necessary to populate marketplace-style transactions. + * + * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMerchantAccountId() + { + return $this->merchant_account_id; + } + + /** + * Optional. When a merchant is specified, its corresponding account_id. + * Necessary to populate marketplace-style transactions. + * + * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMerchantAccountId($var) + { + GPBUtil::checkString($var, True); + $this->merchant_account_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Item::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_Item::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php new file mode 100644 index 000000000000..f5aeaedf65c5 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php @@ -0,0 +1,256 @@ +google.cloud.recaptchaenterprise.v1.TransactionData.User + */ +class User extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Unique account identifier for this user. If using account + * defender, this should match the hashed_account_id field. Otherwise, a + * unique and persistent identifier for this account. + * + * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $account_id = ''; + /** + * Optional. The epoch milliseconds of the user's account creation. + * + * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $creation_ms = 0; + /** + * Optional. The email address of the user. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email = ''; + /** + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). + * + * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email_verified = false; + /** + * Optional. The phone number of the user, with country code. + * + * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $phone_number = ''; + /** + * Optional. Whether the phone number has been verified to be accessible by + * the user (OTP or similar). + * + * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $phone_verified = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $account_id + * Optional. Unique account identifier for this user. If using account + * defender, this should match the hashed_account_id field. Otherwise, a + * unique and persistent identifier for this account. + * @type int|string $creation_ms + * Optional. The epoch milliseconds of the user's account creation. + * @type string $email + * Optional. The email address of the user. + * @type bool $email_verified + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). + * @type string $phone_number + * Optional. The phone number of the user, with country code. + * @type bool $phone_verified + * Optional. Whether the phone number has been verified to be accessible by + * the user (OTP or similar). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Unique account identifier for this user. If using account + * defender, this should match the hashed_account_id field. Otherwise, a + * unique and persistent identifier for this account. + * + * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccountId() + { + return $this->account_id; + } + + /** + * Optional. Unique account identifier for this user. If using account + * defender, this should match the hashed_account_id field. Otherwise, a + * unique and persistent identifier for this account. + * + * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccountId($var) + { + GPBUtil::checkString($var, True); + $this->account_id = $var; + + return $this; + } + + /** + * Optional. The epoch milliseconds of the user's account creation. + * + * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getCreationMs() + { + return $this->creation_ms; + } + + /** + * Optional. The epoch milliseconds of the user's account creation. + * + * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setCreationMs($var) + { + GPBUtil::checkInt64($var); + $this->creation_ms = $var; + + return $this; + } + + /** + * Optional. The email address of the user. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Optional. The email address of the user. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). + * + * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEmailVerified() + { + return $this->email_verified; + } + + /** + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). + * + * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEmailVerified($var) + { + GPBUtil::checkBool($var); + $this->email_verified = $var; + + return $this; + } + + /** + * Optional. The phone number of the user, with country code. + * + * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPhoneNumber() + { + return $this->phone_number; + } + + /** + * Optional. The phone number of the user, with country code. + * + * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkString($var, True); + $this->phone_number = $var; + + return $this; + } + + /** + * Optional. Whether the phone number has been verified to be accessible by + * the user (OTP or similar). + * + * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getPhoneVerified() + { + return $this->phone_verified; + } + + /** + * Optional. Whether the phone number has been verified to be accessible by + * the user (OTP or similar). + * + * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setPhoneVerified($var) + { + GPBUtil::checkBool($var); + $this->phone_verified = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(User::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_User::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php new file mode 100644 index 000000000000..982397f1d7b8 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php @@ -0,0 +1,199 @@ +google.cloud.recaptchaenterprise.v1.TransactionEvent + */ +class TransactionEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The type of this transaction event. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType event_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event_type = 0; + /** + * Optional. The reason or standardized code that corresponds with this + * transaction event, if one exists. For example, a CHARGEBACK event with code + * 6005. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reason = ''; + /** + * Optional. The value that corresponds with this transaction event, if one + * exists. For example, a refund event where $5.00 was refunded. Currency is + * obtained from the original transaction data. + * + * Generated from protobuf field double value = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = 0.0; + /** + * Optional. Timestamp when this transaction event occurred; otherwise assumed + * to be the time of the API call. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $event_type + * Optional. The type of this transaction event. + * @type string $reason + * Optional. The reason or standardized code that corresponds with this + * transaction event, if one exists. For example, a CHARGEBACK event with code + * 6005. + * @type float $value + * Optional. The value that corresponds with this transaction event, if one + * exists. For example, a refund event where $5.00 was refunded. Currency is + * obtained from the original transaction data. + * @type \Google\Protobuf\Timestamp $event_time + * Optional. Timestamp when this transaction event occurred; otherwise assumed + * to be the time of the API call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The type of this transaction event. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType event_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * Optional. The type of this transaction event. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType event_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent\TransactionEventType::class); + $this->event_type = $var; + + return $this; + } + + /** + * Optional. The reason or standardized code that corresponds with this + * transaction event, if one exists. For example, a CHARGEBACK event with code + * 6005. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Optional. The reason or standardized code that corresponds with this + * transaction event, if one exists. For example, a CHARGEBACK event with code + * 6005. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * Optional. The value that corresponds with this transaction event, if one + * exists. For example, a refund event where $5.00 was refunded. Currency is + * obtained from the original transaction data. + * + * Generated from protobuf field double value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. The value that corresponds with this transaction event, if one + * exists. For example, a refund event where $5.00 was refunded. Currency is + * obtained from the original transaction data. + * + * Generated from protobuf field double value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkDouble($var); + $this->value = $var; + + return $this; + } + + /** + * Optional. Timestamp when this transaction event occurred; otherwise assumed + * to be the time of the API call. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Optional. Timestamp when this transaction event occurred; otherwise assumed + * to be the time of the API call. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php new file mode 100644 index 000000000000..04f38508e880 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php @@ -0,0 +1,214 @@ +google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType + */ +class TransactionEventType +{ + /** + * Default, unspecified event type. + * + * Generated from protobuf enum TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0; + */ + const TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0; + /** + * Indicates that the transaction is approved by the merchant. The + * accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY', + * 'CYBERSOURCE', or 'MANUAL_REVIEW'. + * + * Generated from protobuf enum MERCHANT_APPROVE = 1; + */ + const MERCHANT_APPROVE = 1; + /** + * Indicates that the transaction is denied and concluded due to risks + * detected by the merchant. The accompanying reasons can include terms such + * as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'. + * + * Generated from protobuf enum MERCHANT_DENY = 2; + */ + const MERCHANT_DENY = 2; + /** + * Indicates that the transaction is being evaluated by a human, due to + * suspicion or risk. + * + * Generated from protobuf enum MANUAL_REVIEW = 3; + */ + const MANUAL_REVIEW = 3; + /** + * Indicates that the authorization attempt with the card issuer succeeded. + * + * Generated from protobuf enum AUTHORIZATION = 4; + */ + const AUTHORIZATION = 4; + /** + * Indicates that the authorization attempt with the card issuer failed. + * The accompanying reasons can include Visa's '54' indicating that the card + * is expired, or '82' indicating that the CVV is incorrect. + * + * Generated from protobuf enum AUTHORIZATION_DECLINE = 5; + */ + const AUTHORIZATION_DECLINE = 5; + /** + * Indicates that the transaction is completed because the funds were + * settled. + * + * Generated from protobuf enum PAYMENT_CAPTURE = 6; + */ + const PAYMENT_CAPTURE = 6; + /** + * Indicates that the transaction could not be completed because the funds + * were not settled. + * + * Generated from protobuf enum PAYMENT_CAPTURE_DECLINE = 7; + */ + const PAYMENT_CAPTURE_DECLINE = 7; + /** + * Indicates that the transaction has been canceled. Specify the reason + * for the cancellation. For example, 'INSUFFICIENT_INVENTORY'. + * + * Generated from protobuf enum CANCEL = 8; + */ + const CANCEL = 8; + /** + * Indicates that the merchant has received a chargeback inquiry due to + * fraud for the transaction, requesting additional information before a + * fraud chargeback is officially issued and a formal chargeback + * notification is sent. + * + * Generated from protobuf enum CHARGEBACK_INQUIRY = 9; + */ + const CHARGEBACK_INQUIRY = 9; + /** + * Indicates that the merchant has received a chargeback alert due to fraud + * for the transaction. The process of resolving the dispute without + * involving the payment network is started. + * + * Generated from protobuf enum CHARGEBACK_ALERT = 10; + */ + const CHARGEBACK_ALERT = 10; + /** + * Indicates that a fraud notification is issued for the transaction, sent + * by the payment instrument's issuing bank because the transaction appears + * to be fraudulent. We recommend including TC40 or SAFE data in the + * `reason` field for this event type. For partial chargebacks, we recommend + * that you include an amount in the `value` field. + * + * Generated from protobuf enum FRAUD_NOTIFICATION = 11; + */ + const FRAUD_NOTIFICATION = 11; + /** + * Indicates that the merchant is informed by the payment network that the + * transaction has entered the chargeback process due to fraud. Reason code + * examples include Discover's '6005' and '6041'. For partial chargebacks, + * we recommend that you include an amount in the `value` field. + * + * Generated from protobuf enum CHARGEBACK = 12; + */ + const CHARGEBACK = 12; + /** + * Indicates that the transaction has entered the chargeback process due to + * fraud, and that the merchant has chosen to enter representment. Reason + * examples include Discover's '6005' and '6041'. For partial chargebacks, + * we recommend that you include an amount in the `value` field. + * + * Generated from protobuf enum CHARGEBACK_REPRESENTMENT = 13; + */ + const CHARGEBACK_REPRESENTMENT = 13; + /** + * Indicates that the transaction has had a fraud chargeback which was + * illegitimate and was reversed as a result. For partial chargebacks, we + * recommend that you include an amount in the `value` field. + * + * Generated from protobuf enum CHARGEBACK_REVERSE = 14; + */ + const CHARGEBACK_REVERSE = 14; + /** + * Indicates that the merchant has received a refund for a completed + * transaction. For partial refunds, we recommend that you include an amount + * in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of + * exempt tax) + * + * Generated from protobuf enum REFUND_REQUEST = 15; + */ + const REFUND_REQUEST = 15; + /** + * Indicates that the merchant has received a refund request for this + * transaction, but that they have declined it. For partial refunds, we + * recommend that you include an amount in the `value` field. Reason + * example: 'TAX_EXEMPT' (partial refund of exempt tax) + * + * Generated from protobuf enum REFUND_DECLINE = 16; + */ + const REFUND_DECLINE = 16; + /** + * Indicates that the completed transaction was refunded by the merchant. + * For partial refunds, we recommend that you include an amount in the + * `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt + * tax) + * + * Generated from protobuf enum REFUND = 17; + */ + const REFUND = 17; + /** + * Indicates that the completed transaction was refunded by the merchant, + * and that this refund was reversed. For partial refunds, we recommend that + * you include an amount in the `value` field. + * + * Generated from protobuf enum REFUND_REVERSE = 18; + */ + const REFUND_REVERSE = 18; + + private static $valueToName = [ + self::TRANSACTION_EVENT_TYPE_UNSPECIFIED => 'TRANSACTION_EVENT_TYPE_UNSPECIFIED', + self::MERCHANT_APPROVE => 'MERCHANT_APPROVE', + self::MERCHANT_DENY => 'MERCHANT_DENY', + self::MANUAL_REVIEW => 'MANUAL_REVIEW', + self::AUTHORIZATION => 'AUTHORIZATION', + self::AUTHORIZATION_DECLINE => 'AUTHORIZATION_DECLINE', + self::PAYMENT_CAPTURE => 'PAYMENT_CAPTURE', + self::PAYMENT_CAPTURE_DECLINE => 'PAYMENT_CAPTURE_DECLINE', + self::CANCEL => 'CANCEL', + self::CHARGEBACK_INQUIRY => 'CHARGEBACK_INQUIRY', + self::CHARGEBACK_ALERT => 'CHARGEBACK_ALERT', + self::FRAUD_NOTIFICATION => 'FRAUD_NOTIFICATION', + self::CHARGEBACK => 'CHARGEBACK', + self::CHARGEBACK_REPRESENTMENT => 'CHARGEBACK_REPRESENTMENT', + self::CHARGEBACK_REVERSE => 'CHARGEBACK_REVERSE', + self::REFUND_REQUEST => 'REFUND_REQUEST', + self::REFUND_DECLINE => 'REFUND_DECLINE', + self::REFUND => 'REFUND', + self::REFUND_REVERSE => 'REFUND_REVERSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TransactionEventType::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent_TransactionEventType::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php new file mode 100644 index 000000000000..30296a309d66 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php @@ -0,0 +1,141 @@ +google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest + */ +class UpdateFirewallPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The policy to update. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $firewall_policy = null; + /** + * Optional. The mask to control which fields of the policy get updated. If + * the mask is not present, all fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy Required. The policy to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The mask to control which fields of the policy get updated. If + * the mask is not present, all fields are updated. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\UpdateFirewallPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setFirewallPolicy($firewallPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewall_policy + * Required. The policy to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields of the policy get updated. If + * the mask is not present, all fields are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The policy to update. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy|null + */ + public function getFirewallPolicy() + { + return $this->firewall_policy; + } + + public function hasFirewallPolicy() + { + return isset($this->firewall_policy); + } + + public function clearFirewallPolicy() + { + unset($this->firewall_policy); + } + + /** + * Required. The policy to update. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $var + * @return $this + */ + public function setFirewallPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); + $this->firewall_policy = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields of the policy get updated. If + * the mask is not present, all fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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 mask to control which fields of the policy get updated. If + * the mask is not present, all fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php new file mode 100644 index 000000000000..00a05f2d2d8e --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php @@ -0,0 +1,141 @@ +google.cloud.recaptchaenterprise.v1.UpdateKeyRequest + */ +class UpdateKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The key to update. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = null; + /** + * Optional. The mask to control which fields of the key get updated. If the + * mask is not present, all fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $key Required. The key to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The mask to control which fields of the key get updated. If the + * mask is not present, all fields are updated. + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\UpdateKeyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\RecaptchaEnterprise\V1\Key $key, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setKey($key) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\RecaptchaEnterprise\V1\Key $key + * Required. The key to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields of the key get updated. If the + * mask is not present, all fields are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The key to update. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\RecaptchaEnterprise\V1\Key|null + */ + public function getKey() + { + return $this->key; + } + + public function hasKey() + { + return isset($this->key); + } + + public function clearKey() + { + unset($this->key); + } + + /** + * Required. The key to update. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Key::class); + $this->key = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields of the key get updated. If the + * mask is not present, all fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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 mask to control which fields of the key get updated. If the + * mask is not present, all fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php new file mode 100644 index 000000000000..172fe5a75ccd --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php @@ -0,0 +1,147 @@ +google.cloud.recaptchaenterprise.v1.UserId + */ +class UserId extends \Google\Protobuf\Internal\Message +{ + protected $id_oneof; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Optional. An email address. + * @type string $phone_number + * Optional. A phone number. Should use the E.164 format. + * @type string $username + * Optional. A unique username, if different from all the other identifiers + * and `account_id` that are provided. Can be a unique login handle or + * display name for a user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. An email address. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return $this->readOneof(1); + } + + public function hasEmail() + { + return $this->hasOneof(1); + } + + /** + * Optional. An email address. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. A phone number. Should use the E.164 format. + * + * Generated from protobuf field string phone_number = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPhoneNumber() + { + return $this->readOneof(2); + } + + public function hasPhoneNumber() + { + return $this->hasOneof(2); + } + + /** + * Optional. A phone number. Should use the E.164 format. + * + * Generated from protobuf field string phone_number = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. A unique username, if different from all the other identifiers + * and `account_id` that are provided. Can be a unique login handle or + * display name for a user. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUsername() + { + return $this->readOneof(3); + } + + public function hasUsername() + { + return $this->hasOneof(3); + } + + /** + * Optional. A unique username, if different from all the other identifiers + * and `account_id` that are provided. Can be a unique login handle or + * display name for a user. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getIdOneof() + { + return $this->whichOneof("id_oneof"); + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php new file mode 100644 index 000000000000..45d5c2715ce9 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php @@ -0,0 +1,169 @@ +google.cloud.recaptchaenterprise.v1.UserInfo + */ +class UserInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Creation time for this account associated with this user. Leave + * blank for non logged-in actions, guest checkout, or when there is no + * account associated with the current user. + * + * Generated from protobuf field .google.protobuf.Timestamp create_account_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $create_account_time = null; + /** + * Optional. For logged-in requests or login/registration requests, the unique + * account identifier associated with this user. You can use the username if + * it is stable (meaning it is the same for every request associated with the + * same user), or any stable user ID of your choice. Leave blank for non + * logged-in actions or guest checkout. + * + * Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $account_id = ''; + /** + * Optional. Identifiers associated with this user or request. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.UserId user_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $user_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_account_time + * Optional. Creation time for this account associated with this user. Leave + * blank for non logged-in actions, guest checkout, or when there is no + * account associated with the current user. + * @type string $account_id + * Optional. For logged-in requests or login/registration requests, the unique + * account identifier associated with this user. You can use the username if + * it is stable (meaning it is the same for every request associated with the + * same user), or any stable user ID of your choice. Leave blank for non + * logged-in actions or guest checkout. + * @type array<\Google\Cloud\RecaptchaEnterprise\V1\UserId>|\Google\Protobuf\Internal\RepeatedField $user_ids + * Optional. Identifiers associated with this user or request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Creation time for this account associated with this user. Leave + * blank for non logged-in actions, guest checkout, or when there is no + * account associated with the current user. + * + * Generated from protobuf field .google.protobuf.Timestamp create_account_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateAccountTime() + { + return $this->create_account_time; + } + + public function hasCreateAccountTime() + { + return isset($this->create_account_time); + } + + public function clearCreateAccountTime() + { + unset($this->create_account_time); + } + + /** + * Optional. Creation time for this account associated with this user. Leave + * blank for non logged-in actions, guest checkout, or when there is no + * account associated with the current user. + * + * Generated from protobuf field .google.protobuf.Timestamp create_account_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateAccountTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_account_time = $var; + + return $this; + } + + /** + * Optional. For logged-in requests or login/registration requests, the unique + * account identifier associated with this user. You can use the username if + * it is stable (meaning it is the same for every request associated with the + * same user), or any stable user ID of your choice. Leave blank for non + * logged-in actions or guest checkout. + * + * Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccountId() + { + return $this->account_id; + } + + /** + * Optional. For logged-in requests or login/registration requests, the unique + * account identifier associated with this user. You can use the username if + * it is stable (meaning it is the same for every request associated with the + * same user), or any stable user ID of your choice. Leave blank for non + * logged-in actions or guest checkout. + * + * Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccountId($var) + { + GPBUtil::checkString($var, True); + $this->account_id = $var; + + return $this; + } + + /** + * Optional. Identifiers associated with this user or request. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.UserId user_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUserIds() + { + return $this->user_ids; + } + + /** + * Optional. Identifiers associated with this user or request. + * + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.UserId user_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\RecaptchaEnterprise\V1\UserId>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUserIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\UserId::class); + $this->user_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php new file mode 100644 index 000000000000..7eb59cf1472b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php @@ -0,0 +1,102 @@ +google.cloud.recaptchaenterprise.v1.WafSettings + */ +class WafSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The WAF service that uses this key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafService waf_service = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $waf_service = 0; + /** + * Required. The WAF feature for which this key is enabled. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature waf_feature = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $waf_feature = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $waf_service + * Required. The WAF service that uses this key. + * @type int $waf_feature + * Required. The WAF feature for which this key is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Required. The WAF service that uses this key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafService waf_service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getWafService() + { + return $this->waf_service; + } + + /** + * Required. The WAF service that uses this key. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafService waf_service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setWafService($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings\WafService::class); + $this->waf_service = $var; + + return $this; + } + + /** + * Required. The WAF feature for which this key is enabled. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature waf_feature = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getWafFeature() + { + return $this->waf_feature; + } + + /** + * Required. The WAF feature for which this key is enabled. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature waf_feature = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setWafFeature($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings\WafFeature::class); + $this->waf_feature = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php new file mode 100644 index 000000000000..33d01002105a --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php @@ -0,0 +1,81 @@ +google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature + */ +class WafFeature +{ + /** + * Undefined feature. + * + * Generated from protobuf enum WAF_FEATURE_UNSPECIFIED = 0; + */ + const WAF_FEATURE_UNSPECIFIED = 0; + /** + * Redirects suspicious traffic to reCAPTCHA. + * + * Generated from protobuf enum CHALLENGE_PAGE = 1; + */ + const CHALLENGE_PAGE = 1; + /** + * Use reCAPTCHA session-tokens to protect the whole user session on the + * site's domain. + * + * Generated from protobuf enum SESSION_TOKEN = 2; + */ + const SESSION_TOKEN = 2; + /** + * Use reCAPTCHA action-tokens to protect user actions. + * + * Generated from protobuf enum ACTION_TOKEN = 3; + */ + const ACTION_TOKEN = 3; + /** + * Use reCAPTCHA WAF express protection to protect any content other than + * web pages, like APIs and IoT devices. + * + * Generated from protobuf enum EXPRESS = 5; + */ + const EXPRESS = 5; + + private static $valueToName = [ + self::WAF_FEATURE_UNSPECIFIED => 'WAF_FEATURE_UNSPECIFIED', + self::CHALLENGE_PAGE => 'CHALLENGE_PAGE', + self::SESSION_TOKEN => 'SESSION_TOKEN', + self::ACTION_TOKEN => 'ACTION_TOKEN', + self::EXPRESS => 'EXPRESS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WafFeature::class, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings_WafFeature::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php new file mode 100644 index 000000000000..e56c885cea57 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php @@ -0,0 +1,78 @@ +google.cloud.recaptchaenterprise.v1.WafSettings.WafService + */ +class WafService +{ + /** + * Undefined WAF + * + * Generated from protobuf enum WAF_SERVICE_UNSPECIFIED = 0; + */ + const WAF_SERVICE_UNSPECIFIED = 0; + /** + * Cloud Armor + * + * Generated from protobuf enum CA = 1; + */ + const CA = 1; + /** + * Fastly + * + * Generated from protobuf enum FASTLY = 3; + */ + const FASTLY = 3; + /** + * Cloudflare + * + * Generated from protobuf enum CLOUDFLARE = 4; + */ + const CLOUDFLARE = 4; + /** + * Akamai + * + * Generated from protobuf enum AKAMAI = 5; + */ + const AKAMAI = 5; + + private static $valueToName = [ + self::WAF_SERVICE_UNSPECIFIED => 'WAF_SERVICE_UNSPECIFIED', + self::CA => 'CA', + self::FASTLY => 'FASTLY', + self::CLOUDFLARE => 'CLOUDFLARE', + self::AKAMAI => 'AKAMAI', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WafService::class, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings_WafService::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php new file mode 100644 index 000000000000..deee451420f4 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php @@ -0,0 +1,227 @@ +google.cloud.recaptchaenterprise.v1.WebKeySettings + */ +class WebKeySettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If set to true, it means allowed_domains are not enforced. + * + * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_all_domains = false; + /** + * Optional. Domains or subdomains of websites allowed to use the key. All + * subdomains of an allowed domain are automatically allowed. A valid domain + * requires a host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + * + * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_domains; + /** + * Optional. If set to true, the key can be used on AMP (Accelerated Mobile + * Pages) websites. This is supported only for the SCORE integration type. + * + * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_amp_traffic = false; + /** + * Required. Describes how this key is integrated with the website. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $integration_type = 0; + /** + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $challenge_security_preference = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $allow_all_domains + * Optional. If set to true, it means allowed_domains are not enforced. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_domains + * Optional. Domains or subdomains of websites allowed to use the key. All + * subdomains of an allowed domain are automatically allowed. A valid domain + * requires a host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + * @type bool $allow_amp_traffic + * Optional. If set to true, the key can be used on AMP (Accelerated Mobile + * Pages) websites. This is supported only for the SCORE integration type. + * @type int $integration_type + * Required. Describes how this key is integrated with the website. + * @type int $challenge_security_preference + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If set to true, it means allowed_domains are not enforced. + * + * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowAllDomains() + { + return $this->allow_all_domains; + } + + /** + * Optional. If set to true, it means allowed_domains are not enforced. + * + * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowAllDomains($var) + { + GPBUtil::checkBool($var); + $this->allow_all_domains = $var; + + return $this; + } + + /** + * Optional. Domains or subdomains of websites allowed to use the key. All + * subdomains of an allowed domain are automatically allowed. A valid domain + * requires a host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + * + * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedDomains() + { + return $this->allowed_domains; + } + + /** + * Optional. Domains or subdomains of websites allowed to use the key. All + * subdomains of an allowed domain are automatically allowed. A valid domain + * requires a host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + * + * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedDomains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_domains = $arr; + + return $this; + } + + /** + * Optional. If set to true, the key can be used on AMP (Accelerated Mobile + * Pages) websites. This is supported only for the SCORE integration type. + * + * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowAmpTraffic() + { + return $this->allow_amp_traffic; + } + + /** + * Optional. If set to true, the key can be used on AMP (Accelerated Mobile + * Pages) websites. This is supported only for the SCORE integration type. + * + * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowAmpTraffic($var) + { + GPBUtil::checkBool($var); + $this->allow_amp_traffic = $var; + + return $this; + } + + /** + * Required. Describes how this key is integrated with the website. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getIntegrationType() + { + return $this->integration_type; + } + + /** + * Required. Describes how this key is integrated with the website. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setIntegrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings\IntegrationType::class); + $this->integration_type = $var; + + return $this; + } + + /** + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getChallengeSecurityPreference() + { + return $this->challenge_security_preference; + } + + /** + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setChallengeSecurityPreference($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings\ChallengeSecurityPreference::class); + $this->challenge_security_preference = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php new file mode 100644 index 000000000000..d88becd7d59b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php @@ -0,0 +1,72 @@ +google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference + */ +class ChallengeSecurityPreference +{ + /** + * Default type that indicates this enum hasn't been specified. + * + * Generated from protobuf enum CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0; + */ + const CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0; + /** + * Key tends to show fewer and easier challenges. + * + * Generated from protobuf enum USABILITY = 1; + */ + const USABILITY = 1; + /** + * Key tends to show balanced (in amount and difficulty) challenges. + * + * Generated from protobuf enum BALANCE = 2; + */ + const BALANCE = 2; + /** + * Key tends to show more and harder challenges. + * + * Generated from protobuf enum SECURITY = 3; + */ + const SECURITY = 3; + + private static $valueToName = [ + self::CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED => 'CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED', + self::USABILITY => 'USABILITY', + self::BALANCE => 'BALANCE', + self::SECURITY => 'SECURITY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ChallengeSecurityPreference::class, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings_ChallengeSecurityPreference::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php new file mode 100644 index 000000000000..c254ac1621f1 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php @@ -0,0 +1,76 @@ +google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType + */ +class IntegrationType +{ + /** + * Default type that indicates this enum hasn't been specified. This is not + * a valid IntegrationType, one of the other types must be specified + * instead. + * + * Generated from protobuf enum INTEGRATION_TYPE_UNSPECIFIED = 0; + */ + const INTEGRATION_TYPE_UNSPECIFIED = 0; + /** + * Only used to produce scores. It doesn't display the "I'm not a robot" + * checkbox and never shows captcha challenges. + * + * Generated from protobuf enum SCORE = 1; + */ + const SCORE = 1; + /** + * Displays the "I'm not a robot" checkbox and may show captcha challenges + * after it is checked. + * + * Generated from protobuf enum CHECKBOX = 2; + */ + const CHECKBOX = 2; + /** + * Doesn't display the "I'm not a robot" checkbox, but may show captcha + * challenges after risk analysis. + * + * Generated from protobuf enum INVISIBLE = 3; + */ + const INVISIBLE = 3; + + private static $valueToName = [ + self::INTEGRATION_TYPE_UNSPECIFIED => 'INTEGRATION_TYPE_UNSPECIFIED', + self::SCORE => 'SCORE', + self::CHECKBOX => 'CHECKBOX', + self::INVISIBLE => 'INVISIBLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IntegrationType::class, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings_IntegrationType::class); + diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php new file mode 100644 index 000000000000..281f7b67c418 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php @@ -0,0 +1,94 @@ +setIp($ipOverrideDataIp) + ->setOverrideType($ipOverrideDataOverrideType); + $request = (new AddIpOverrideRequest()) + ->setName($formattedName) + ->setIpOverrideData($ipOverrideData); + + // Call the API and handle any network failures. + try { + /** @var AddIpOverrideResponse $response */ + $response = $recaptchaEnterpriseServiceClient->addIpOverride($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); + $ipOverrideDataIp = '[IP]'; + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + + add_ip_override_sample($formattedName, $ipOverrideDataIp, $ipOverrideDataOverrideType); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php new file mode 100644 index 000000000000..795285fdc619 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php @@ -0,0 +1,79 @@ +setName($formattedName) + ->setAnnotation($annotation); + + // Call the API and handle any network failures. + try { + /** @var AnnotateAssessmentResponse $response */ + $response = $recaptchaEnterpriseServiceClient->annotateAssessment($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 = RecaptchaEnterpriseServiceClient::assessmentName('[PROJECT]', '[ASSESSMENT]'); + $annotation = Annotation::ANNOTATION_UNSPECIFIED; + + annotate_assessment_sample($formattedName, $annotation); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php new file mode 100644 index 000000000000..6f4232778734 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setAssessment($assessment); + + // Call the API and handle any network failures. + try { + /** @var Assessment $response */ + $response = $recaptchaEnterpriseServiceClient->createAssessment($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + + create_assessment_sample($formattedParent); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php new file mode 100644 index 000000000000..69aaafca3e92 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php @@ -0,0 +1,76 @@ +setParent($formattedParent) + ->setFirewallPolicy($firewallPolicy); + + // Call the API and handle any network failures. + try { + /** @var FirewallPolicy $response */ + $response = $recaptchaEnterpriseServiceClient->createFirewallPolicy($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + + create_firewall_policy_sample($formattedParent); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php new file mode 100644 index 000000000000..21f9ac2c03fe --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php @@ -0,0 +1,77 @@ +setDisplayName($keyDisplayName); + $request = (new CreateKeyRequest()) + ->setParent($formattedParent) + ->setKey($key); + + // Call the API and handle any network failures. + try { + /** @var Key $response */ + $response = $recaptchaEnterpriseServiceClient->createKey($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + $keyDisplayName = '[DISPLAY_NAME]'; + + create_key_sample($formattedParent, $keyDisplayName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php new file mode 100644 index 000000000000..778dff633d93 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $recaptchaEnterpriseServiceClient->deleteFirewallPolicy($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 = RecaptchaEnterpriseServiceClient::firewallPolicyName( + '[PROJECT]', + '[FIREWALLPOLICY]' + ); + + delete_firewall_policy_sample($formattedName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php new file mode 100644 index 000000000000..1c638b7a7522 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $recaptchaEnterpriseServiceClient->deleteKey($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); + + delete_key_sample($formattedName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php new file mode 100644 index 000000000000..ee3cd695bcc5 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FirewallPolicy $response */ + $response = $recaptchaEnterpriseServiceClient->getFirewallPolicy($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 = RecaptchaEnterpriseServiceClient::firewallPolicyName( + '[PROJECT]', + '[FIREWALLPOLICY]' + ); + + get_firewall_policy_sample($formattedName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php new file mode 100644 index 000000000000..31763afbd0a6 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Key $response */ + $response = $recaptchaEnterpriseServiceClient->getKey($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); + + get_key_sample($formattedName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php new file mode 100644 index 000000000000..47fd8ee6e6cf --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Metrics $response */ + $response = $recaptchaEnterpriseServiceClient->getMetrics($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 = RecaptchaEnterpriseServiceClient::metricsName('[PROJECT]', '[KEY]'); + + get_metrics_sample($formattedName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php new file mode 100644 index 000000000000..124b5973bd86 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recaptchaEnterpriseServiceClient->listFirewallPolicies($request); + + /** @var FirewallPolicy $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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + + list_firewall_policies_sample($formattedParent); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php new file mode 100644 index 000000000000..ca998523c263 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recaptchaEnterpriseServiceClient->listIpOverrides($request); + + /** @var IpOverrideData $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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); + + list_ip_overrides_sample($formattedParent); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php new file mode 100644 index 000000000000..468c27c507ff --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recaptchaEnterpriseServiceClient->listKeys($request); + + /** @var Key $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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + + list_keys_sample($formattedParent); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php new file mode 100644 index 000000000000..0234cee9450a --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recaptchaEnterpriseServiceClient->listRelatedAccountGroupMemberships($request); + + /** @var RelatedAccountGroupMembership $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 = RecaptchaEnterpriseServiceClient::relatedAccountGroupName( + '[PROJECT]', + '[RELATEDACCOUNTGROUP]' + ); + + list_related_account_group_memberships_sample($formattedParent); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php new file mode 100644 index 000000000000..1c3d589a0b34 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recaptchaEnterpriseServiceClient->listRelatedAccountGroups($request); + + /** @var RelatedAccountGroup $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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + + list_related_account_groups_sample($formattedParent); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php new file mode 100644 index 000000000000..8d057ec1fd0d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Key $response */ + $response = $recaptchaEnterpriseServiceClient->migrateKey($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); + + migrate_key_sample($formattedName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php new file mode 100644 index 000000000000..bcd40ed3b151 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php @@ -0,0 +1,95 @@ +setIp($ipOverrideDataIp) + ->setOverrideType($ipOverrideDataOverrideType); + $request = (new RemoveIpOverrideRequest()) + ->setName($formattedName) + ->setIpOverrideData($ipOverrideData); + + // Call the API and handle any network failures. + try { + /** @var RemoveIpOverrideResponse $response */ + $response = $recaptchaEnterpriseServiceClient->removeIpOverride($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); + $ipOverrideDataIp = '[IP]'; + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + + remove_ip_override_sample($formattedName, $ipOverrideDataIp, $ipOverrideDataOverrideType); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php new file mode 100644 index 000000000000..2107eda20751 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var ReorderFirewallPoliciesResponse $response */ + $response = $recaptchaEnterpriseServiceClient->reorderFirewallPolicies($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + $formattedNamesElement = RecaptchaEnterpriseServiceClient::firewallPolicyName( + '[PROJECT]', + '[FIREWALLPOLICY]' + ); + + reorder_firewall_policies_sample($formattedParent, $formattedNamesElement); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php new file mode 100644 index 000000000000..c74bb8267efe --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php @@ -0,0 +1,74 @@ +setKey($formattedKey); + + // Call the API and handle any network failures. + try { + /** @var RetrieveLegacySecretKeyResponse $response */ + $response = $recaptchaEnterpriseServiceClient->retrieveLegacySecretKey($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 +{ + $formattedKey = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); + + retrieve_legacy_secret_key_sample($formattedKey); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php new file mode 100644 index 000000000000..3b9e0e41ae23 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php @@ -0,0 +1,78 @@ +setProject($formattedProject); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recaptchaEnterpriseServiceClient->searchRelatedAccountGroupMemberships($request); + + /** @var RelatedAccountGroupMembership $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 +{ + $formattedProject = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + + search_related_account_group_memberships_sample($formattedProject); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php new file mode 100644 index 000000000000..580ddd57fcfd --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php @@ -0,0 +1,59 @@ +setFirewallPolicy($firewallPolicy); + + // Call the API and handle any network failures. + try { + /** @var FirewallPolicy $response */ + $response = $recaptchaEnterpriseServiceClient->updateFirewallPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php new file mode 100644 index 000000000000..590dd3e700e2 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php @@ -0,0 +1,72 @@ +setDisplayName($keyDisplayName); + $request = (new UpdateKeyRequest()) + ->setKey($key); + + // Call the API and handle any network failures. + try { + /** @var Key $response */ + $response = $recaptchaEnterpriseServiceClient->updateKey($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 +{ + $keyDisplayName = '[DISPLAY_NAME]'; + + update_key_sample($keyDisplayName); +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php new file mode 100644 index 000000000000..becf1c786ec5 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php @@ -0,0 +1,955 @@ + addIpOverrideAsync(AddIpOverrideRequest $request, array $optionalArgs = []) + * @method PromiseInterface annotateAssessmentAsync(AnnotateAssessmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAssessmentAsync(CreateAssessmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createFirewallPolicyAsync(CreateFirewallPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createKeyAsync(CreateKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFirewallPolicyAsync(DeleteFirewallPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteKeyAsync(DeleteKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFirewallPolicyAsync(GetFirewallPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getKeyAsync(GetKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMetricsAsync(GetMetricsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFirewallPoliciesAsync(ListFirewallPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIpOverridesAsync(ListIpOverridesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listKeysAsync(ListKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRelatedAccountGroupMembershipsAsync(ListRelatedAccountGroupMembershipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRelatedAccountGroupsAsync(ListRelatedAccountGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface migrateKeyAsync(MigrateKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeIpOverrideAsync(RemoveIpOverrideRequest $request, array $optionalArgs = []) + * @method PromiseInterface reorderFirewallPoliciesAsync(ReorderFirewallPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface retrieveLegacySecretKeyAsync(RetrieveLegacySecretKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchRelatedAccountGroupMembershipsAsync(SearchRelatedAccountGroupMembershipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFirewallPolicyAsync(UpdateFirewallPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateKeyAsync(UpdateKeyRequest $request, array $optionalArgs = []) + */ +final class RecaptchaEnterpriseServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recaptchaenterprise.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/recaptcha_enterprise_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a assessment + * resource. + * + * @param string $project + * @param string $assessment + * + * @return string The formatted assessment resource. + */ + public static function assessmentName(string $project, string $assessment): string + { + return self::getPathTemplate('assessment')->render([ + 'project' => $project, + 'assessment' => $assessment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * firewall_policy resource. + * + * @param string $project + * @param string $firewallpolicy + * + * @return string The formatted firewall_policy resource. + */ + public static function firewallPolicyName(string $project, string $firewallpolicy): string + { + return self::getPathTemplate('firewallPolicy')->render([ + 'project' => $project, + 'firewallpolicy' => $firewallpolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a key + * resource. + * + * @param string $project + * @param string $key + * + * @return string The formatted key resource. + */ + public static function keyName(string $project, string $key): string + { + return self::getPathTemplate('key')->render([ + 'project' => $project, + 'key' => $key, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a metrics + * resource. + * + * @param string $project + * @param string $key + * + * @return string The formatted metrics resource. + */ + public static function metricsName(string $project, string $key): string + { + return self::getPathTemplate('metrics')->render([ + 'project' => $project, + 'key' => $key, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * related_account_group resource. + * + * @param string $project + * @param string $relatedaccountgroup + * + * @return string The formatted related_account_group resource. + */ + public static function relatedAccountGroupName(string $project, string $relatedaccountgroup): string + { + return self::getPathTemplate('relatedAccountGroup')->render([ + 'project' => $project, + 'relatedaccountgroup' => $relatedaccountgroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - assessment: projects/{project}/assessments/{assessment} + * - firewallPolicy: projects/{project}/firewallpolicies/{firewallpolicy} + * - key: projects/{project}/keys/{key} + * - metrics: projects/{project}/keys/{key}/metrics + * - project: projects/{project} + * - relatedAccountGroup: projects/{project}/relatedaccountgroups/{relatedaccountgroup} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'recaptchaenterprise.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds an IP override to a key. The following restrictions hold: + * * The maximum number of IP overrides per key is 100. + * * For any conflict (such as IP already exists or IP part of an existing + * IP range), an error is returned. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::addIpOverrideAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php + * + * @param AddIpOverrideRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AddIpOverrideResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function addIpOverride(AddIpOverrideRequest $request, array $callOptions = []): AddIpOverrideResponse + { + return $this->startApiCall('AddIpOverride', $request, $callOptions)->wait(); + } + + /** + * Annotates a previously created Assessment to provide additional information + * on whether the event turned out to be authentic or fraudulent. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::annotateAssessmentAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php + * + * @param AnnotateAssessmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AnnotateAssessmentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function annotateAssessment(AnnotateAssessmentRequest $request, array $callOptions = []): AnnotateAssessmentResponse + { + return $this->startApiCall('AnnotateAssessment', $request, $callOptions)->wait(); + } + + /** + * Creates an Assessment of the likelihood an event is legitimate. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::createAssessmentAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php + * + * @param CreateAssessmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Assessment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAssessment(CreateAssessmentRequest $request, array $callOptions = []): Assessment + { + return $this->startApiCall('CreateAssessment', $request, $callOptions)->wait(); + } + + /** + * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA + * Enterprise actions can be executed. + * A project may have a maximum of 1000 policies. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::createFirewallPolicyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php + * + * @param CreateFirewallPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FirewallPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFirewallPolicy(CreateFirewallPolicyRequest $request, array $callOptions = []): FirewallPolicy + { + return $this->startApiCall('CreateFirewallPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new reCAPTCHA Enterprise key. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::createKeyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/create_key.php + * + * @param CreateKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Key + * + * @throws ApiException Thrown if the API call fails. + */ + public function createKey(CreateKeyRequest $request, array $callOptions = []): Key + { + return $this->startApiCall('CreateKey', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified firewall policy. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::deleteFirewallPolicyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php + * + * @param DeleteFirewallPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteFirewallPolicy(DeleteFirewallPolicyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteFirewallPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified key. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::deleteKeyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php + * + * @param DeleteKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteKey(DeleteKeyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteKey', $request, $callOptions)->wait(); + } + + /** + * Returns the specified firewall policy. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::getFirewallPolicyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php + * + * @param GetFirewallPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FirewallPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFirewallPolicy(GetFirewallPolicyRequest $request, array $callOptions = []): FirewallPolicy + { + return $this->startApiCall('GetFirewallPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns the specified key. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::getKeyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/get_key.php + * + * @param GetKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Key + * + * @throws ApiException Thrown if the API call fails. + */ + public function getKey(GetKeyRequest $request, array $callOptions = []): Key + { + return $this->startApiCall('GetKey', $request, $callOptions)->wait(); + } + + /** + * Get some aggregated metrics for a Key. This data can be used to build + * dashboards. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::getMetricsAsync()} + * . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php + * + * @param GetMetricsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Metrics + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMetrics(GetMetricsRequest $request, array $callOptions = []): Metrics + { + return $this->startApiCall('GetMetrics', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all firewall policies that belong to a project. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::listFirewallPoliciesAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php + * + * @param ListFirewallPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFirewallPolicies(ListFirewallPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFirewallPolicies', $request, $callOptions); + } + + /** + * Lists all IP overrides for a key. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::listIpOverridesAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php + * + * @param ListIpOverridesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listIpOverrides(ListIpOverridesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIpOverrides', $request, $callOptions); + } + + /** + * Returns the list of all keys that belong to a project. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::listKeysAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php + * + * @param ListKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listKeys(ListKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListKeys', $request, $callOptions); + } + + /** + * Get memberships in a group of related accounts. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::listRelatedAccountGroupMembershipsAsync()} + * . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php + * + * @param ListRelatedAccountGroupMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRelatedAccountGroupMemberships(ListRelatedAccountGroupMembershipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRelatedAccountGroupMemberships', $request, $callOptions); + } + + /** + * List groups of related accounts. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::listRelatedAccountGroupsAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php + * + * @param ListRelatedAccountGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRelatedAccountGroups(ListRelatedAccountGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRelatedAccountGroups', $request, $callOptions); + } + + /** + * Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. + * Once a key is migrated, it can be used from either product. SiteVerify + * requests are billed as CreateAssessment calls. You must be + * authenticated as one of the current owners of the reCAPTCHA Key, and + * your user must have the reCAPTCHA Enterprise Admin IAM role in the + * destination project. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::migrateKeyAsync()} + * . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php + * + * @param MigrateKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Key + * + * @throws ApiException Thrown if the API call fails. + */ + public function migrateKey(MigrateKeyRequest $request, array $callOptions = []): Key + { + return $this->startApiCall('MigrateKey', $request, $callOptions)->wait(); + } + + /** + * Removes an IP override from a key. The following restrictions hold: + * * If the IP isn't found in an existing IP override, a `NOT_FOUND` error + * is returned. + * * If the IP is found in an existing IP override, but the + * override type does not match, a `NOT_FOUND` error is returned. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::removeIpOverrideAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php + * + * @param RemoveIpOverrideRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RemoveIpOverrideResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeIpOverride(RemoveIpOverrideRequest $request, array $callOptions = []): RemoveIpOverrideResponse + { + return $this->startApiCall('RemoveIpOverride', $request, $callOptions)->wait(); + } + + /** + * Reorders all firewall policies. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::reorderFirewallPoliciesAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php + * + * @param ReorderFirewallPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReorderFirewallPoliciesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reorderFirewallPolicies(ReorderFirewallPoliciesRequest $request, array $callOptions = []): ReorderFirewallPoliciesResponse + { + return $this->startApiCall('ReorderFirewallPolicies', $request, $callOptions)->wait(); + } + + /** + * Returns the secret key related to the specified public key. + * You must use the legacy secret key only in a 3rd party integration with + * legacy reCAPTCHA. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::retrieveLegacySecretKeyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php + * + * @param RetrieveLegacySecretKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RetrieveLegacySecretKeyResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function retrieveLegacySecretKey(RetrieveLegacySecretKeyRequest $request, array $callOptions = []): RetrieveLegacySecretKeyResponse + { + return $this->startApiCall('RetrieveLegacySecretKey', $request, $callOptions)->wait(); + } + + /** + * Search group memberships related to a given account. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::searchRelatedAccountGroupMembershipsAsync()} + * . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php + * + * @param SearchRelatedAccountGroupMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchRelatedAccountGroupMemberships(SearchRelatedAccountGroupMembershipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchRelatedAccountGroupMemberships', $request, $callOptions); + } + + /** + * Updates the specified firewall policy. + * + * The async variant is + * {@see RecaptchaEnterpriseServiceClient::updateFirewallPolicyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php + * + * @param UpdateFirewallPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FirewallPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFirewallPolicy(UpdateFirewallPolicyRequest $request, array $callOptions = []): FirewallPolicy + { + return $this->startApiCall('UpdateFirewallPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the specified key. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::updateKeyAsync()} . + * + * @example samples/V1/RecaptchaEnterpriseServiceClient/update_key.php + * + * @param UpdateKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Key + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateKey(UpdateKeyRequest $request, array $callOptions = []): Key + { + return $this->startApiCall('UpdateKey', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php new file mode 100644 index 000000000000..b8e7e5dc0160 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php @@ -0,0 +1,1610 @@ +keyName('[PROJECT]', '[KEY]'); + * $ipOverrideData = new IpOverrideData(); + * $response = $recaptchaEnterpriseServiceClient->addIpOverride($formattedName, $ipOverrideData); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient}. + */ +class RecaptchaEnterpriseServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recaptchaenterprise.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $assessmentNameTemplate; + + private static $firewallPolicyNameTemplate; + + private static $keyNameTemplate; + + private static $metricsNameTemplate; + + private static $projectNameTemplate; + + private static $relatedAccountGroupNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/recaptcha_enterprise_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getAssessmentNameTemplate() + { + if (self::$assessmentNameTemplate == null) { + self::$assessmentNameTemplate = new PathTemplate('projects/{project}/assessments/{assessment}'); + } + + return self::$assessmentNameTemplate; + } + + private static function getFirewallPolicyNameTemplate() + { + if (self::$firewallPolicyNameTemplate == null) { + self::$firewallPolicyNameTemplate = new PathTemplate('projects/{project}/firewallpolicies/{firewallpolicy}'); + } + + return self::$firewallPolicyNameTemplate; + } + + private static function getKeyNameTemplate() + { + if (self::$keyNameTemplate == null) { + self::$keyNameTemplate = new PathTemplate('projects/{project}/keys/{key}'); + } + + return self::$keyNameTemplate; + } + + private static function getMetricsNameTemplate() + { + if (self::$metricsNameTemplate == null) { + self::$metricsNameTemplate = new PathTemplate('projects/{project}/keys/{key}/metrics'); + } + + return self::$metricsNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getRelatedAccountGroupNameTemplate() + { + if (self::$relatedAccountGroupNameTemplate == null) { + self::$relatedAccountGroupNameTemplate = new PathTemplate('projects/{project}/relatedaccountgroups/{relatedaccountgroup}'); + } + + return self::$relatedAccountGroupNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'assessment' => self::getAssessmentNameTemplate(), + 'firewallPolicy' => self::getFirewallPolicyNameTemplate(), + 'key' => self::getKeyNameTemplate(), + 'metrics' => self::getMetricsNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'relatedAccountGroup' => self::getRelatedAccountGroupNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a assessment + * resource. + * + * @param string $project + * @param string $assessment + * + * @return string The formatted assessment resource. + */ + public static function assessmentName($project, $assessment) + { + return self::getAssessmentNameTemplate()->render([ + 'project' => $project, + 'assessment' => $assessment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * firewall_policy resource. + * + * @param string $project + * @param string $firewallpolicy + * + * @return string The formatted firewall_policy resource. + */ + public static function firewallPolicyName($project, $firewallpolicy) + { + return self::getFirewallPolicyNameTemplate()->render([ + 'project' => $project, + 'firewallpolicy' => $firewallpolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a key + * resource. + * + * @param string $project + * @param string $key + * + * @return string The formatted key resource. + */ + public static function keyName($project, $key) + { + return self::getKeyNameTemplate()->render([ + 'project' => $project, + 'key' => $key, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a metrics + * resource. + * + * @param string $project + * @param string $key + * + * @return string The formatted metrics resource. + */ + public static function metricsName($project, $key) + { + return self::getMetricsNameTemplate()->render([ + 'project' => $project, + 'key' => $key, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * related_account_group resource. + * + * @param string $project + * @param string $relatedaccountgroup + * + * @return string The formatted related_account_group resource. + */ + public static function relatedAccountGroupName($project, $relatedaccountgroup) + { + return self::getRelatedAccountGroupNameTemplate()->render([ + 'project' => $project, + 'relatedaccountgroup' => $relatedaccountgroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - assessment: projects/{project}/assessments/{assessment} + * - firewallPolicy: projects/{project}/firewallpolicies/{firewallpolicy} + * - key: projects/{project}/keys/{key} + * - metrics: projects/{project}/keys/{key}/metrics + * - project: projects/{project} + * - relatedAccountGroup: projects/{project}/relatedaccountgroups/{relatedaccountgroup} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'recaptchaenterprise.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Adds an IP override to a key. The following restrictions hold: + * * The maximum number of IP overrides per key is 100. + * * For any conflict (such as IP already exists or IP part of an existing + * IP range), an error is returned. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); + * $ipOverrideData = new IpOverrideData(); + * $response = $recaptchaEnterpriseServiceClient->addIpOverride($formattedName, $ipOverrideData); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the key to which the IP override is added, in the + * format `projects/{project}/keys/{key}`. + * @param IpOverrideData $ipOverrideData Required. IP override added to the key. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\AddIpOverrideResponse + * + * @throws ApiException if the remote call fails + */ + public function addIpOverride($name, $ipOverrideData, array $optionalArgs = []) + { + $request = new AddIpOverrideRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setIpOverrideData($ipOverrideData); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AddIpOverride', AddIpOverrideResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Annotates a previously created Assessment to provide additional information + * on whether the event turned out to be authentic or fraudulent. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->assessmentName('[PROJECT]', '[ASSESSMENT]'); + * $annotation = Annotation::ANNOTATION_UNSPECIFIED; + * $response = $recaptchaEnterpriseServiceClient->annotateAssessment($formattedName, $annotation); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the Assessment, in the format + * `projects/{project}/assessments/{assessment}`. + * @param int $annotation Optional. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. + * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Annotation} + * @param array $optionalArgs { + * Optional. + * + * @type int[] $reasons + * Optional. Reasons for the annotation that are assigned to the event. + * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Reason} + * @type string $accountId + * Optional. A stable account identifier to apply to the assessment. This is + * an alternative to setting `account_id` in `CreateAssessment`, for example + * when a stable account identifier is not yet known in the initial request. + * @type string $hashedAccountId + * Optional. A stable hashed account identifier to apply to the assessment. + * This is an alternative to setting `hashed_account_id` in + * `CreateAssessment`, for example when a stable account identifier is not yet + * known in the initial request. + * @type TransactionEvent $transactionEvent + * Optional. If the assessment is part of a payment transaction, provide + * details on payment lifecycle events that occur in the transaction. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentResponse + * + * @throws ApiException if the remote call fails + */ + public function annotateAssessment($name, $annotation, array $optionalArgs = []) + { + $request = new AnnotateAssessmentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setAnnotation($annotation); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['reasons'])) { + $request->setReasons($optionalArgs['reasons']); + } + + if (isset($optionalArgs['accountId'])) { + $request->setAccountId($optionalArgs['accountId']); + } + + if (isset($optionalArgs['hashedAccountId'])) { + $request->setHashedAccountId($optionalArgs['hashedAccountId']); + } + + if (isset($optionalArgs['transactionEvent'])) { + $request->setTransactionEvent($optionalArgs['transactionEvent']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AnnotateAssessment', AnnotateAssessmentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an Assessment of the likelihood an event is legitimate. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * $assessment = new Assessment(); + * $response = $recaptchaEnterpriseServiceClient->createAssessment($formattedParent, $assessment); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project in which the assessment is created, + * in the format `projects/{project}`. + * @param Assessment $assessment Required. The assessment details. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\Assessment + * + * @throws ApiException if the remote call fails + */ + public function createAssessment($parent, $assessment, array $optionalArgs = []) + { + $request = new CreateAssessmentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAssessment($assessment); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateAssessment', Assessment::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA + * Enterprise actions can be executed. + * A project may have a maximum of 1000 policies. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * $firewallPolicy = new FirewallPolicy(); + * $response = $recaptchaEnterpriseServiceClient->createFirewallPolicy($formattedParent, $firewallPolicy); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project this policy applies to, in the format + * `projects/{project}`. + * @param FirewallPolicy $firewallPolicy Required. Information to create the policy. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy + * + * @throws ApiException if the remote call fails + */ + public function createFirewallPolicy($parent, $firewallPolicy, array $optionalArgs = []) + { + $request = new CreateFirewallPolicyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFirewallPolicy($firewallPolicy); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateFirewallPolicy', FirewallPolicy::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new reCAPTCHA Enterprise key. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * $key = new Key(); + * $response = $recaptchaEnterpriseServiceClient->createKey($formattedParent, $key); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project in which the key is created, in the + * format `projects/{project}`. + * @param Key $key Required. Information to create a reCAPTCHA Enterprise key. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\Key + * + * @throws ApiException if the remote call fails + */ + public function createKey($parent, $key, array $optionalArgs = []) + { + $request = new CreateKeyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setKey($key); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateKey', Key::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified firewall policy. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + * $recaptchaEnterpriseServiceClient->deleteFirewallPolicy($formattedName); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteFirewallPolicy($name, array $optionalArgs = []) + { + $request = new DeleteFirewallPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteFirewallPolicy', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified key. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); + * $recaptchaEnterpriseServiceClient->deleteKey($formattedName); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the key to be deleted, in the format + * `projects/{project}/keys/{key}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteKey($name, array $optionalArgs = []) + { + $request = new DeleteKeyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteKey', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified firewall policy. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + * $response = $recaptchaEnterpriseServiceClient->getFirewallPolicy($formattedName); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy + * + * @throws ApiException if the remote call fails + */ + public function getFirewallPolicy($name, array $optionalArgs = []) + { + $request = new GetFirewallPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetFirewallPolicy', FirewallPolicy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified key. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); + * $response = $recaptchaEnterpriseServiceClient->getKey($formattedName); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the requested key, in the format + * `projects/{project}/keys/{key}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\Key + * + * @throws ApiException if the remote call fails + */ + public function getKey($name, array $optionalArgs = []) + { + $request = new GetKeyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetKey', Key::class, $optionalArgs, $request)->wait(); + } + + /** + * Get some aggregated metrics for a Key. This data can be used to build + * dashboards. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->metricsName('[PROJECT]', '[KEY]'); + * $response = $recaptchaEnterpriseServiceClient->getMetrics($formattedName); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the requested metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\Metrics + * + * @throws ApiException if the remote call fails + */ + public function getMetrics($name, array $optionalArgs = []) + { + $request = new GetMetricsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetMetrics', Metrics::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the list of all firewall policies that belong to a project. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listFirewallPolicies($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listFirewallPolicies($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listFirewallPolicies($parent, array $optionalArgs = []) + { + $request = new ListFirewallPoliciesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListFirewallPolicies', $optionalArgs, ListFirewallPoliciesResponse::class, $request); + } + + /** + * Lists all IP overrides for a key. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); + * // Iterate over pages of elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listIpOverrides($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listIpOverrides($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent key for which the IP overrides are listed, in the + * format `projects/{project}/keys/{key}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listIpOverrides($parent, array $optionalArgs = []) + { + $request = new ListIpOverridesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListIpOverrides', $optionalArgs, ListIpOverridesResponse::class, $request); + } + + /** + * Returns the list of all keys that belong to a project. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listKeys($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listKeys($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project that contains the keys that is + * listed, in the format `projects/{project}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listKeys($parent, array $optionalArgs = []) + { + $request = new ListKeysRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListKeys', $optionalArgs, ListKeysResponse::class, $request); + } + + /** + * Get memberships in a group of related accounts. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + * // Iterate over pages of elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroupMemberships($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroupMemberships($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name for the related account group in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listRelatedAccountGroupMemberships($parent, array $optionalArgs = []) + { + $request = new ListRelatedAccountGroupMembershipsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListRelatedAccountGroupMemberships', $optionalArgs, ListRelatedAccountGroupMembershipsResponse::class, $request); + } + + /** + * List groups of related accounts. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroups($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroups($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project to list related account groups from, in + * the format `projects/{project}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listRelatedAccountGroups($parent, array $optionalArgs = []) + { + $request = new ListRelatedAccountGroupsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListRelatedAccountGroups', $optionalArgs, ListRelatedAccountGroupsResponse::class, $request); + } + + /** + * Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. + * Once a key is migrated, it can be used from either product. SiteVerify + * requests are billed as CreateAssessment calls. You must be + * authenticated as one of the current owners of the reCAPTCHA Key, and + * your user must have the reCAPTCHA Enterprise Admin IAM role in the + * destination project. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); + * $response = $recaptchaEnterpriseServiceClient->migrateKey($formattedName); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the key to be migrated, in the format + * `projects/{project}/keys/{key}`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $skipBillingCheck + * Optional. If true, skips the billing check. + * A reCAPTCHA Enterprise key or migrated key behaves differently than a + * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see + * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid + * any disruption of your usage, we check that a billing account is present. + * If your usage of reCAPTCHA is under the free quota, you can safely skip the + * billing check and proceed with the migration. See + * https://cloud.google.com/recaptcha/docs/billing-information. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\Key + * + * @throws ApiException if the remote call fails + */ + public function migrateKey($name, array $optionalArgs = []) + { + $request = new MigrateKeyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['skipBillingCheck'])) { + $request->setSkipBillingCheck($optionalArgs['skipBillingCheck']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('MigrateKey', Key::class, $optionalArgs, $request)->wait(); + } + + /** + * Removes an IP override from a key. The following restrictions hold: + * * If the IP isn't found in an existing IP override, a `NOT_FOUND` error + * is returned. + * * If the IP is found in an existing IP override, but the + * override type does not match, a `NOT_FOUND` error is returned. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); + * $ipOverrideData = new IpOverrideData(); + * $response = $recaptchaEnterpriseServiceClient->removeIpOverride($formattedName, $ipOverrideData); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the key from which the IP override is removed, in the + * format `projects/{project}/keys/{key}`. + * @param IpOverrideData $ipOverrideData Required. IP override to be removed from the key. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\RemoveIpOverrideResponse + * + * @throws ApiException if the remote call fails + */ + public function removeIpOverride($name, $ipOverrideData, array $optionalArgs = []) + { + $request = new RemoveIpOverrideRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setIpOverrideData($ipOverrideData); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RemoveIpOverride', RemoveIpOverrideResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Reorders all firewall policies. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * $formattedNames = [ + * $recaptchaEnterpriseServiceClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), + * ]; + * $response = $recaptchaEnterpriseServiceClient->reorderFirewallPolicies($formattedParent, $formattedNames); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * @param string[] $names Required. A list containing all policy names, in the new order. Each name + * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\ReorderFirewallPoliciesResponse + * + * @throws ApiException if the remote call fails + */ + public function reorderFirewallPolicies($parent, $names, array $optionalArgs = []) + { + $request = new ReorderFirewallPoliciesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setNames($names); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ReorderFirewallPolicies', ReorderFirewallPoliciesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the secret key related to the specified public key. + * You must use the legacy secret key only in a 3rd party integration with + * legacy reCAPTCHA. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedKey = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); + * $response = $recaptchaEnterpriseServiceClient->retrieveLegacySecretKey($formattedKey); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $key Required. The public key name linked to the requested secret key in the + * format `projects/{project}/keys/{key}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\RetrieveLegacySecretKeyResponse + * + * @throws ApiException if the remote call fails + */ + public function retrieveLegacySecretKey($key, array $optionalArgs = []) + { + $request = new RetrieveLegacySecretKeyRequest(); + $requestParamHeaders = []; + $request->setKey($key); + $requestParamHeaders['key'] = $key; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RetrieveLegacySecretKey', RetrieveLegacySecretKeyResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Search group memberships related to a given account. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $formattedProject = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->searchRelatedAccountGroupMemberships($formattedProject); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $recaptchaEnterpriseServiceClient->searchRelatedAccountGroupMemberships($formattedProject); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param string $project Required. The name of the project to search related account group + * memberships from. Specify the project name in the following format: + * `projects/{project}`. + * @param array $optionalArgs { + * Optional. + * + * @type string $accountId + * Optional. The unique stable account identifier used to search connections. + * The identifier should correspond to an `account_id` provided in a previous + * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + * or account_id must be set, but not both. + * @type string $hashedAccountId + * Optional. Deprecated: use `account_id` instead. + * The unique stable hashed account identifier used to search connections. The + * identifier should correspond to a `hashed_account_id` provided in a + * previous `CreateAssessment` or `AnnotateAssessment` call. Either + * hashed_account_id or account_id must be set, but not both. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function searchRelatedAccountGroupMemberships($project, array $optionalArgs = []) + { + $request = new SearchRelatedAccountGroupMembershipsRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $requestParamHeaders['project'] = $project; + if (isset($optionalArgs['accountId'])) { + $request->setAccountId($optionalArgs['accountId']); + } + + if (isset($optionalArgs['hashedAccountId'])) { + $request->setHashedAccountId($optionalArgs['hashedAccountId']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('SearchRelatedAccountGroupMemberships', $optionalArgs, SearchRelatedAccountGroupMembershipsResponse::class, $request); + } + + /** + * Updates the specified firewall policy. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $firewallPolicy = new FirewallPolicy(); + * $response = $recaptchaEnterpriseServiceClient->updateFirewallPolicy($firewallPolicy); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param FirewallPolicy $firewallPolicy Required. The policy to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The mask to control which fields of the policy get updated. If + * the mask is not present, all fields are updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy + * + * @throws ApiException if the remote call fails + */ + public function updateFirewallPolicy($firewallPolicy, array $optionalArgs = []) + { + $request = new UpdateFirewallPolicyRequest(); + $requestParamHeaders = []; + $request->setFirewallPolicy($firewallPolicy); + $requestParamHeaders['firewall_policy.name'] = $firewallPolicy->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateFirewallPolicy', FirewallPolicy::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates the specified key. + * + * Sample code: + * ``` + * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); + * try { + * $key = new Key(); + * $response = $recaptchaEnterpriseServiceClient->updateKey($key); + * } finally { + * $recaptchaEnterpriseServiceClient->close(); + * } + * ``` + * + * @param Key $key Required. The key to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The mask to control which fields of the key get updated. If the + * mask is not present, all fields are updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\RecaptchaEnterprise\V1\Key + * + * @throws ApiException if the remote call fails + */ + public function updateKey($key, array $optionalArgs = []) + { + $request = new UpdateKeyRequest(); + $requestParamHeaders = []; + $request->setKey($key); + $requestParamHeaders['key.name'] = $key->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateKey', Key::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php new file mode 100644 index 000000000000..062d8e696371 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ + 'AddIpOverride' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\AddIpOverrideResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'AnnotateAssessment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateAssessment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Assessment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateFirewallPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFirewallPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetFirewallPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMetrics' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Metrics', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListFirewallPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFirewallPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListFirewallPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIpOverrides' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIpOverrides', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListIpOverridesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRelatedAccountGroupMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRelatedAccountGroupMemberships', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupMembershipsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRelatedAccountGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRelatedAccountGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'MigrateKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveIpOverride' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\RemoveIpOverrideResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ReorderFirewallPolicies' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ReorderFirewallPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RetrieveLegacySecretKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\RetrieveLegacySecretKeyResponse', + 'headerParams' => [ + [ + 'keyName' => 'key', + 'fieldAccessors' => [ + 'getKey', + ], + ], + ], + ], + 'SearchRelatedAccountGroupMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRelatedAccountGroupMemberships', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\SearchRelatedAccountGroupMembershipsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + 'UpdateFirewallPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy', + 'headerParams' => [ + [ + 'keyName' => 'firewall_policy.name', + 'fieldAccessors' => [ + 'getFirewallPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', + 'headerParams' => [ + [ + 'keyName' => 'key.name', + 'fieldAccessors' => [ + 'getKey', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'assessment' => 'projects/{project}/assessments/{assessment}', + 'firewallPolicy' => 'projects/{project}/firewallpolicies/{firewallpolicy}', + 'key' => 'projects/{project}/keys/{key}', + 'metrics' => 'projects/{project}/keys/{key}/metrics', + 'project' => 'projects/{project}', + 'relatedAccountGroup' => 'projects/{project}/relatedaccountgroups/{relatedaccountgroup}', + ], + ], + ], +]; diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php new file mode 100644 index 000000000000..43261e80848d --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php @@ -0,0 +1,284 @@ + [ + 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ + 'AddIpOverride' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/keys/*}:addIpOverride', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'AnnotateAssessment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/assessments/*}:annotate', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateAssessment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/assessments', + 'body' => 'assessment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateFirewallPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/firewallpolicies', + 'body' => 'firewall_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/keys', + 'body' => 'key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFirewallPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/firewallpolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteKey' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/keys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFirewallPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/firewallpolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/keys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMetrics' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/keys/*/metrics}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListFirewallPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/firewallpolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIpOverrides' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/keys/*}:listIpOverrides', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/keys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRelatedAccountGroupMemberships' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/relatedaccountgroups/*}/memberships', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRelatedAccountGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/relatedaccountgroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MigrateKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/keys/*}:migrate', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RemoveIpOverride' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/keys/*}:removeIpOverride', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ReorderFirewallPolicies' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/firewallpolicies:reorder', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RetrieveLegacySecretKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{key=projects/*/keys/*}:retrieveLegacySecretKey', + 'placeholders' => [ + 'key' => [ + 'getters' => [ + 'getKey', + ], + ], + ], + ], + 'SearchRelatedAccountGroupMemberships' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{project=projects/*}/relatedaccountgroupmemberships:search', + 'body' => '*', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'UpdateFirewallPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{firewall_policy.name=projects/*/firewallpolicies/*}', + 'body' => 'firewall_policy', + 'placeholders' => [ + 'firewall_policy.name' => [ + 'getters' => [ + 'getFirewallPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateKey' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{key.name=projects/*/keys/*}', + 'body' => 'key', + 'placeholders' => [ + 'key.name' => [ + 'getters' => [ + 'getKey', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php new file mode 100644 index 000000000000..b25fa206d90a --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php @@ -0,0 +1,1676 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RecaptchaEnterpriseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RecaptchaEnterpriseServiceClient($options); + } + + /** @test */ + public function addIpOverrideTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AddIpOverrideResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + $request = (new AddIpOverrideRequest()) + ->setName($formattedName) + ->setIpOverrideData($ipOverrideData); + $response = $gapicClient->addIpOverride($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/AddIpOverride', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getIpOverrideData(); + $this->assertProtobufEquals($ipOverrideData, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addIpOverrideExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + $request = (new AddIpOverrideRequest()) + ->setName($formattedName) + ->setIpOverrideData($ipOverrideData); + try { + $gapicClient->addIpOverride($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 annotateAssessmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AnnotateAssessmentResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assessmentName('[PROJECT]', '[ASSESSMENT]'); + $annotation = Annotation::ANNOTATION_UNSPECIFIED; + $request = (new AnnotateAssessmentRequest()) + ->setName($formattedName) + ->setAnnotation($annotation); + $response = $gapicClient->annotateAssessment($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/AnnotateAssessment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getAnnotation(); + $this->assertProtobufEquals($annotation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function annotateAssessmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assessmentName('[PROJECT]', '[ASSESSMENT]'); + $annotation = Annotation::ANNOTATION_UNSPECIFIED; + $request = (new AnnotateAssessmentRequest()) + ->setName($formattedName) + ->setAnnotation($annotation); + try { + $gapicClient->annotateAssessment($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 createAssessmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Assessment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $assessment = new Assessment(); + $request = (new CreateAssessmentRequest()) + ->setParent($formattedParent) + ->setAssessment($assessment); + $response = $gapicClient->createAssessment($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateAssessment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAssessment(); + $this->assertProtobufEquals($assessment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAssessmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $assessment = new Assessment(); + $request = (new CreateAssessmentRequest()) + ->setParent($formattedParent) + ->setAssessment($assessment); + try { + $gapicClient->createAssessment($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 createFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $path = 'path3433509'; + $condition = 'condition-861311717'; + $expectedResponse = new FirewallPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPath($path); + $expectedResponse->setCondition($condition); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $firewallPolicy = new FirewallPolicy(); + $request = (new CreateFirewallPolicyRequest()) + ->setParent($formattedParent) + ->setFirewallPolicy($firewallPolicy); + $response = $gapicClient->createFirewallPolicy($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFirewallPolicy(); + $this->assertProtobufEquals($firewallPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $firewallPolicy = new FirewallPolicy(); + $request = (new CreateFirewallPolicyRequest()) + ->setParent($formattedParent) + ->setFirewallPolicy($firewallPolicy); + try { + $gapicClient->createFirewallPolicy($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 createKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + $request = (new CreateKeyRequest()) + ->setParent($formattedParent) + ->setKey($key); + $response = $gapicClient->createKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getKey(); + $this->assertProtobufEquals($key, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + $request = (new CreateKeyRequest()) + ->setParent($formattedParent) + ->setKey($key); + try { + $gapicClient->createKey($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 deleteFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + $request = (new DeleteFirewallPolicyRequest()) + ->setName($formattedName); + $gapicClient->deleteFirewallPolicy($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + $request = (new DeleteFirewallPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteFirewallPolicy($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 deleteKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $request = (new DeleteKeyRequest()) + ->setName($formattedName); + $gapicClient->deleteKey($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $request = (new DeleteKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteKey($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 getFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $path = 'path3433509'; + $condition = 'condition-861311717'; + $expectedResponse = new FirewallPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPath($path); + $expectedResponse->setCondition($condition); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + $request = (new GetFirewallPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getFirewallPolicy($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + $request = (new GetFirewallPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getFirewallPolicy($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 getKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $request = (new GetKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $request = (new GetKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getKey($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 getMetricsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Metrics(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->metricsName('[PROJECT]', '[KEY]'); + $request = (new GetMetricsRequest()) + ->setName($formattedName); + $response = $gapicClient->getMetrics($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetMetrics', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMetricsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->metricsName('[PROJECT]', '[KEY]'); + $request = (new GetMetricsRequest()) + ->setName($formattedName); + try { + $gapicClient->getMetrics($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 listFirewallPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $firewallPoliciesElement = new FirewallPolicy(); + $firewallPolicies = [ + $firewallPoliciesElement, + ]; + $expectedResponse = new ListFirewallPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFirewallPolicies($firewallPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListFirewallPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFirewallPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFirewallPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListFirewallPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFirewallPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListFirewallPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFirewallPolicies($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 listIpOverridesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $ipOverridesElement = new IpOverrideData(); + $ipOverrides = [ + $ipOverridesElement, + ]; + $expectedResponse = new ListIpOverridesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIpOverrides($ipOverrides); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $request = (new ListIpOverridesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIpOverrides($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIpOverrides()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListIpOverrides', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIpOverridesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $request = (new ListIpOverridesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIpOverrides($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 listKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $keysElement = new Key(); + $keys = [ + $keysElement, + ]; + $expectedResponse = new ListKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setKeys($keys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListKeysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListKeysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listKeys($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 listRelatedAccountGroupMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); + $relatedAccountGroupMemberships = [ + $relatedAccountGroupMembershipsElement, + ]; + $expectedResponse = new ListRelatedAccountGroupMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $request = (new ListRelatedAccountGroupMembershipsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRelatedAccountGroupMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroupMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRelatedAccountGroupMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $request = (new ListRelatedAccountGroupMembershipsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRelatedAccountGroupMemberships($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 listRelatedAccountGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $relatedAccountGroupsElement = new RelatedAccountGroup(); + $relatedAccountGroups = [ + $relatedAccountGroupsElement, + ]; + $expectedResponse = new ListRelatedAccountGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRelatedAccountGroups($relatedAccountGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListRelatedAccountGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRelatedAccountGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRelatedAccountGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRelatedAccountGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListRelatedAccountGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRelatedAccountGroups($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 migrateKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $request = (new MigrateKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->migrateKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/MigrateKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function migrateKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $request = (new MigrateKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->migrateKey($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 removeIpOverrideTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RemoveIpOverrideResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + $request = (new RemoveIpOverrideRequest()) + ->setName($formattedName) + ->setIpOverrideData($ipOverrideData); + $response = $gapicClient->removeIpOverride($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/RemoveIpOverride', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getIpOverrideData(); + $this->assertProtobufEquals($ipOverrideData, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeIpOverrideExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + $request = (new RemoveIpOverrideRequest()) + ->setName($formattedName) + ->setIpOverrideData($ipOverrideData); + try { + $gapicClient->removeIpOverride($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 reorderFirewallPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReorderFirewallPoliciesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $formattedNames = [ + $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), + ]; + $request = (new ReorderFirewallPoliciesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->reorderFirewallPolicies($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/ReorderFirewallPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reorderFirewallPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $formattedNames = [ + $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), + ]; + $request = (new ReorderFirewallPoliciesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->reorderFirewallPolicies($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 retrieveLegacySecretKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $legacySecretKey = 'legacySecretKey-1937138042'; + $expectedResponse = new RetrieveLegacySecretKeyResponse(); + $expectedResponse->setLegacySecretKey($legacySecretKey); + $transport->addResponse($expectedResponse); + // Mock request + $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $request = (new RetrieveLegacySecretKeyRequest()) + ->setKey($formattedKey); + $response = $gapicClient->retrieveLegacySecretKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/RetrieveLegacySecretKey', $actualFuncCall); + $actualValue = $actualRequestObject->getKey(); + $this->assertProtobufEquals($formattedKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveLegacySecretKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $request = (new RetrieveLegacySecretKeyRequest()) + ->setKey($formattedKey); + try { + $gapicClient->retrieveLegacySecretKey($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 searchRelatedAccountGroupMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); + $relatedAccountGroupMemberships = [ + $relatedAccountGroupMembershipsElement, + ]; + $expectedResponse = new SearchRelatedAccountGroupMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProject = $gapicClient->projectName('[PROJECT]'); + $request = (new SearchRelatedAccountGroupMembershipsRequest()) + ->setProject($formattedProject); + $response = $gapicClient->searchRelatedAccountGroupMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/SearchRelatedAccountGroupMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($formattedProject, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchRelatedAccountGroupMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProject = $gapicClient->projectName('[PROJECT]'); + $request = (new SearchRelatedAccountGroupMembershipsRequest()) + ->setProject($formattedProject); + try { + $gapicClient->searchRelatedAccountGroupMemberships($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 updateFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $path = 'path3433509'; + $condition = 'condition-861311717'; + $expectedResponse = new FirewallPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPath($path); + $expectedResponse->setCondition($condition); + $transport->addResponse($expectedResponse); + // Mock request + $firewallPolicy = new FirewallPolicy(); + $request = (new UpdateFirewallPolicyRequest()) + ->setFirewallPolicy($firewallPolicy); + $response = $gapicClient->updateFirewallPolicy($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getFirewallPolicy(); + $this->assertProtobufEquals($firewallPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $firewallPolicy = new FirewallPolicy(); + $request = (new UpdateFirewallPolicyRequest()) + ->setFirewallPolicy($firewallPolicy); + try { + $gapicClient->updateFirewallPolicy($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 updateKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + $request = (new UpdateKeyRequest()) + ->setKey($key); + $response = $gapicClient->updateKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateKey', $actualFuncCall); + $actualValue = $actualRequestObject->getKey(); + $this->assertProtobufEquals($key, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + $request = (new UpdateKeyRequest()) + ->setKey($key); + try { + $gapicClient->updateKey($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 addIpOverrideAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AddIpOverrideResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + $request = (new AddIpOverrideRequest()) + ->setName($formattedName) + ->setIpOverrideData($ipOverrideData); + $response = $gapicClient->addIpOverrideAsync($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/AddIpOverride', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getIpOverrideData(); + $this->assertProtobufEquals($ipOverrideData, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php new file mode 100644 index 000000000000..0d04fa39208b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php @@ -0,0 +1,1517 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RecaptchaEnterpriseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RecaptchaEnterpriseServiceClient($options); + } + + /** @test */ + public function addIpOverrideTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AddIpOverrideResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + $response = $gapicClient->addIpOverride($formattedName, $ipOverrideData); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/AddIpOverride', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getIpOverrideData(); + $this->assertProtobufEquals($ipOverrideData, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addIpOverrideExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + try { + $gapicClient->addIpOverride($formattedName, $ipOverrideData); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function annotateAssessmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AnnotateAssessmentResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assessmentName('[PROJECT]', '[ASSESSMENT]'); + $annotation = Annotation::ANNOTATION_UNSPECIFIED; + $response = $gapicClient->annotateAssessment($formattedName, $annotation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/AnnotateAssessment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getAnnotation(); + $this->assertProtobufEquals($annotation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function annotateAssessmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assessmentName('[PROJECT]', '[ASSESSMENT]'); + $annotation = Annotation::ANNOTATION_UNSPECIFIED; + try { + $gapicClient->annotateAssessment($formattedName, $annotation); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAssessmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Assessment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $assessment = new Assessment(); + $response = $gapicClient->createAssessment($formattedParent, $assessment); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateAssessment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAssessment(); + $this->assertProtobufEquals($assessment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAssessmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $assessment = new Assessment(); + try { + $gapicClient->createAssessment($formattedParent, $assessment); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $path = 'path3433509'; + $condition = 'condition-861311717'; + $expectedResponse = new FirewallPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPath($path); + $expectedResponse->setCondition($condition); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $firewallPolicy = new FirewallPolicy(); + $response = $gapicClient->createFirewallPolicy($formattedParent, $firewallPolicy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFirewallPolicy(); + $this->assertProtobufEquals($firewallPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $firewallPolicy = new FirewallPolicy(); + try { + $gapicClient->createFirewallPolicy($formattedParent, $firewallPolicy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + $response = $gapicClient->createKey($formattedParent, $key); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getKey(); + $this->assertProtobufEquals($key, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + try { + $gapicClient->createKey($formattedParent, $key); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + $gapicClient->deleteFirewallPolicy($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + try { + $gapicClient->deleteFirewallPolicy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $gapicClient->deleteKey($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + try { + $gapicClient->deleteKey($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $path = 'path3433509'; + $condition = 'condition-861311717'; + $expectedResponse = new FirewallPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPath($path); + $expectedResponse->setCondition($condition); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + $response = $gapicClient->getFirewallPolicy($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); + try { + $gapicClient->getFirewallPolicy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $response = $gapicClient->getKey($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + try { + $gapicClient->getKey($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMetricsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Metrics(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->metricsName('[PROJECT]', '[KEY]'); + $response = $gapicClient->getMetrics($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetMetrics', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMetricsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->metricsName('[PROJECT]', '[KEY]'); + try { + $gapicClient->getMetrics($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFirewallPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $firewallPoliciesElement = new FirewallPolicy(); + $firewallPolicies = [ + $firewallPoliciesElement, + ]; + $expectedResponse = new ListFirewallPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFirewallPolicies($firewallPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listFirewallPolicies($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFirewallPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListFirewallPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFirewallPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + try { + $gapicClient->listFirewallPolicies($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIpOverridesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $ipOverridesElement = new IpOverrideData(); + $ipOverrides = [ + $ipOverridesElement, + ]; + $expectedResponse = new ListIpOverridesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIpOverrides($ipOverrides); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $response = $gapicClient->listIpOverrides($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIpOverrides()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListIpOverrides', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIpOverridesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + try { + $gapicClient->listIpOverrides($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $keysElement = new Key(); + $keys = [ + $keysElement, + ]; + $expectedResponse = new ListKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setKeys($keys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listKeys($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + try { + $gapicClient->listKeys($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRelatedAccountGroupMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); + $relatedAccountGroupMemberships = [ + $relatedAccountGroupMembershipsElement, + ]; + $expectedResponse = new ListRelatedAccountGroupMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $response = $gapicClient->listRelatedAccountGroupMemberships($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroupMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRelatedAccountGroupMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + try { + $gapicClient->listRelatedAccountGroupMemberships($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRelatedAccountGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $relatedAccountGroupsElement = new RelatedAccountGroup(); + $relatedAccountGroups = [ + $relatedAccountGroupsElement, + ]; + $expectedResponse = new ListRelatedAccountGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRelatedAccountGroups($relatedAccountGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listRelatedAccountGroups($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRelatedAccountGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRelatedAccountGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + try { + $gapicClient->listRelatedAccountGroups($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function migrateKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $response = $gapicClient->migrateKey($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/MigrateKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function migrateKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + try { + $gapicClient->migrateKey($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeIpOverrideTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RemoveIpOverrideResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + $response = $gapicClient->removeIpOverride($formattedName, $ipOverrideData); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/RemoveIpOverride', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getIpOverrideData(); + $this->assertProtobufEquals($ipOverrideData, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeIpOverrideExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); + $ipOverrideData = new IpOverrideData(); + $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; + $ipOverrideData->setIp($ipOverrideDataIp); + $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; + $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); + try { + $gapicClient->removeIpOverride($formattedName, $ipOverrideData); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reorderFirewallPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReorderFirewallPoliciesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $formattedNames = [ + $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), + ]; + $response = $gapicClient->reorderFirewallPolicies($formattedParent, $formattedNames); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ReorderFirewallPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reorderFirewallPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $formattedNames = [ + $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), + ]; + try { + $gapicClient->reorderFirewallPolicies($formattedParent, $formattedNames); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveLegacySecretKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $legacySecretKey = 'legacySecretKey-1937138042'; + $expectedResponse = new RetrieveLegacySecretKeyResponse(); + $expectedResponse->setLegacySecretKey($legacySecretKey); + $transport->addResponse($expectedResponse); + // Mock request + $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); + $response = $gapicClient->retrieveLegacySecretKey($formattedKey); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/RetrieveLegacySecretKey', $actualFuncCall); + $actualValue = $actualRequestObject->getKey(); + $this->assertProtobufEquals($formattedKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveLegacySecretKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); + try { + $gapicClient->retrieveLegacySecretKey($formattedKey); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchRelatedAccountGroupMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); + $relatedAccountGroupMemberships = [ + $relatedAccountGroupMembershipsElement, + ]; + $expectedResponse = new SearchRelatedAccountGroupMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProject = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->searchRelatedAccountGroupMemberships($formattedProject); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/SearchRelatedAccountGroupMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($formattedProject, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchRelatedAccountGroupMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProject = $gapicClient->projectName('[PROJECT]'); + try { + $gapicClient->searchRelatedAccountGroupMemberships($formattedProject); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFirewallPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $path = 'path3433509'; + $condition = 'condition-861311717'; + $expectedResponse = new FirewallPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPath($path); + $expectedResponse->setCondition($condition); + $transport->addResponse($expectedResponse); + // Mock request + $firewallPolicy = new FirewallPolicy(); + $response = $gapicClient->updateFirewallPolicy($firewallPolicy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateFirewallPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getFirewallPolicy(); + $this->assertProtobufEquals($firewallPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFirewallPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $firewallPolicy = new FirewallPolicy(); + try { + $gapicClient->updateFirewallPolicy($firewallPolicy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Key(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + $response = $gapicClient->updateKey($key); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateKey', $actualFuncCall); + $actualValue = $actualRequestObject->getKey(); + $this->assertProtobufEquals($key, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); + try { + $gapicClient->updateKey($key); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} From 2ddd133b5ca2fabc5ea0641abdce9e1773ba4535 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 28 Nov 2024 11:04:18 +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 --- .../src/V1/RemoveIpOverrideRequest.php | 2 +- RecaptchaEnterprise/src/V1/RiskAnalysis.php | 12 +- .../src/V1/RiskAnalysis/Challenge.php | 2 +- .../V1/Recaptchaenterprise.php | Bin 24700 -> 0 bytes .../V1/AccountDefenderAssessment.php | 67 - .../AccountDefenderLabel.php | 82 - .../V1/AccountVerificationInfo.php | 182 -- .../V1/AccountVerificationInfo/Result.php | 123 -- .../V1/AddIpOverrideRequest.php | 132 -- .../V1/AddIpOverrideResponse.php | 33 - .../V1/AndroidKeySettings.php | 147 -- .../V1/AnnotateAssessmentRequest.php | 303 --- .../AnnotateAssessmentRequest/Annotation.php | 82 - .../V1/AnnotateAssessmentRequest/Reason.php | 165 -- .../V1/AnnotateAssessmentResponse.php | 33 - .../V1/AppleDeveloperId.php | 147 -- .../RecaptchaEnterprise/V1/Assessment.php | 599 ------ .../V1/AssessmentEnvironment.php | 126 -- .../V1/ChallengeMetrics.php | 185 -- .../V1/CreateAssessmentRequest.php | 132 -- .../V1/CreateFirewallPolicyRequest.php | 132 -- .../V1/CreateKeyRequest.php | 132 -- .../V1/DeleteFirewallPolicyRequest.php | 86 - .../V1/DeleteKeyRequest.php | 86 - .../V1/EndpointVerificationInfo.php | 197 -- .../Cloud/RecaptchaEnterprise/V1/Event.php | 640 ------- .../V1/Event/FraudPrevention.php | 70 - .../V1/ExpressKeySettings.php | 33 - .../RecaptchaEnterprise/V1/FirewallAction.php | 259 --- .../V1/FirewallAction/AllowAction.php | 36 - .../V1/FirewallAction/BlockAction.php | 37 - .../IncludeRecaptchaScriptAction.php | 40 - .../V1/FirewallAction/RedirectAction.php | 37 - .../V1/FirewallAction/SetHeaderAction.php | 106 -- .../V1/FirewallAction/SubstituteAction.php | 75 - .../RecaptchaEnterprise/V1/FirewallPolicy.php | 280 --- .../V1/FirewallPolicyAssessment.php | 133 -- .../V1/FraudPreventionAssessment.php | 215 --- .../BehavioralTrustVerdict.php | 78 - .../CardTestingVerdict.php | 75 - .../StolenInstrumentVerdict.php | 75 - .../RecaptchaEnterprise/V1/FraudSignals.php | 125 -- .../V1/FraudSignals/CardSignals.php | 70 - .../V1/FraudSignals/CardSignals/CardLabel.php | 74 - .../V1/FraudSignals/UserSignals.php | 116 -- .../V1/GetFirewallPolicyRequest.php | 86 - .../RecaptchaEnterprise/V1/GetKeyRequest.php | 86 - .../V1/GetMetricsRequest.php | 86 - .../RecaptchaEnterprise/V1/IOSKeySettings.php | 165 -- .../RecaptchaEnterprise/V1/IpOverrideData.php | 125 -- .../V1/IpOverrideData/OverrideType.php | 58 - .../Cloud/RecaptchaEnterprise/V1/Key.php | 417 ---- .../V1/ListFirewallPoliciesRequest.php | 162 -- .../V1/ListFirewallPoliciesResponse.php | 105 -- .../V1/ListIpOverridesRequest.php | 170 -- .../V1/ListIpOverridesResponse.php | 105 -- .../V1/ListKeysRequest.php | 162 -- .../V1/ListKeysResponse.php | 105 -- ...tRelatedAccountGroupMembershipsRequest.php | 178 -- ...RelatedAccountGroupMembershipsResponse.php | 105 -- .../V1/ListRelatedAccountGroupsRequest.php | 178 -- .../V1/ListRelatedAccountGroupsResponse.php | 105 -- .../Cloud/RecaptchaEnterprise/V1/Metrics.php | 195 -- .../V1/MigrateKeyRequest.php | 133 -- .../V1/PhoneFraudAssessment.php | 77 - .../V1/PrivatePasswordLeakVerification.php | 201 -- .../V1/RelatedAccountGroup.php | 75 - .../V1/RelatedAccountGroupMembership.php | 164 -- .../V1/RemoveIpOverrideRequest.php | 132 -- .../V1/RemoveIpOverrideResponse.php | 33 - .../V1/ReorderFirewallPoliciesRequest.php | 128 -- .../V1/ReorderFirewallPoliciesResponse.php | 33 - .../V1/RetrieveLegacySecretKeyRequest.php | 86 - .../V1/RetrieveLegacySecretKeyResponse.php | 80 - .../RecaptchaEnterprise/V1/RiskAnalysis.php | 185 -- .../V1/RiskAnalysis/Challenge.php | 72 - .../V1/RiskAnalysis/ClassificationReason.php | 101 - .../V1/ScoreDistribution.php | 75 - .../RecaptchaEnterprise/V1/ScoreMetrics.php | 115 -- ...hRelatedAccountGroupMembershipsRequest.php | 294 --- ...RelatedAccountGroupMembershipsResponse.php | 105 -- .../V1/SmsTollFraudVerdict.php | 105 -- .../SmsTollFraudReason.php | 57 - .../RecaptchaEnterprise/V1/TestingOptions.php | 113 -- .../V1/TestingOptions/TestingChallenge.php | 68 - .../V1/TokenProperties.php | 309 --- .../V1/TokenProperties/InvalidReason.php | 93 - .../V1/TransactionData.php | 581 ------ .../V1/TransactionData/Address.php | 256 --- .../V1/TransactionData/GatewayInfo.php | 184 -- .../V1/TransactionData/Item.php | 180 -- .../V1/TransactionData/User.php | 256 --- .../V1/TransactionEvent.php | 199 -- .../TransactionEvent/TransactionEventType.php | 214 --- .../V1/UpdateFirewallPolicyRequest.php | 141 -- .../V1/UpdateKeyRequest.php | 141 -- .../Cloud/RecaptchaEnterprise/V1/UserId.php | 147 -- .../Cloud/RecaptchaEnterprise/V1/UserInfo.php | 169 -- .../RecaptchaEnterprise/V1/WafSettings.php | 102 - .../V1/WafSettings/WafFeature.php | 81 - .../V1/WafSettings/WafService.php | 78 - .../RecaptchaEnterprise/V1/WebKeySettings.php | 227 --- .../ChallengeSecurityPreference.php | 72 - .../V1/WebKeySettings/IntegrationType.php | 76 - .../add_ip_override.php | 94 - .../annotate_assessment.php | 79 - .../create_assessment.php | 74 - .../create_firewall_policy.php | 76 - .../create_key.php | 77 - .../delete_firewall_policy.php | 73 - .../delete_key.php | 70 - .../get_firewall_policy.php | 75 - .../get_key.php | 72 - .../get_metrics.php | 73 - .../list_firewall_policies.php | 77 - .../list_ip_overrides.php | 77 - .../list_keys.php | 77 - ...list_related_account_group_memberships.php | 80 - .../list_related_account_groups.php | 77 - .../migrate_key.php | 77 - .../remove_ip_override.php | 95 - .../reorder_firewall_policies.php | 83 - .../retrieve_legacy_secret_key.php | 74 - ...arch_related_account_group_memberships.php | 78 - .../update_firewall_policy.php | 59 - .../update_key.php | 72 - .../RecaptchaEnterpriseServiceClient.php | 955 ---------- .../RecaptchaEnterpriseServiceGapicClient.php | 1610 ---------------- .../V1/RecaptchaEnterpriseServiceClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 128 -- ...tcha_enterprise_service_client_config.json | 142 -- ...a_enterprise_service_descriptor_config.php | 350 ---- ..._enterprise_service_rest_client_config.php | 284 --- .../RecaptchaEnterpriseServiceClientTest.php | 1676 ----------------- .../RecaptchaEnterpriseServiceClientTest.php | 1517 --------------- 135 files changed, 10 insertions(+), 22667 deletions(-) delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/GPBMetadata/Google/Cloud/Recaptchaenterprise/V1/Recaptchaenterprise.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_client_config.json delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_descriptor_config.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php delete mode 100644 owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php diff --git a/RecaptchaEnterprise/src/V1/RemoveIpOverrideRequest.php b/RecaptchaEnterprise/src/V1/RemoveIpOverrideRequest.php index c8a7dc776a8e..3123864f33a0 100644 --- a/RecaptchaEnterprise/src/V1/RemoveIpOverrideRequest.php +++ b/RecaptchaEnterprise/src/V1/RemoveIpOverrideRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The removeIpOverride request message. + * The RemoveIpOverride request message. * * Generated from protobuf message google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest */ diff --git a/RecaptchaEnterprise/src/V1/RiskAnalysis.php b/RecaptchaEnterprise/src/V1/RiskAnalysis.php index 378bf2563756..fb934cc88e41 100644 --- a/RecaptchaEnterprise/src/V1/RiskAnalysis.php +++ b/RecaptchaEnterprise/src/V1/RiskAnalysis.php @@ -37,7 +37,8 @@ class RiskAnalysis extends \Google\Protobuf\Internal\Message */ private $extended_verdict_reasons; /** - * Output only. Challenge information for SCORE_AND_CHALLENGE keys + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys * * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -59,7 +60,8 @@ class RiskAnalysis extends \Google\Protobuf\Internal\Message * Output only. Extended verdict reasons to be used for experimentation only. * The set of possible reasons is subject to change. * @type int $challenge - * Output only. Challenge information for SCORE_AND_CHALLENGE keys + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys * } */ public function __construct($data = NULL) { @@ -152,7 +154,8 @@ public function setExtendedVerdictReasons($var) } /** - * Output only. Challenge information for SCORE_AND_CHALLENGE keys + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys * * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -163,7 +166,8 @@ public function getChallenge() } /** - * Output only. Challenge information for SCORE_AND_CHALLENGE keys + * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE + * keys * * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var diff --git a/RecaptchaEnterprise/src/V1/RiskAnalysis/Challenge.php b/RecaptchaEnterprise/src/V1/RiskAnalysis/Challenge.php index 52ab37b3ff85..d61a1944dd0c 100644 --- a/RecaptchaEnterprise/src/V1/RiskAnalysis/Challenge.php +++ b/RecaptchaEnterprise/src/V1/RiskAnalysis/Challenge.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * Challenge information for SCORE_AND_CHALLENGE keys + * Challenge information for SCORE_AND_CHALLENGE and INVISIBLE keys * * Protobuf type google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge */ diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/GPBMetadata/Google/Cloud/Recaptchaenterprise/V1/Recaptchaenterprise.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/GPBMetadata/Google/Cloud/Recaptchaenterprise/V1/Recaptchaenterprise.php deleted file mode 100644 index 0577623efb24959f2671829c3bfaea1d19557ea5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24700 zcmd5^TWllOc{WK&D;;Vj?pWT{YJH){YkMv4Qdw^7IP@(;ijtV6NSYU|*H$v6$dSY> zMKT;xYt`L8qy^HV1&StUfxfgwkS1-@qCnFdnwR#WKoPVJ&^9f)MNv1sp?)g**oUIu zf6kd3Ig)3!euy8|;+Z-B`Okm;`~RPL?akhPk3AD#H#$bYJ}{c`oul|*--!46-9fj} zZO32ro9~fq@-Z0|prSzsTs5k3_`t~{px}71Q+vRbf z+gsOPWvtPzn`YeSF?*lI@n3Ja({455=Ab^n|1P&oz13+ATJ?78N3rAAif|Uyl#^L&Lp#Jl;13!+z&gjyD0gXaBYBLqx6D z+SWRqE>WS|F;gjLPY#IVCT7|#9OZ+}S!)^XX4=@VAGW&vQ%ucucDoNYt!zkc47@k{ z$Uv~{L2qyrd_j9E-{)rCymN}V)fU)(P(SDepIh!VwktTq;W0;~>?eF=KXG_{>4IFN-fKZg5H|_YUwX>*V3$}% z-;q2cU$`{(LJOQBA6|4l?91aHna4E@#B#-;1C|dhePursOCR7E z?HYTL6VKYgLA_JogSHi$1If$;H1G;o?h8g^plmP(jVB>5h5;y=T#+xIcnS#zp>zZ* zt6!O9v1-5GG3#8KlH&-&)|5@B|jSo{3xiz=s*<^Y2}deD4PO_%x;I{ zKO+VeHhEZY4~@kL_7oChH*9P`|HTQu*(D1b>u?gbAn{4+A4k}N-`dJ^Os$r+LPg6| zbH#$5-O3iKdi8cGtJeyZQZ|!Y%Vk$%k0=W)wwWzwHZ(leN~LmfD;o#&YBrP46|%8O5MsWh-QFZT zGFquxD`#U<$|ZJTWYC^*Mqz9!qZKmQd~8}d&lDh8UeBhr%uPL4c&nBx-;T`?{;qK? zpDkBojNV==YqeD!792ax2=t=L9AnPgv03GDw&?uE#!BUE1qc$7v9lvwnDJIETdBt8U1QdcV}!qWFLuuL+=8R1KXHa#l$Od@f+omWkn-~qm!B1O z%}?!&h>yek$_^yRwuPJn=aM;#sZP>kiDMD7p1`;Y#(kHa5gcxUog-J~lG%q`pv>h( z0Kb3@G#cF@q_ovsJi~Pfm#Zh)x&6AiZ!~q+bCQ}_F|o$Z4IF{jxu7pja;bVL5PqX# zB?Rur8FQQqWr>~F3g9u$Un7zQUdw0KbJg6YRwbFjZ_bmoJaJc8S!A)2R;k=7mRI#m zv0Tn(sPRuo7txYdf5$z)4aD3aOHCsGPlg&0{fzLBk!bCqf?Q{ek5%KHJ;xb_~5UJlHY%LiJ;OiJk2W1E~+XcZ?3#|J)`-lsDOV`1b?-(6x$A zwm6tAh@=^tHYBF%KTfadXF%Uz^J|+NFt7-gAh3EtzGZz4PnsrMz<+! zo3wXrw$z53FuFU?Y}g)fsh&$_0^xAXrV?ciiZF?QA*P2W1ty>!ISn)E@M1{)b1pfw zppcwOEngjx99XYP4J=)$=(S3=tV7`oI~gKFl`WTxW$^$a?>r1EmswmqtmLX$y;w*W zweo7Nuns$wDQ=eXSx8nyd5T>UZ$Z>^r5qVTf}`d0#aj@e3FQU$?C1+x8i?rm+-9z- zXW!n?Y88^UNe7)w84{EMH|Gk~Y`LK2VN_N2q=1vb>qQuH{jC~wlncNa2N|(PVIlSO zZ6SBi4^V9a2wqstWvcpSt^!S#*@(@ke-UC&mHMqi9BBy-+TCuynK$Zp+?<95ly?|*o5e}%sVYQyn8=K|}t_E80BN$$6aF;FZw))21db_Rny2!>Hx%bET za>11CngmngP)4^0LhknK!zS@Rg)nf&+zUk?fRJkhr(}Z}T?u?ERx(?A;6QWnEQcM8 zZ#nFWm?+NW^X$B^i~=Z*#yb324)@c+&Vr092R@3f&dxh9b)$3G>UTR7m@dw7_^Ckf z9jI9c0zcu@dmn1U2lc{Vgpg7|Yp%R6|GKy0V2M%Z$GzpK^TSNK;$QWbC)p%dCTaJRlI+#@$j&p6X#Eb@i=jYX0sISI?`8+B+Cb1@2sMviVjKQ4_1#ogS4 zTO@{)2$42*1q+mum3$shn>v$MF<0y|%Vq?H;VLf9W3g!RS|IML!5ET%DZt!jF(E6C zs4t!aw7Fz3Ugj*5;KJfaIR~v4*!;-25@(N#$Qhw9`bkHD)!EZUMuxaT zK75zO?1z?zFHBT0Q#eA31X7eF3F27aVe>n!cAFNqU{iD(O@0ip^K61RkBe0_8BC>) zB1=ptFnx>792k8RIXVN<{uD1fEXYkZ30-wyLMfjfTn-QfhVQc3Jy`m?^&?a~AZ)_U zekPExjqZD00J7z8>FXhOMxGo3hZ*EwT0KhZx>*(a$2!EYqko{1+ua7rFM}gDkH*=f z_2vPp5+(#=&^k19BueYtdy|T5kwyE)9@%ux!^E%7lU^4|*tU2=+$f$beJ#W$=*$q5 zx-%xu8;H=O@UXe=(?NQ&9T7o4NCuB%-G&2_A!1wMFd0q01*tDDj>NYvDI<~Qp|3rU z&=>QTcG(1-8Zw7&7uzeHzM!dy7&%VJG1U)E-TT~SL-D+EcsTOhp+))}o7Zv1R@NCAEcMqyY}(TA%4_UV zej?xind9Q|KAlW7`BAywk%M-jofh#gmJ?x7H2Gp6QQ&wrIZLQN!luMem~hD)j@cHRRQpjc#9LJi~-WMA_bUl8Yo+ zbIG+pTX6$UWT=aQdYzFGD-8MRV zA{#T8eDxG)SRnY;)c*>x1wYJy)YF+f(qDGs8fj+#G#^s!Ma1NkdZ(=6`C1|SHgfxv zPsB&G6^h^y47ia;x6M6M$?MH5`ZcD6otM%`pH8Ef}cBS6wUk2EOO z^ZFKN*-W8G)d9SKEg^v}^ATbCTO|Kt5%oI}_!-^+mbeE79PS0NDOWcUMQ3xZ4j+}L z$`#yPG9BpfMpj7V1SmKEd{U}ZLnP`%NdFOnOL@%ceJF9BpR%<@M1kj9?=<^eNC+AP z?ob|$zhXPb5y~I7x~9G}>@?d3CB(@qmQ0F5lPGRE9(qLm`4Btn!CQHfE#(SZT0TeB z3m>-PY;?0wyj4I-$^9PA1IM$e<=2YkO*nsHg*?HxOSv+BM3iYZv05u-!8aI2uBd|i z7gz-~qI9`t!t%qDX1An(FAbVE* zF}7$Gi(&e)ZIMYOeI>I#wTE2U>R+h0s|4M>`qEW);TW2bVI4W4B}84y_&)sJyvok| zFUtd5Lc?|P>c2+VEI%}vPf*@wvqLyMx|Ns^W;0-Rg_0f;P=XAdCrJUw{E#ikWZZ%# z$=xU>hz@SZOC=U{t%k($1(I2~fX(`mskgg#v7a4OyM!8>6g)>k%25aHN@(lRIk^cT zArMQ*#YSDrD0QeLikjN>9Rt}K%J0u5*MoD1MHClIzKuM=6PD{8Xmc#VN674u1<>(qr68so9CrS`LrU>OW(+?Z^S0luZGZS z0OxRE+%%3p);5~w?{6BiRM9WSh+F^ zQPjc5MFP_C?$rj1If#gWN_m-0U}sj9G4R%~$b1KmIs71CAXef5hWa`7WZ4+>TS$86 zjlFu~sA3?3qTO4Ye^n4u1S<*NHF1SK7ockbFyN=2UH3qH%@e3TC^&?nv04w=L^sRG z(-smPm?ZqP75JM&4iD8Y_(j4ljr*H+ryk7;sU;R$HQI&;i-+6T?}ykWAq(Czg>?uY zOZV4XY<{GcA~$>^kcfCO6Vd`1zC=vwd4|&2$BOp@OAciCaeu6&7!}w#FD0njCo1=+ zp~dmy)nJR@e-CwR!CLo-!l$`p-C)-PNR}6#`VAa{kP7bu>kxd-T?or*_WCe#v&$|C zx$(#IVbFBiiddZpohlRvpm&BRS&|IpGeSVfC?qa zEPP5xL0Xv=8(IYC8%+jlbF=d@5@KrqL(O;)@+i;xR5!`$ue^_c@2$u!E}xNqB&|Qx z*NBUbG3HY9U1aCl+|KJJH}t%`$!)v(?I{)kYf)st(y?^YK^FwJty*ujDoITd+Mlnt$njSY|(BbxkFAQPpDbdMJ(Fr*xh z4N&wf2E#B{tayO|Ls@@y0E*^-U>Iga@zx78XGaQCoY8{SNC6|kg8(zz8T7gP8X|{A zX27}Rhzi&Vl0%0WQD7mg{7bjTZ+Y-USTq@oN;1Pz6jKRgNFlyJ+1aMLC?S0!&@tYs z?^;a3fh}EQQP)lp`EviBGbnOsvh|xYWh(qiC{_DVD+hH^l_yS=wq@>bCuzO(qwE|+ zV6fZmAK3d+|0l%ey!)r5qD9S-{Ch}gqKj5$x@JS_%2nRyv$s>gSQ3 z7OU6~kPUsJiq>lCq6?TUM!bz|axuR}eQ*z?4pa4 zr~Iu-6*WHa=O_$VPs!mD^(EKrgC13QcF`8f$s+4xJ1mBNQG?7MRq^=!0#Xb?yBxj9 zBJ*s+vMv^cmG{{b_L1OxQT9fejQ7JCRR1=38h9>Q493D9)t0c20pS&gi_QUDk0Y?+ z#NK7|BS=vMO+AR~Wzh`nbJt*oO^ONv?;FT$WHUF@#kUciBd?51Nv@K^!6ChWh~UDq zY2yee*VqdVM^v&Iv=mow>qs=MWy`!wF;-JRX(OG>Qzn3?q0(BOt`%Tmv@ciyu~`TZp!Oz258T$Z7YH1f-I1 zYiG#&Y$&vre$8(|XuYZ(;<4cHuU!xDU<7x`!pQZ43!N>z(CeX)&_p=hrdB{IDTpFQ zFy}#|>8sZ4oU9!#FlF3ssPC}Y=bJsdmV>ffxFVbHBF~4jvK=_#LB4!CM5$;xCrUv!K=Syb0admeIb`vO z86~P>*KJ72*r#Za3@nPBr?#Ozux!1Fnmz7@aL$SFxE2i; z{6?;PK&(R@;j_Ew(}yw_uM>~+QR)q~M@d6R)L%fyzb6bka#g3ELovMH@AhR&tYV!I z?#7{RM0evzKXMOc*V_jwn{k49DBkrsNcBroY|a`N^jAu3l1sRZINr3dIq_nT7e+!O z)h6JV3sYA6@LHN zUUiF2qnR8hfC8Ctpo7(XM~G9FFl@N*AkZ7`p!7Ew4#W+Ipi(sgxne`HVc!O9W1x#h zMp@Pib}3>MwlUb?-H;aOrL!#RI%oRnI;5p1VYyEr=TZ#!-8_U?dX~jTH$ZV%uRhq9 zN}QbPrBAVWIL2;VaHYucg}Eys3-`DSX>0jV`T~1w*AkyP*EOlE*hW%>@7(i8x~|dfG;vYh+uWK%PZwX>1fP=jd@#`!wC7t){aoln?Po%# z$dxId^zrsB%JBYjtUZ9j?*`RwlO<9du?{|m2 zO@pp1QRAbXLV0`SGVcaYqNJ72*bNSV{bc%k-8JKlgO< ziU}r~BhZge6b`C{9ek{I{ICj}GJ>g~rTQ&=#-MB*U^Qpj5AQaX*y1>{awk6>V&_SK zoqgEK<&6>L@_?nx2UjNd*o84vB=hEw;dD;dQXIj|tFtwJyWm)bi`$-0oTx4AOuon) zi%fnP-iW(_&%eQXtzz; z%KOfbd&^JC*N?IC$tO;HuKq1ra?0a=fwvas|wg}qh>jIPDe{&Gz`-LsAyJ#F4qPLmY=9FO91PBgR?J|ay zG7j9{5`Wo6<@Li3OE-ZYm!pWDF(Bz9O7&>SwxaLf^d#c5o*#dH5xa==K79vI> z)Uk#BPJ9xh5}Q;Joj6;w7DQX;Rt}B9-i+H63uk2e?wVGq=5M1tls-z3FVGusWIt_ydR0TQ3kaRn7%yECv0rq{7o|CCZ>wiS}PA>8W8nYh#z zwlB3IKXTT#Ej%|%HhL}@?81n5m4s#Z?8L143Y&EgQfm^vs!}eaiQ4ZAEXa!TE8wwE z^4~ABB|D-;vPHVo6@&AW@>g~Tl0z;f*mWV%tl>LnPFP=JbyzIH_m~!1{R6gJdSN^Fk*9TCPfER$pcTHRqtxW~XTAc9F zhunQ_o(hLo>-M)(+EG#p4QkGN#E~14&Z}R?o9uw~!3BH)odgS+3pJ zp2wofW2VypZoch-E1#!9ec$+0D8{^6>nU}ddifyiBH_cfv`-_lFU4SoRl?PePM zG*`eaXkYW|XH(FtG$oqRlw_a`nWuAYDLBu(cwgfcbPxSUSzKbP{5JU6ZfOh1&-VKk zs|3gGO-Le^zUu0F<7jR_pNv~XO&o)(;A}Kk&Dh;<0TH&}w-7#W9RR!&{^`R6|A?OI zCEc=M-DA*EekH`1(-NZuONu)aEL?&UZ-tZU1@*G8(z5vPKy>Mlvid%5i+ExrCD=tz z&m0TSltr@>v(Y0{rTA>#*B&D>UUkI@JPPDHT2Yrz+)>>fkkY>X1%`7pXbNaJN2gi4 z3wF(5e74+R>BJ2t)oUkius;&5(jNa(HUc~DiKzs;q&60&2}Kypu^5{yHweLXtMyMP z3BIE-=U~NR!?rhWRlW&nahkaTN{chWI;X3FxKI|B)EjP9_?&W*;8=Z4_Y{7Sk2i*| z$(*&!Ob7EPg|+uiwXhEs6MN^X@7&kUOCP|>`pR#SaOrtfz2biq_g1Xet;}+2v;kN7 zJLG%l$URFU!K?(^tKU>>uUep!@`oUq?$chTTUG+^RQVHBkik8keH|&mq2L>Xl-HCri`8x90}$Ba5jE@wE@q@Z|XyBq^BdTY^_^{D9Mq3J28fiX z&)(N&r7odenOuXsq<$i>2I-5wX0lNKfx*S&fq zp@^_=%y`{fk%=WwdQSODn5oCC;i^_Bg}@5Whhi>3*5-qCdVMrvW%)S-iuK(#{52)z zf9$?gfP}g;lFILf+2tT54kcJSKoC$CVS?St4F*wih;d)LC^MB;$38>Kg(RcCA*dxj z{p5=Le7VNS*P1Dl*Sa7wOIzR7)Q_(I{k4|Z9}IeCYGvi_-Mf;j>;i0kIM^4TtG{No zgQkBe%$~-FmMsSKTjKC~8ifYgu;JvQN)!Nm@%J5xN)yYamJ4e_huv-Ga7*rSmj*KvKmV9(zaUz)$i?lJcN Db9MLR diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php deleted file mode 100644 index a9ab1644bb8c..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment - */ -class AccountDefenderAssessment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Labels for this request. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $labels - * Output only. Labels for this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Labels for this request. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. Labels for this request. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment\AccountDefenderLabel::class); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php deleted file mode 100644 index 1b83b9790b34..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountDefenderAssessment/AccountDefenderLabel.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel - */ -class AccountDefenderLabel -{ - /** - * Default unspecified type. - * - * Generated from protobuf enum ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0; - */ - const ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0; - /** - * The request matches a known good profile for the user. - * - * Generated from protobuf enum PROFILE_MATCH = 1; - */ - const PROFILE_MATCH = 1; - /** - * The request is potentially a suspicious login event and must be further - * verified either through multi-factor authentication or another system. - * - * Generated from protobuf enum SUSPICIOUS_LOGIN_ACTIVITY = 2; - */ - const SUSPICIOUS_LOGIN_ACTIVITY = 2; - /** - * The request matched a profile that previously had suspicious account - * creation behavior. This can mean that this is a fake account. - * - * Generated from protobuf enum SUSPICIOUS_ACCOUNT_CREATION = 3; - */ - const SUSPICIOUS_ACCOUNT_CREATION = 3; - /** - * The account in the request has a high number of related accounts. It does - * not necessarily imply that the account is bad but can require further - * investigation. - * - * Generated from protobuf enum RELATED_ACCOUNTS_NUMBER_HIGH = 4; - */ - const RELATED_ACCOUNTS_NUMBER_HIGH = 4; - - private static $valueToName = [ - self::ACCOUNT_DEFENDER_LABEL_UNSPECIFIED => 'ACCOUNT_DEFENDER_LABEL_UNSPECIFIED', - self::PROFILE_MATCH => 'PROFILE_MATCH', - self::SUSPICIOUS_LOGIN_ACTIVITY => 'SUSPICIOUS_LOGIN_ACTIVITY', - self::SUSPICIOUS_ACCOUNT_CREATION => 'SUSPICIOUS_ACCOUNT_CREATION', - self::RELATED_ACCOUNTS_NUMBER_HIGH => 'RELATED_ACCOUNTS_NUMBER_HIGH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccountDefenderLabel::class, \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment_AccountDefenderLabel::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php deleted file mode 100644 index 5e8e0f49030d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AccountVerificationInfo - */ -class AccountVerificationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Endpoints that can be used for identity verification. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $endpoints; - /** - * Optional. Language code preference for the verification message, set as a - * IETF BCP 47 language code. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - /** - * Output only. Result of the latest account verification challenge. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result latest_verification_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_verification_result = 0; - /** - * Username of the account that is being verified. Deprecated. Customers - * should now provide the `account_id` field in `event.user_info`. - * - * Generated from protobuf field string username = 2 [deprecated = true]; - * @deprecated - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\EndpointVerificationInfo>|\Google\Protobuf\Internal\RepeatedField $endpoints - * Optional. Endpoints that can be used for identity verification. - * @type string $language_code - * Optional. Language code preference for the verification message, set as a - * IETF BCP 47 language code. - * @type int $latest_verification_result - * Output only. Result of the latest account verification challenge. - * @type string $username - * Username of the account that is being verified. Deprecated. Customers - * should now provide the `account_id` field in `event.user_info`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Endpoints that can be used for identity verification. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * Optional. Endpoints that can be used for identity verification. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\EndpointVerificationInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\EndpointVerificationInfo::class); - $this->endpoints = $arr; - - return $this; - } - - /** - * Optional. Language code preference for the verification message, set as a - * IETF BCP 47 language code. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. Language code preference for the verification message, set as a - * IETF BCP 47 language code. - * - * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Output only. Result of the latest account verification challenge. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result latest_verification_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLatestVerificationResult() - { - return $this->latest_verification_result; - } - - /** - * Output only. Result of the latest account verification challenge. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result latest_verification_result = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLatestVerificationResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo\Result::class); - $this->latest_verification_result = $var; - - return $this; - } - - /** - * Username of the account that is being verified. Deprecated. Customers - * should now provide the `account_id` field in `event.user_info`. - * - * Generated from protobuf field string username = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getUsername() - { - @trigger_error('username is deprecated.', E_USER_DEPRECATED); - return $this->username; - } - - /** - * Username of the account that is being verified. Deprecated. Customers - * should now provide the `account_id` field in `event.user_info`. - * - * Generated from protobuf field string username = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setUsername($var) - { - @trigger_error('username is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php deleted file mode 100644 index 2b3348060160..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AccountVerificationInfo/Result.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result - */ -class Result -{ - /** - * No information about the latest account verification. - * - * Generated from protobuf enum RESULT_UNSPECIFIED = 0; - */ - const RESULT_UNSPECIFIED = 0; - /** - * The user was successfully verified. This means the account verification - * challenge was successfully completed. - * - * Generated from protobuf enum SUCCESS_USER_VERIFIED = 1; - */ - const SUCCESS_USER_VERIFIED = 1; - /** - * The user failed the verification challenge. - * - * Generated from protobuf enum ERROR_USER_NOT_VERIFIED = 2; - */ - const ERROR_USER_NOT_VERIFIED = 2; - /** - * The site is not properly onboarded to use the account verification - * feature. - * - * Generated from protobuf enum ERROR_SITE_ONBOARDING_INCOMPLETE = 3; - */ - const ERROR_SITE_ONBOARDING_INCOMPLETE = 3; - /** - * The recipient is not allowed for account verification. This can occur - * during integration but should not occur in production. - * - * Generated from protobuf enum ERROR_RECIPIENT_NOT_ALLOWED = 4; - */ - const ERROR_RECIPIENT_NOT_ALLOWED = 4; - /** - * The recipient has already been sent too many verification codes in a - * short amount of time. - * - * Generated from protobuf enum ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED = 5; - */ - const ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED = 5; - /** - * The verification flow could not be completed due to a critical internal - * error. - * - * Generated from protobuf enum ERROR_CRITICAL_INTERNAL = 6; - */ - const ERROR_CRITICAL_INTERNAL = 6; - /** - * The client has exceeded their two factor request quota for this period of - * time. - * - * Generated from protobuf enum ERROR_CUSTOMER_QUOTA_EXHAUSTED = 7; - */ - const ERROR_CUSTOMER_QUOTA_EXHAUSTED = 7; - /** - * The request cannot be processed at the time because of an incident. This - * bypass can be restricted to a problematic destination email domain, a - * customer, or could affect the entire service. - * - * Generated from protobuf enum ERROR_VERIFICATION_BYPASSED = 8; - */ - const ERROR_VERIFICATION_BYPASSED = 8; - /** - * The request parameters do not match with the token provided and cannot be - * processed. - * - * Generated from protobuf enum ERROR_VERDICT_MISMATCH = 9; - */ - const ERROR_VERDICT_MISMATCH = 9; - - private static $valueToName = [ - self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', - self::SUCCESS_USER_VERIFIED => 'SUCCESS_USER_VERIFIED', - self::ERROR_USER_NOT_VERIFIED => 'ERROR_USER_NOT_VERIFIED', - self::ERROR_SITE_ONBOARDING_INCOMPLETE => 'ERROR_SITE_ONBOARDING_INCOMPLETE', - self::ERROR_RECIPIENT_NOT_ALLOWED => 'ERROR_RECIPIENT_NOT_ALLOWED', - self::ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED => 'ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED', - self::ERROR_CRITICAL_INTERNAL => 'ERROR_CRITICAL_INTERNAL', - self::ERROR_CUSTOMER_QUOTA_EXHAUSTED => 'ERROR_CUSTOMER_QUOTA_EXHAUSTED', - self::ERROR_VERIFICATION_BYPASSED => 'ERROR_VERIFICATION_BYPASSED', - self::ERROR_VERDICT_MISMATCH => 'ERROR_VERDICT_MISMATCH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo_Result::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php deleted file mode 100644 index 7c007dfb749e..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest - */ -class AddIpOverrideRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the key to which the IP override is added, in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. IP override added to the key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ip_override_data = null; - - /** - * @param string $name Required. The name of the key to which the IP override is added, in the - * format `projects/{project}/keys/{key}`. Please see - * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. - * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData Required. IP override added to the key. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\AddIpOverrideRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData): self - { - return (new self()) - ->setName($name) - ->setIpOverrideData($ipOverrideData); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the key to which the IP override is added, in the - * format `projects/{project}/keys/{key}`. - * @type \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ip_override_data - * Required. IP override added to the key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the key to which the IP override is added, in the - * format `projects/{project}/keys/{key}`. - * - * 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 key to which the IP override is added, in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. IP override added to the key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData|null - */ - public function getIpOverrideData() - { - return $this->ip_override_data; - } - - public function hasIpOverrideData() - { - return isset($this->ip_override_data); - } - - public function clearIpOverrideData() - { - unset($this->ip_override_data); - } - - /** - * Required. IP override added to the key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $var - * @return $this - */ - public function setIpOverrideData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData::class); - $this->ip_override_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php deleted file mode 100644 index cfbc2dff2ace..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AddIpOverrideResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse - */ -class AddIpOverrideResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php deleted file mode 100644 index 48395cbf6a84..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AndroidKeySettings.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AndroidKeySettings - */ -class AndroidKeySettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If set to true, allowed_package_names are not enforced. - * - * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_all_package_names = false; - /** - * Optional. Android package names of apps allowed to use the key. - * Example: 'com.companyname.appname' - * - * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $allowed_package_names; - /** - * Optional. Set to true for keys that are used in an Android application that - * is available for download in app stores in addition to the Google Play - * Store. - * - * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $support_non_google_app_store_distribution = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $allow_all_package_names - * Optional. If set to true, allowed_package_names are not enforced. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_package_names - * Optional. Android package names of apps allowed to use the key. - * Example: 'com.companyname.appname' - * @type bool $support_non_google_app_store_distribution - * Optional. Set to true for keys that are used in an Android application that - * is available for download in app stores in addition to the Google Play - * Store. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set to true, allowed_package_names are not enforced. - * - * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowAllPackageNames() - { - return $this->allow_all_package_names; - } - - /** - * Optional. If set to true, allowed_package_names are not enforced. - * - * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowAllPackageNames($var) - { - GPBUtil::checkBool($var); - $this->allow_all_package_names = $var; - - return $this; - } - - /** - * Optional. Android package names of apps allowed to use the key. - * Example: 'com.companyname.appname' - * - * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedPackageNames() - { - return $this->allowed_package_names; - } - - /** - * Optional. Android package names of apps allowed to use the key. - * Example: 'com.companyname.appname' - * - * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedPackageNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_package_names = $arr; - - return $this; - } - - /** - * Optional. Set to true for keys that are used in an Android application that - * is available for download in app stores in addition to the Google Play - * Store. - * - * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSupportNonGoogleAppStoreDistribution() - { - return $this->support_non_google_app_store_distribution; - } - - /** - * Optional. Set to true for keys that are used in an Android application that - * is available for download in app stores in addition to the Google Play - * Store. - * - * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSupportNonGoogleAppStoreDistribution($var) - { - GPBUtil::checkBool($var); - $this->support_non_google_app_store_distribution = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php deleted file mode 100644 index e2a10ba13c89..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest - */ -class AnnotateAssessmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Assessment, in the format - * `projects/{project}/assessments/{assessment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The annotation that is assigned to the Event. This field can be - * left empty to provide reasons that apply to an event without concluding - * whether the event is legitimate or fraudulent. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $annotation = 0; - /** - * Optional. Reasons for the annotation that are assigned to the event. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $reasons; - /** - * Optional. A stable account identifier to apply to the assessment. This is - * an alternative to setting `account_id` in `CreateAssessment`, for example - * when a stable account identifier is not yet known in the initial request. - * - * Generated from protobuf field string account_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $account_id = ''; - /** - * Optional. A stable hashed account identifier to apply to the assessment. - * This is an alternative to setting `hashed_account_id` in - * `CreateAssessment`, for example when a stable account identifier is not yet - * known in the initial request. - * - * Generated from protobuf field bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $hashed_account_id = ''; - /** - * Optional. If the assessment is part of a payment transaction, provide - * details on payment lifecycle events that occur in the transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $transaction_event = null; - - /** - * @param string $name Required. The resource name of the Assessment, in the format - * `projects/{project}/assessments/{assessment}`. Please see - * {@see RecaptchaEnterpriseServiceClient::assessmentName()} for help formatting this field. - * @param int $annotation Optional. The annotation that is assigned to the Event. This field can be - * left empty to provide reasons that apply to an event without concluding - * whether the event is legitimate or fraudulent. - * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Annotation} - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest - * - * @experimental - */ - public static function build(string $name, int $annotation): self - { - return (new self()) - ->setName($name) - ->setAnnotation($annotation); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Assessment, in the format - * `projects/{project}/assessments/{assessment}`. - * @type int $annotation - * Optional. The annotation that is assigned to the Event. This field can be - * left empty to provide reasons that apply to an event without concluding - * whether the event is legitimate or fraudulent. - * @type array|\Google\Protobuf\Internal\RepeatedField $reasons - * Optional. Reasons for the annotation that are assigned to the event. - * @type string $account_id - * Optional. A stable account identifier to apply to the assessment. This is - * an alternative to setting `account_id` in `CreateAssessment`, for example - * when a stable account identifier is not yet known in the initial request. - * @type string $hashed_account_id - * Optional. A stable hashed account identifier to apply to the assessment. - * This is an alternative to setting `hashed_account_id` in - * `CreateAssessment`, for example when a stable account identifier is not yet - * known in the initial request. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent $transaction_event - * Optional. If the assessment is part of a payment transaction, provide - * details on payment lifecycle events that occur in the transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Assessment, in the format - * `projects/{project}/assessments/{assessment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Assessment, in the format - * `projects/{project}/assessments/{assessment}`. - * - * 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. The annotation that is assigned to the Event. This field can be - * left empty to provide reasons that apply to an event without concluding - * whether the event is legitimate or fraudulent. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAnnotation() - { - return $this->annotation; - } - - /** - * Optional. The annotation that is assigned to the Event. This field can be - * left empty to provide reasons that apply to an event without concluding - * whether the event is legitimate or fraudulent. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Annotation::class); - $this->annotation = $var; - - return $this; - } - - /** - * Optional. Reasons for the annotation that are assigned to the event. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasons() - { - return $this->reasons; - } - - /** - * Optional. Reasons for the annotation that are assigned to the event. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Reason::class); - $this->reasons = $arr; - - return $this; - } - - /** - * Optional. A stable account identifier to apply to the assessment. This is - * an alternative to setting `account_id` in `CreateAssessment`, for example - * when a stable account identifier is not yet known in the initial request. - * - * Generated from protobuf field string account_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAccountId() - { - return $this->account_id; - } - - /** - * Optional. A stable account identifier to apply to the assessment. This is - * an alternative to setting `account_id` in `CreateAssessment`, for example - * when a stable account identifier is not yet known in the initial request. - * - * Generated from protobuf field string account_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAccountId($var) - { - GPBUtil::checkString($var, True); - $this->account_id = $var; - - return $this; - } - - /** - * Optional. A stable hashed account identifier to apply to the assessment. - * This is an alternative to setting `hashed_account_id` in - * `CreateAssessment`, for example when a stable account identifier is not yet - * known in the initial request. - * - * Generated from protobuf field bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHashedAccountId() - { - return $this->hashed_account_id; - } - - /** - * Optional. A stable hashed account identifier to apply to the assessment. - * This is an alternative to setting `hashed_account_id` in - * `CreateAssessment`, for example when a stable account identifier is not yet - * known in the initial request. - * - * Generated from protobuf field bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setHashedAccountId($var) - { - GPBUtil::checkString($var, False); - $this->hashed_account_id = $var; - - return $this; - } - - /** - * Optional. If the assessment is part of a payment transaction, provide - * details on payment lifecycle events that occur in the transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent|null - */ - public function getTransactionEvent() - { - return $this->transaction_event; - } - - public function hasTransactionEvent() - { - return isset($this->transaction_event); - } - - public function clearTransactionEvent() - { - unset($this->transaction_event); - } - - /** - * Optional. If the assessment is part of a payment transaction, provide - * details on payment lifecycle events that occur in the transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent $var - * @return $this - */ - public function setTransactionEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent::class); - $this->transaction_event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php deleted file mode 100644 index d46aa93d147d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Annotation.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation - */ -class Annotation -{ - /** - * Default unspecified type. - * - * Generated from protobuf enum ANNOTATION_UNSPECIFIED = 0; - */ - const ANNOTATION_UNSPECIFIED = 0; - /** - * Provides information that the event turned out to be legitimate. - * - * Generated from protobuf enum LEGITIMATE = 1; - */ - const LEGITIMATE = 1; - /** - * Provides information that the event turned out to be fraudulent. - * - * Generated from protobuf enum FRAUDULENT = 2; - */ - const FRAUDULENT = 2; - /** - * Provides information that the event was related to a login event in which - * the user typed the correct password. Deprecated, prefer indicating - * CORRECT_PASSWORD through the reasons field instead. - * - * Generated from protobuf enum PASSWORD_CORRECT = 3 [deprecated = true]; - */ - const PASSWORD_CORRECT = 3; - /** - * Provides information that the event was related to a login event in which - * the user typed the incorrect password. Deprecated, prefer indicating - * INCORRECT_PASSWORD through the reasons field instead. - * - * Generated from protobuf enum PASSWORD_INCORRECT = 4 [deprecated = true]; - */ - const PASSWORD_INCORRECT = 4; - - private static $valueToName = [ - self::ANNOTATION_UNSPECIFIED => 'ANNOTATION_UNSPECIFIED', - self::LEGITIMATE => 'LEGITIMATE', - self::FRAUDULENT => 'FRAUDULENT', - self::PASSWORD_CORRECT => 'PASSWORD_CORRECT', - self::PASSWORD_INCORRECT => 'PASSWORD_INCORRECT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Annotation::class, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest_Annotation::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php deleted file mode 100644 index 4b0d90d7be14..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest/Reason.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason - */ -class Reason -{ - /** - * Default unspecified reason. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * Indicates that the transaction had a chargeback issued with no other - * details. When possible, specify the type by using CHARGEBACK_FRAUD or - * CHARGEBACK_DISPUTE instead. - * - * Generated from protobuf enum CHARGEBACK = 1; - */ - const CHARGEBACK = 1; - /** - * Indicates that the transaction had a chargeback issued related to an - * alleged unauthorized transaction from the cardholder's perspective (for - * example, the card number was stolen). - * - * Generated from protobuf enum CHARGEBACK_FRAUD = 8; - */ - const CHARGEBACK_FRAUD = 8; - /** - * Indicates that the transaction had a chargeback issued related to the - * cardholder having provided their card details but allegedly not being - * satisfied with the purchase (for example, misrepresentation, attempted - * cancellation). - * - * Generated from protobuf enum CHARGEBACK_DISPUTE = 9; - */ - const CHARGEBACK_DISPUTE = 9; - /** - * Indicates that the completed payment transaction was refunded by the - * seller. - * - * Generated from protobuf enum REFUND = 10; - */ - const REFUND = 10; - /** - * Indicates that the completed payment transaction was determined to be - * fraudulent by the seller, and was cancelled and refunded as a result. - * - * Generated from protobuf enum REFUND_FRAUD = 11; - */ - const REFUND_FRAUD = 11; - /** - * Indicates that the payment transaction was accepted, and the user was - * charged. - * - * Generated from protobuf enum TRANSACTION_ACCEPTED = 12; - */ - const TRANSACTION_ACCEPTED = 12; - /** - * Indicates that the payment transaction was declined, for example due to - * invalid card details. - * - * Generated from protobuf enum TRANSACTION_DECLINED = 13; - */ - const TRANSACTION_DECLINED = 13; - /** - * Indicates the transaction associated with the assessment is suspected of - * being fraudulent based on the payment method, billing details, shipping - * address or other transaction information. - * - * Generated from protobuf enum PAYMENT_HEURISTICS = 2; - */ - const PAYMENT_HEURISTICS = 2; - /** - * Indicates that the user was served a 2FA challenge. An old assessment - * with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been - * overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow. - * This is equivalent to `FAILED_TWO_FACTOR`. - * - * Generated from protobuf enum INITIATED_TWO_FACTOR = 7; - */ - const INITIATED_TWO_FACTOR = 7; - /** - * Indicates that the user passed a 2FA challenge. - * - * Generated from protobuf enum PASSED_TWO_FACTOR = 3; - */ - const PASSED_TWO_FACTOR = 3; - /** - * Indicates that the user failed a 2FA challenge. - * - * Generated from protobuf enum FAILED_TWO_FACTOR = 4; - */ - const FAILED_TWO_FACTOR = 4; - /** - * Indicates the user provided the correct password. - * - * Generated from protobuf enum CORRECT_PASSWORD = 5; - */ - const CORRECT_PASSWORD = 5; - /** - * Indicates the user provided an incorrect password. - * - * Generated from protobuf enum INCORRECT_PASSWORD = 6; - */ - const INCORRECT_PASSWORD = 6; - /** - * Indicates that the user sent unwanted and abusive messages to other users - * of the platform, such as spam, scams, phishing, or social engineering. - * - * Generated from protobuf enum SOCIAL_SPAM = 14; - */ - const SOCIAL_SPAM = 14; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::CHARGEBACK => 'CHARGEBACK', - self::CHARGEBACK_FRAUD => 'CHARGEBACK_FRAUD', - self::CHARGEBACK_DISPUTE => 'CHARGEBACK_DISPUTE', - self::REFUND => 'REFUND', - self::REFUND_FRAUD => 'REFUND_FRAUD', - self::TRANSACTION_ACCEPTED => 'TRANSACTION_ACCEPTED', - self::TRANSACTION_DECLINED => 'TRANSACTION_DECLINED', - self::PAYMENT_HEURISTICS => 'PAYMENT_HEURISTICS', - self::INITIATED_TWO_FACTOR => 'INITIATED_TWO_FACTOR', - self::PASSED_TWO_FACTOR => 'PASSED_TWO_FACTOR', - self::FAILED_TWO_FACTOR => 'FAILED_TWO_FACTOR', - self::CORRECT_PASSWORD => 'CORRECT_PASSWORD', - self::INCORRECT_PASSWORD => 'INCORRECT_PASSWORD', - self::SOCIAL_SPAM => 'SOCIAL_SPAM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reason::class, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest_Reason::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php deleted file mode 100644 index f38a573bcb4d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse - */ -class AnnotateAssessmentResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php deleted file mode 100644 index 3e68e2c4d4a8..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AppleDeveloperId.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AppleDeveloperId - */ -class AppleDeveloperId extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input only. A private key (downloaded as a text file with a .p8 - * file extension) generated for your Apple Developer account. Ensure that - * Apple DeviceCheck is enabled for the private key. - * - * Generated from protobuf field string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $private_key = ''; - /** - * Required. The Apple developer key ID (10-character string). - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_id = ''; - /** - * Required. The Apple team ID (10-character string) owning the provisioning - * profile used to build your application. - * - * Generated from protobuf field string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $team_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_key - * Required. Input only. A private key (downloaded as a text file with a .p8 - * file extension) generated for your Apple Developer account. Ensure that - * Apple DeviceCheck is enabled for the private key. - * @type string $key_id - * Required. The Apple developer key ID (10-character string). - * @type string $team_id - * Required. The Apple team ID (10-character string) owning the provisioning - * profile used to build your application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input only. A private key (downloaded as a text file with a .p8 - * file extension) generated for your Apple Developer account. Ensure that - * Apple DeviceCheck is enabled for the private key. - * - * Generated from protobuf field string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPrivateKey() - { - return $this->private_key; - } - - /** - * Required. Input only. A private key (downloaded as a text file with a .p8 - * file extension) generated for your Apple Developer account. Ensure that - * Apple DeviceCheck is enabled for the private key. - * - * Generated from protobuf field string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrivateKey($var) - { - GPBUtil::checkString($var, True); - $this->private_key = $var; - - return $this; - } - - /** - * Required. The Apple developer key ID (10-character string). - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * Required. The Apple developer key ID (10-character string). - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - - /** - * Required. The Apple team ID (10-character string) owning the provisioning - * profile used to build your application. - * - * Generated from protobuf field string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTeamId() - { - return $this->team_id; - } - - /** - * Required. The Apple team ID (10-character string) owning the provisioning - * profile used to build your application. - * - * Generated from protobuf field string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTeamId($var) - { - GPBUtil::checkString($var, True); - $this->team_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php deleted file mode 100644 index 841569a1b296..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php +++ /dev/null @@ -1,599 +0,0 @@ -google.cloud.recaptchaenterprise.v1.Assessment - */ -class Assessment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name for the Assessment in the format - * `projects/{project}/assessments/{assessment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The event being assessed. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event = null; - /** - * Output only. The risk analysis result for the event being assessed. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $risk_analysis = null; - /** - * Output only. Properties of the provided event token. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $token_properties = null; - /** - * Optional. Account verification information for identity verification. The - * assessment event must include a token and site key to use this feature. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $account_verification = null; - /** - * Output only. Assessment returned by account defender when an account - * identifier is provided. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $account_defender_assessment = null; - /** - * Optional. The private password leak verification field contains the - * parameters that are used to to check for leaks privately without sharing - * user credentials. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $private_password_leak_verification = null; - /** - * Output only. Assessment returned when firewall policies belonging to the - * project are evaluated using the field firewall_policy_evaluation. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $firewall_policy_assessment = null; - /** - * Output only. Assessment returned by Fraud Prevention when TransactionData - * is provided. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $fraud_prevention_assessment = null; - /** - * Output only. Fraud Signals specific to the users involved in a payment - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $fraud_signals = null; - /** - * Output only. Assessment returned when a site key, a token, and a phone - * number as `user_id` are provided. Account defender and SMS toll fraud - * protection need to be enabled. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $phone_fraud_assessment = null; - /** - * Optional. The environment creating the assessment. This describes your - * environment (the system invoking CreateAssessment), NOT the environment of - * your user. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $assessment_environment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name for the Assessment in the format - * `projects/{project}/assessments/{assessment}`. - * @type \Google\Cloud\RecaptchaEnterprise\V1\Event $event - * Optional. The event being assessed. - * @type \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis $risk_analysis - * Output only. The risk analysis result for the event being assessed. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties $token_properties - * Output only. Properties of the provided event token. - * @type \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo $account_verification - * Optional. Account verification information for identity verification. The - * assessment event must include a token and site key to use this feature. - * @type \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment $account_defender_assessment - * Output only. Assessment returned by account defender when an account - * identifier is provided. - * @type \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification $private_password_leak_verification - * Optional. The private password leak verification field contains the - * parameters that are used to to check for leaks privately without sharing - * user credentials. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment $firewall_policy_assessment - * Output only. Assessment returned when firewall policies belonging to the - * project are evaluated using the field firewall_policy_evaluation. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment $fraud_prevention_assessment - * Output only. Assessment returned by Fraud Prevention when TransactionData - * is provided. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals $fraud_signals - * Output only. Fraud Signals specific to the users involved in a payment - * transaction. - * @type \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment $phone_fraud_assessment - * Output only. Assessment returned when a site key, a token, and a phone - * number as `user_id` are provided. Account defender and SMS toll fraud - * protection need to be enabled. - * @type \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment $assessment_environment - * Optional. The environment creating the assessment. This describes your - * environment (the system invoking CreateAssessment), NOT the environment of - * your user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name for the Assessment in the format - * `projects/{project}/assessments/{assessment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. The resource name for the Assessment in the format - * `projects/{project}/assessments/{assessment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The event being assessed. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\Event|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Optional. The event being assessed. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\Event $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Event::class); - $this->event = $var; - - return $this; - } - - /** - * Output only. The risk analysis result for the event being assessed. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis|null - */ - public function getRiskAnalysis() - { - return $this->risk_analysis; - } - - public function hasRiskAnalysis() - { - return isset($this->risk_analysis); - } - - public function clearRiskAnalysis() - { - unset($this->risk_analysis); - } - - /** - * Output only. The risk analysis result for the event being assessed. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis $var - * @return $this - */ - public function setRiskAnalysis($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis::class); - $this->risk_analysis = $var; - - return $this; - } - - /** - * Output only. Properties of the provided event token. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties|null - */ - public function getTokenProperties() - { - return $this->token_properties; - } - - public function hasTokenProperties() - { - return isset($this->token_properties); - } - - public function clearTokenProperties() - { - unset($this->token_properties); - } - - /** - * Output only. Properties of the provided event token. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties $var - * @return $this - */ - public function setTokenProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties::class); - $this->token_properties = $var; - - return $this; - } - - /** - * Optional. Account verification information for identity verification. The - * assessment event must include a token and site key to use this feature. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo|null - */ - public function getAccountVerification() - { - return $this->account_verification; - } - - public function hasAccountVerification() - { - return isset($this->account_verification); - } - - public function clearAccountVerification() - { - unset($this->account_verification); - } - - /** - * Optional. Account verification information for identity verification. The - * assessment event must include a token and site key to use this feature. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo $var - * @return $this - */ - public function setAccountVerification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo::class); - $this->account_verification = $var; - - return $this; - } - - /** - * Output only. Assessment returned by account defender when an account - * identifier is provided. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment|null - */ - public function getAccountDefenderAssessment() - { - return $this->account_defender_assessment; - } - - public function hasAccountDefenderAssessment() - { - return isset($this->account_defender_assessment); - } - - public function clearAccountDefenderAssessment() - { - unset($this->account_defender_assessment); - } - - /** - * Output only. Assessment returned by account defender when an account - * identifier is provided. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment $var - * @return $this - */ - public function setAccountDefenderAssessment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment::class); - $this->account_defender_assessment = $var; - - return $this; - } - - /** - * Optional. The private password leak verification field contains the - * parameters that are used to to check for leaks privately without sharing - * user credentials. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification|null - */ - public function getPrivatePasswordLeakVerification() - { - return $this->private_password_leak_verification; - } - - public function hasPrivatePasswordLeakVerification() - { - return isset($this->private_password_leak_verification); - } - - public function clearPrivatePasswordLeakVerification() - { - unset($this->private_password_leak_verification); - } - - /** - * Optional. The private password leak verification field contains the - * parameters that are used to to check for leaks privately without sharing - * user credentials. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification $var - * @return $this - */ - public function setPrivatePasswordLeakVerification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification::class); - $this->private_password_leak_verification = $var; - - return $this; - } - - /** - * Output only. Assessment returned when firewall policies belonging to the - * project are evaluated using the field firewall_policy_evaluation. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment|null - */ - public function getFirewallPolicyAssessment() - { - return $this->firewall_policy_assessment; - } - - public function hasFirewallPolicyAssessment() - { - return isset($this->firewall_policy_assessment); - } - - public function clearFirewallPolicyAssessment() - { - unset($this->firewall_policy_assessment); - } - - /** - * Output only. Assessment returned when firewall policies belonging to the - * project are evaluated using the field firewall_policy_evaluation. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment $var - * @return $this - */ - public function setFirewallPolicyAssessment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment::class); - $this->firewall_policy_assessment = $var; - - return $this; - } - - /** - * Output only. Assessment returned by Fraud Prevention when TransactionData - * is provided. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment|null - */ - public function getFraudPreventionAssessment() - { - return $this->fraud_prevention_assessment; - } - - public function hasFraudPreventionAssessment() - { - return isset($this->fraud_prevention_assessment); - } - - public function clearFraudPreventionAssessment() - { - unset($this->fraud_prevention_assessment); - } - - /** - * Output only. Assessment returned by Fraud Prevention when TransactionData - * is provided. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment $var - * @return $this - */ - public function setFraudPreventionAssessment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment::class); - $this->fraud_prevention_assessment = $var; - - return $this; - } - - /** - * Output only. Fraud Signals specific to the users involved in a payment - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals|null - */ - public function getFraudSignals() - { - return $this->fraud_signals; - } - - public function hasFraudSignals() - { - return isset($this->fraud_signals); - } - - public function clearFraudSignals() - { - unset($this->fraud_signals); - } - - /** - * Output only. Fraud Signals specific to the users involved in a payment - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals $var - * @return $this - */ - public function setFraudSignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals::class); - $this->fraud_signals = $var; - - return $this; - } - - /** - * Output only. Assessment returned when a site key, a token, and a phone - * number as `user_id` are provided. Account defender and SMS toll fraud - * protection need to be enabled. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment|null - */ - public function getPhoneFraudAssessment() - { - return $this->phone_fraud_assessment; - } - - public function hasPhoneFraudAssessment() - { - return isset($this->phone_fraud_assessment); - } - - public function clearPhoneFraudAssessment() - { - unset($this->phone_fraud_assessment); - } - - /** - * Output only. Assessment returned when a site key, a token, and a phone - * number as `user_id` are provided. Account defender and SMS toll fraud - * protection need to be enabled. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment $var - * @return $this - */ - public function setPhoneFraudAssessment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment::class); - $this->phone_fraud_assessment = $var; - - return $this; - } - - /** - * Optional. The environment creating the assessment. This describes your - * environment (the system invoking CreateAssessment), NOT the environment of - * your user. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment|null - */ - public function getAssessmentEnvironment() - { - return $this->assessment_environment; - } - - public function hasAssessmentEnvironment() - { - return isset($this->assessment_environment); - } - - public function clearAssessmentEnvironment() - { - unset($this->assessment_environment); - } - - /** - * Optional. The environment creating the assessment. This describes your - * environment (the system invoking CreateAssessment), NOT the environment of - * your user. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment $var - * @return $this - */ - public function setAssessmentEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment::class); - $this->assessment_environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php deleted file mode 100644 index 049d27d43544..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AssessmentEnvironment.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.recaptchaenterprise.v1.AssessmentEnvironment - */ -class AssessmentEnvironment extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Identifies the client module initiating the CreateAssessment - * request. This can be the link to the client module's project. Examples - * include: - * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" - * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" - * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" - * - "wordpress.org/plugins/recaptcha-something" - * - * Generated from protobuf field string client = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client = ''; - /** - * Optional. The version of the client module. For example, "1.0.0". - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $client - * Optional. Identifies the client module initiating the CreateAssessment - * request. This can be the link to the client module's project. Examples - * include: - * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" - * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" - * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" - * - "wordpress.org/plugins/recaptcha-something" - * @type string $version - * Optional. The version of the client module. For example, "1.0.0". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Identifies the client module initiating the CreateAssessment - * request. This can be the link to the client module's project. Examples - * include: - * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" - * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" - * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" - * - "wordpress.org/plugins/recaptcha-something" - * - * Generated from protobuf field string client = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClient() - { - return $this->client; - } - - /** - * Optional. Identifies the client module initiating the CreateAssessment - * request. This can be the link to the client module's project. Examples - * include: - * - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" - * - "cloud.google.com/recaptcha/docs/implement-waf-akamai" - * - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" - * - "wordpress.org/plugins/recaptcha-something" - * - * Generated from protobuf field string client = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClient($var) - { - GPBUtil::checkString($var, True); - $this->client = $var; - - return $this; - } - - /** - * Optional. The version of the client module. For example, "1.0.0". - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The version of the client module. For example, "1.0.0". - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php deleted file mode 100644 index a1ce9c36cfc4..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ChallengeMetrics.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ChallengeMetrics - */ -class ChallengeMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent - * to a count of pageloads for pages that include reCAPTCHA. - * - * Generated from protobuf field int64 pageload_count = 1; - */ - protected $pageload_count = 0; - /** - * Count of nocaptchas (successful verification without a challenge) issued. - * - * Generated from protobuf field int64 nocaptcha_count = 2; - */ - protected $nocaptcha_count = 0; - /** - * Count of submitted challenge solutions that were incorrect or otherwise - * deemed suspicious such that a subsequent challenge was triggered. - * - * Generated from protobuf field int64 failed_count = 3; - */ - protected $failed_count = 0; - /** - * Count of nocaptchas (successful verification without a challenge) plus - * submitted challenge solutions that were correct and resulted in - * verification. - * - * Generated from protobuf field int64 passed_count = 4; - */ - protected $passed_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $pageload_count - * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent - * to a count of pageloads for pages that include reCAPTCHA. - * @type int|string $nocaptcha_count - * Count of nocaptchas (successful verification without a challenge) issued. - * @type int|string $failed_count - * Count of submitted challenge solutions that were incorrect or otherwise - * deemed suspicious such that a subsequent challenge was triggered. - * @type int|string $passed_count - * Count of nocaptchas (successful verification without a challenge) plus - * submitted challenge solutions that were correct and resulted in - * verification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent - * to a count of pageloads for pages that include reCAPTCHA. - * - * Generated from protobuf field int64 pageload_count = 1; - * @return int|string - */ - public function getPageloadCount() - { - return $this->pageload_count; - } - - /** - * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent - * to a count of pageloads for pages that include reCAPTCHA. - * - * Generated from protobuf field int64 pageload_count = 1; - * @param int|string $var - * @return $this - */ - public function setPageloadCount($var) - { - GPBUtil::checkInt64($var); - $this->pageload_count = $var; - - return $this; - } - - /** - * Count of nocaptchas (successful verification without a challenge) issued. - * - * Generated from protobuf field int64 nocaptcha_count = 2; - * @return int|string - */ - public function getNocaptchaCount() - { - return $this->nocaptcha_count; - } - - /** - * Count of nocaptchas (successful verification without a challenge) issued. - * - * Generated from protobuf field int64 nocaptcha_count = 2; - * @param int|string $var - * @return $this - */ - public function setNocaptchaCount($var) - { - GPBUtil::checkInt64($var); - $this->nocaptcha_count = $var; - - return $this; - } - - /** - * Count of submitted challenge solutions that were incorrect or otherwise - * deemed suspicious such that a subsequent challenge was triggered. - * - * Generated from protobuf field int64 failed_count = 3; - * @return int|string - */ - public function getFailedCount() - { - return $this->failed_count; - } - - /** - * Count of submitted challenge solutions that were incorrect or otherwise - * deemed suspicious such that a subsequent challenge was triggered. - * - * Generated from protobuf field int64 failed_count = 3; - * @param int|string $var - * @return $this - */ - public function setFailedCount($var) - { - GPBUtil::checkInt64($var); - $this->failed_count = $var; - - return $this; - } - - /** - * Count of nocaptchas (successful verification without a challenge) plus - * submitted challenge solutions that were correct and resulted in - * verification. - * - * Generated from protobuf field int64 passed_count = 4; - * @return int|string - */ - public function getPassedCount() - { - return $this->passed_count; - } - - /** - * Count of nocaptchas (successful verification without a challenge) plus - * submitted challenge solutions that were correct and resulted in - * verification. - * - * Generated from protobuf field int64 passed_count = 4; - * @param int|string $var - * @return $this - */ - public function setPassedCount($var) - { - GPBUtil::checkInt64($var); - $this->passed_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php deleted file mode 100644 index 942b225a585f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateAssessmentRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest - */ -class CreateAssessmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project in which the assessment is created, - * in the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The assessment details. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Assessment assessment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $assessment = null; - - /** - * @param string $parent Required. The name of the project in which the assessment is created, - * in the format `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\RecaptchaEnterprise\V1\Assessment $assessment Required. The assessment details. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\CreateAssessmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\RecaptchaEnterprise\V1\Assessment $assessment): self - { - return (new self()) - ->setParent($parent) - ->setAssessment($assessment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project in which the assessment is created, - * in the format `projects/{project}`. - * @type \Google\Cloud\RecaptchaEnterprise\V1\Assessment $assessment - * Required. The assessment details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project in which the assessment is created, - * in the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project in which the assessment is created, - * in the format `projects/{project}`. - * - * 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 assessment details. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Assessment assessment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\Assessment|null - */ - public function getAssessment() - { - return $this->assessment; - } - - public function hasAssessment() - { - return isset($this->assessment); - } - - public function clearAssessment() - { - unset($this->assessment); - } - - /** - * Required. The assessment details. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Assessment assessment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\Assessment $var - * @return $this - */ - public function setAssessment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Assessment::class); - $this->assessment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php deleted file mode 100644 index 0ffdf73d76d2..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateFirewallPolicyRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest - */ -class CreateFirewallPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project this policy applies to, in the format - * `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Information to create the policy. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $firewall_policy = null; - - /** - * @param string $parent Required. The name of the project this policy applies to, in the format - * `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy Required. Information to create the policy. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\CreateFirewallPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy): self - { - return (new self()) - ->setParent($parent) - ->setFirewallPolicy($firewallPolicy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project this policy applies to, in the format - * `projects/{project}`. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewall_policy - * Required. Information to create the policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project this policy applies to, in the format - * `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project this policy applies to, in the format - * `projects/{project}`. - * - * 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. Information to create the policy. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy|null - */ - public function getFirewallPolicy() - { - return $this->firewall_policy; - } - - public function hasFirewallPolicy() - { - return isset($this->firewall_policy); - } - - public function clearFirewallPolicy() - { - unset($this->firewall_policy); - } - - /** - * Required. Information to create the policy. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $var - * @return $this - */ - public function setFirewallPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); - $this->firewall_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php deleted file mode 100644 index 24d4ef5c9285..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/CreateKeyRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.recaptchaenterprise.v1.CreateKeyRequest - */ -class CreateKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project in which the key is created, in the - * format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Information to create a reCAPTCHA Enterprise key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = null; - - /** - * @param string $parent Required. The name of the project in which the key is created, in the - * format `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $key Required. Information to create a reCAPTCHA Enterprise key. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\CreateKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\RecaptchaEnterprise\V1\Key $key): self - { - return (new self()) - ->setParent($parent) - ->setKey($key); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project in which the key is created, in the - * format `projects/{project}`. - * @type \Google\Cloud\RecaptchaEnterprise\V1\Key $key - * Required. Information to create a reCAPTCHA Enterprise key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project in which the key is created, in the - * format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project in which the key is created, in the - * format `projects/{project}`. - * - * 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. Information to create a reCAPTCHA Enterprise key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\Key|null - */ - public function getKey() - { - return $this->key; - } - - public function hasKey() - { - return isset($this->key); - } - - public function clearKey() - { - unset($this->key); - } - - /** - * Required. Information to create a reCAPTCHA Enterprise key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Key::class); - $this->key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php deleted file mode 100644 index 8d57bd78b9bd..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteFirewallPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest - */ -class DeleteFirewallPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the policy to be deleted, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * 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 policy to be deleted, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. Please see - * {@see RecaptchaEnterpriseServiceClient::firewallPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\DeleteFirewallPolicyRequest - * - * @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 policy to be deleted, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the policy to be deleted, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * 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 policy to be deleted, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php deleted file mode 100644 index f949c7b62a31..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/DeleteKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.recaptchaenterprise.v1.DeleteKeyRequest - */ -class DeleteKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the key to be deleted, in the format - * `projects/{project}/keys/{key}`. - * - * 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 key to be deleted, in the format - * `projects/{project}/keys/{key}`. Please see - * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\DeleteKeyRequest - * - * @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 key to be deleted, in the format - * `projects/{project}/keys/{key}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the key to be deleted, in the format - * `projects/{project}/keys/{key}`. - * - * 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 key to be deleted, in the format - * `projects/{project}/keys/{key}`. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php deleted file mode 100644 index 44cd0299f8f6..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/EndpointVerificationInfo.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo - */ -class EndpointVerificationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Token to provide to the client to trigger endpoint - * verification. It must be used within 15 minutes. - * - * Generated from protobuf field string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $request_token = ''; - /** - * Output only. Timestamp of the last successful verification for the - * endpoint, if any. - * - * Generated from protobuf field .google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_verification_time = null; - protected $endpoint; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email_address - * Email address for which to trigger a verification request. - * @type string $phone_number - * Phone number for which to trigger a verification request. Should be given - * in E.164 format. - * @type string $request_token - * Output only. Token to provide to the client to trigger endpoint - * verification. It must be used within 15 minutes. - * @type \Google\Protobuf\Timestamp $last_verification_time - * Output only. Timestamp of the last successful verification for the - * endpoint, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Email address for which to trigger a verification request. - * - * Generated from protobuf field string email_address = 1; - * @return string - */ - public function getEmailAddress() - { - return $this->readOneof(1); - } - - public function hasEmailAddress() - { - return $this->hasOneof(1); - } - - /** - * Email address for which to trigger a verification request. - * - * Generated from protobuf field string email_address = 1; - * @param string $var - * @return $this - */ - public function setEmailAddress($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Phone number for which to trigger a verification request. Should be given - * in E.164 format. - * - * Generated from protobuf field string phone_number = 2; - * @return string - */ - public function getPhoneNumber() - { - return $this->readOneof(2); - } - - public function hasPhoneNumber() - { - return $this->hasOneof(2); - } - - /** - * Phone number for which to trigger a verification request. Should be given - * in E.164 format. - * - * Generated from protobuf field string phone_number = 2; - * @param string $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Output only. Token to provide to the client to trigger endpoint - * verification. It must be used within 15 minutes. - * - * Generated from protobuf field string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRequestToken() - { - return $this->request_token; - } - - /** - * Output only. Token to provide to the client to trigger endpoint - * verification. It must be used within 15 minutes. - * - * Generated from protobuf field string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRequestToken($var) - { - GPBUtil::checkString($var, True); - $this->request_token = $var; - - return $this; - } - - /** - * Output only. Timestamp of the last successful verification for the - * endpoint, if any. - * - * Generated from protobuf field .google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastVerificationTime() - { - return $this->last_verification_time; - } - - public function hasLastVerificationTime() - { - return isset($this->last_verification_time); - } - - public function clearLastVerificationTime() - { - unset($this->last_verification_time); - } - - /** - * Output only. Timestamp of the last successful verification for the - * endpoint, if any. - * - * Generated from protobuf field .google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastVerificationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_verification_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getEndpoint() - { - return $this->whichOneof("endpoint"); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php deleted file mode 100644 index bffdd6b41357..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php +++ /dev/null @@ -1,640 +0,0 @@ -google.cloud.recaptchaenterprise.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The user response token provided by the reCAPTCHA Enterprise - * client-side integration on your site. - * - * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $token = ''; - /** - * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your - * site and generate the token. - * - * Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $site_key = ''; - /** - * Optional. The user agent present in the request from the user's device - * related to this event. - * - * Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $user_agent = ''; - /** - * Optional. The IP address in the request from the user's device related to - * this event. - * - * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $user_ip_address = ''; - /** - * Optional. The expected action for this type of event. This should be the - * same action provided at token generation time on client-side platforms - * already integrated with recaptcha enterprise. - * - * Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $expected_action = ''; - /** - * Optional. Deprecated: use `user_info.account_id` instead. - * Unique stable hashed user identifier for the request. The identifier must - * be hashed using hmac-sha256 with stable secret. - * - * Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $hashed_account_id = ''; - /** - * Optional. Flag for a reCAPTCHA express request for an assessment without a - * token. If enabled, `site_key` must reference an Express site key. - * - * Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $express = false; - /** - * Optional. The URI resource the user requested that triggered an assessment. - * - * Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $requested_uri = ''; - /** - * Optional. Flag for running WAF token assessment. - * If enabled, the token must be specified, and have been created by a - * WAF-enabled key. - * - * Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $waf_token_assessment = false; - /** - * Optional. JA3 fingerprint for SSL clients. - * - * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ja3 = ''; - /** - * Optional. HTTP header information about the request. - * - * Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $headers; - /** - * Optional. Flag for enabling firewall policy config assessment. - * If this flag is enabled, the firewall policy is evaluated and a - * suggested firewall action is returned in the response. - * - * Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $firewall_policy_evaluation = false; - /** - * Optional. Data describing a payment transaction to be assessed. Sending - * this data enables reCAPTCHA Enterprise Fraud Prevention and the - * FraudPreventionAssessment component in the response. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $transaction_data = null; - /** - * Optional. Information about the user that generates this event, when they - * can be identified. They are often identified through the use of an account - * for logged-in requests or login/registration requests, or by providing user - * identifiers for guest actions like checkout. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $user_info = null; - /** - * Optional. The Fraud Prevention setting for this assessment. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $fraud_prevention = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $token - * Optional. The user response token provided by the reCAPTCHA Enterprise - * client-side integration on your site. - * @type string $site_key - * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your - * site and generate the token. - * @type string $user_agent - * Optional. The user agent present in the request from the user's device - * related to this event. - * @type string $user_ip_address - * Optional. The IP address in the request from the user's device related to - * this event. - * @type string $expected_action - * Optional. The expected action for this type of event. This should be the - * same action provided at token generation time on client-side platforms - * already integrated with recaptcha enterprise. - * @type string $hashed_account_id - * Optional. Deprecated: use `user_info.account_id` instead. - * Unique stable hashed user identifier for the request. The identifier must - * be hashed using hmac-sha256 with stable secret. - * @type bool $express - * Optional. Flag for a reCAPTCHA express request for an assessment without a - * token. If enabled, `site_key` must reference an Express site key. - * @type string $requested_uri - * Optional. The URI resource the user requested that triggered an assessment. - * @type bool $waf_token_assessment - * Optional. Flag for running WAF token assessment. - * If enabled, the token must be specified, and have been created by a - * WAF-enabled key. - * @type string $ja3 - * Optional. JA3 fingerprint for SSL clients. - * @type array|\Google\Protobuf\Internal\RepeatedField $headers - * Optional. HTTP header information about the request. - * @type bool $firewall_policy_evaluation - * Optional. Flag for enabling firewall policy config assessment. - * If this flag is enabled, the firewall policy is evaluated and a - * suggested firewall action is returned in the response. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData $transaction_data - * Optional. Data describing a payment transaction to be assessed. Sending - * this data enables reCAPTCHA Enterprise Fraud Prevention and the - * FraudPreventionAssessment component in the response. - * @type \Google\Cloud\RecaptchaEnterprise\V1\UserInfo $user_info - * Optional. Information about the user that generates this event, when they - * can be identified. They are often identified through the use of an account - * for logged-in requests or login/registration requests, or by providing user - * identifiers for guest actions like checkout. - * @type int $fraud_prevention - * Optional. The Fraud Prevention setting for this assessment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The user response token provided by the reCAPTCHA Enterprise - * client-side integration on your site. - * - * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * Optional. The user response token provided by the reCAPTCHA Enterprise - * client-side integration on your site. - * - * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - - /** - * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your - * site and generate the token. - * - * Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSiteKey() - { - return $this->site_key; - } - - /** - * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your - * site and generate the token. - * - * Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSiteKey($var) - { - GPBUtil::checkString($var, True); - $this->site_key = $var; - - return $this; - } - - /** - * Optional. The user agent present in the request from the user's device - * related to this event. - * - * Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUserAgent() - { - return $this->user_agent; - } - - /** - * Optional. The user agent present in the request from the user's device - * related to this event. - * - * Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUserAgent($var) - { - GPBUtil::checkString($var, True); - $this->user_agent = $var; - - return $this; - } - - /** - * Optional. The IP address in the request from the user's device related to - * this event. - * - * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getUserIpAddress() - { - return $this->user_ip_address; - } - - /** - * Optional. The IP address in the request from the user's device related to - * this event. - * - * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setUserIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->user_ip_address = $var; - - return $this; - } - - /** - * Optional. The expected action for this type of event. This should be the - * same action provided at token generation time on client-side platforms - * already integrated with recaptcha enterprise. - * - * Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getExpectedAction() - { - return $this->expected_action; - } - - /** - * Optional. The expected action for this type of event. This should be the - * same action provided at token generation time on client-side platforms - * already integrated with recaptcha enterprise. - * - * Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setExpectedAction($var) - { - GPBUtil::checkString($var, True); - $this->expected_action = $var; - - return $this; - } - - /** - * Optional. Deprecated: use `user_info.account_id` instead. - * Unique stable hashed user identifier for the request. The identifier must - * be hashed using hmac-sha256 with stable secret. - * - * Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getHashedAccountId() - { - @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); - return $this->hashed_account_id; - } - - /** - * Optional. Deprecated: use `user_info.account_id` instead. - * Unique stable hashed user identifier for the request. The identifier must - * be hashed using hmac-sha256 with stable secret. - * - * Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setHashedAccountId($var) - { - @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, False); - $this->hashed_account_id = $var; - - return $this; - } - - /** - * Optional. Flag for a reCAPTCHA express request for an assessment without a - * token. If enabled, `site_key` must reference an Express site key. - * - * Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getExpress() - { - return $this->express; - } - - /** - * Optional. Flag for a reCAPTCHA express request for an assessment without a - * token. If enabled, `site_key` must reference an Express site key. - * - * Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setExpress($var) - { - GPBUtil::checkBool($var); - $this->express = $var; - - return $this; - } - - /** - * Optional. The URI resource the user requested that triggered an assessment. - * - * Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestedUri() - { - return $this->requested_uri; - } - - /** - * Optional. The URI resource the user requested that triggered an assessment. - * - * Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestedUri($var) - { - GPBUtil::checkString($var, True); - $this->requested_uri = $var; - - return $this; - } - - /** - * Optional. Flag for running WAF token assessment. - * If enabled, the token must be specified, and have been created by a - * WAF-enabled key. - * - * Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getWafTokenAssessment() - { - return $this->waf_token_assessment; - } - - /** - * Optional. Flag for running WAF token assessment. - * If enabled, the token must be specified, and have been created by a - * WAF-enabled key. - * - * Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setWafTokenAssessment($var) - { - GPBUtil::checkBool($var); - $this->waf_token_assessment = $var; - - return $this; - } - - /** - * Optional. JA3 fingerprint for SSL clients. - * - * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getJa3() - { - return $this->ja3; - } - - /** - * Optional. JA3 fingerprint for SSL clients. - * - * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setJa3($var) - { - GPBUtil::checkString($var, True); - $this->ja3 = $var; - - return $this; - } - - /** - * Optional. HTTP header information about the request. - * - * Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Optional. HTTP header information about the request. - * - * Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * Optional. Flag for enabling firewall policy config assessment. - * If this flag is enabled, the firewall policy is evaluated and a - * suggested firewall action is returned in the response. - * - * Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getFirewallPolicyEvaluation() - { - return $this->firewall_policy_evaluation; - } - - /** - * Optional. Flag for enabling firewall policy config assessment. - * If this flag is enabled, the firewall policy is evaluated and a - * suggested firewall action is returned in the response. - * - * Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setFirewallPolicyEvaluation($var) - { - GPBUtil::checkBool($var); - $this->firewall_policy_evaluation = $var; - - return $this; - } - - /** - * Optional. Data describing a payment transaction to be assessed. Sending - * this data enables reCAPTCHA Enterprise Fraud Prevention and the - * FraudPreventionAssessment component in the response. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData|null - */ - public function getTransactionData() - { - return $this->transaction_data; - } - - public function hasTransactionData() - { - return isset($this->transaction_data); - } - - public function clearTransactionData() - { - unset($this->transaction_data); - } - - /** - * Optional. Data describing a payment transaction to be assessed. Sending - * this data enables reCAPTCHA Enterprise Fraud Prevention and the - * FraudPreventionAssessment component in the response. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData $var - * @return $this - */ - public function setTransactionData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData::class); - $this->transaction_data = $var; - - return $this; - } - - /** - * Optional. Information about the user that generates this event, when they - * can be identified. They are often identified through the use of an account - * for logged-in requests or login/registration requests, or by providing user - * identifiers for guest actions like checkout. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\UserInfo|null - */ - public function getUserInfo() - { - return $this->user_info; - } - - public function hasUserInfo() - { - return isset($this->user_info); - } - - public function clearUserInfo() - { - unset($this->user_info); - } - - /** - * Optional. Information about the user that generates this event, when they - * can be identified. They are often identified through the use of an account - * for logged-in requests or login/registration requests, or by providing user - * identifiers for guest actions like checkout. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\UserInfo $var - * @return $this - */ - public function setUserInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\UserInfo::class); - $this->user_info = $var; - - return $this; - } - - /** - * Optional. The Fraud Prevention setting for this assessment. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFraudPrevention() - { - return $this->fraud_prevention; - } - - /** - * Optional. The Fraud Prevention setting for this assessment. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFraudPrevention($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\Event\FraudPrevention::class); - $this->fraud_prevention = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php deleted file mode 100644 index 5650681f23e6..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event/FraudPrevention.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.recaptchaenterprise.v1.Event.FraudPrevention - */ -class FraudPrevention -{ - /** - * Default, unspecified setting. If opted in for automatic detection, - * `fraud_prevention_assessment` is returned based on the request. - * Otherwise, `fraud_prevention_assessment` is returned if - * `transaction_data` is present in the `Event` and Fraud Prevention is - * enabled in the Google Cloud console. - * - * Generated from protobuf enum FRAUD_PREVENTION_UNSPECIFIED = 0; - */ - const FRAUD_PREVENTION_UNSPECIFIED = 0; - /** - * Enable Fraud Prevention for this assessment, if Fraud Prevention is - * enabled in the Google Cloud console. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * Disable Fraud Prevention for this assessment, regardless of opt-in - * status or Google Cloud console settings. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::FRAUD_PREVENTION_UNSPECIFIED => 'FRAUD_PREVENTION_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FraudPrevention::class, \Google\Cloud\RecaptchaEnterprise\V1\Event_FraudPrevention::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php deleted file mode 100644 index 6fcd12db202c..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ExpressKeySettings.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ExpressKeySettings - */ -class ExpressKeySettings extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php deleted file mode 100644 index b5be30f5734f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallAction - */ -class FirewallAction extends \Google\Protobuf\Internal\Message -{ - protected $firewall_action_oneof; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction $allow - * The user request did not match any policy and should be allowed - * access to the requested resource. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction $block - * This action denies access to a given page. The user gets an HTTP - * error code. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction $include_recaptcha_script - * This action injects reCAPTCHA JavaScript code into the HTML page - * returned by the site backend. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction $redirect - * This action redirects the request to a reCAPTCHA interstitial to - * attach a token. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction $substitute - * This action transparently serves a different page to an offending - * user. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction $set_header - * This action sets a custom header but allow the request to continue - * to the customer backend. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * The user request did not match any policy and should be allowed - * access to the requested resource. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction|null - */ - public function getAllow() - { - return $this->readOneof(1); - } - - public function hasAllow() - { - return $this->hasOneof(1); - } - - /** - * The user request did not match any policy and should be allowed - * access to the requested resource. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction $var - * @return $this - */ - public function setAllow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\AllowAction::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * This action denies access to a given page. The user gets an HTTP - * error code. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction|null - */ - public function getBlock() - { - return $this->readOneof(2); - } - - public function hasBlock() - { - return $this->hasOneof(2); - } - - /** - * This action denies access to a given page. The user gets an HTTP - * error code. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction $var - * @return $this - */ - public function setBlock($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\BlockAction::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * This action injects reCAPTCHA JavaScript code into the HTML page - * returned by the site backend. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction include_recaptcha_script = 6; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction|null - */ - public function getIncludeRecaptchaScript() - { - return $this->readOneof(6); - } - - public function hasIncludeRecaptchaScript() - { - return $this->hasOneof(6); - } - - /** - * This action injects reCAPTCHA JavaScript code into the HTML page - * returned by the site backend. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction include_recaptcha_script = 6; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction $var - * @return $this - */ - public function setIncludeRecaptchaScript($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\IncludeRecaptchaScriptAction::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * This action redirects the request to a reCAPTCHA interstitial to - * attach a token. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction|null - */ - public function getRedirect() - { - return $this->readOneof(5); - } - - public function hasRedirect() - { - return $this->hasOneof(5); - } - - /** - * This action redirects the request to a reCAPTCHA interstitial to - * attach a token. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction $var - * @return $this - */ - public function setRedirect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * This action transparently serves a different page to an offending - * user. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction|null - */ - public function getSubstitute() - { - return $this->readOneof(3); - } - - public function hasSubstitute() - { - return $this->hasOneof(3); - } - - /** - * This action transparently serves a different page to an offending - * user. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction $var - * @return $this - */ - public function setSubstitute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * This action sets a custom header but allow the request to continue - * to the customer backend. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction|null - */ - public function getSetHeader() - { - return $this->readOneof(4); - } - - public function hasSetHeader() - { - return $this->hasOneof(4); - } - - /** - * This action sets a custom header but allow the request to continue - * to the customer backend. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction $var - * @return $this - */ - public function setSetHeader($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getFirewallActionOneof() - { - return $this->whichOneof("firewall_action_oneof"); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php deleted file mode 100644 index 20547eb88cfb..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/AllowAction.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction - */ -class AllowAction extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AllowAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_AllowAction::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php deleted file mode 100644 index a8793c63387b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/BlockAction.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction - */ -class BlockAction extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BlockAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_BlockAction::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php deleted file mode 100644 index 9c2df380e9b8..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/IncludeRecaptchaScriptAction.php +++ /dev/null @@ -1,40 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction - */ -class IncludeRecaptchaScriptAction extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncludeRecaptchaScriptAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_IncludeRecaptchaScriptAction::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php deleted file mode 100644 index 308c3b4c9f5a..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction - */ -class RedirectAction extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RedirectAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_RedirectAction::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php deleted file mode 100644 index 65d715f16ef0..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SetHeaderAction.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction - */ -class SetHeaderAction extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The header key to set in the request to the backend server. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key = ''; - /** - * Optional. The header value to set in the request to the backend server. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Optional. The header key to set in the request to the backend server. - * @type string $value - * Optional. The header value to set in the request to the backend server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The header key to set in the request to the backend server. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Optional. The header key to set in the request to the backend server. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Optional. The header value to set in the request to the backend server. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Optional. The header value to set in the request to the backend server. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SetHeaderAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_SetHeaderAction::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php deleted file mode 100644 index ed45d8090c8f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/SubstituteAction.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction - */ -class SubstituteAction extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The address to redirect to. The target is a relative path in - * the current host. Example: "/blog/404.html". - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Optional. The address to redirect to. The target is a relative path in - * the current host. Example: "/blog/404.html". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The address to redirect to. The target is a relative path in - * the current host. Example: "/blog/404.html". - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. The address to redirect to. The target is a relative path in - * the current host. Example: "/blog/404.html". - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SubstituteAction::class, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction_SubstituteAction::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php deleted file mode 100644 index a034eab27923..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicy.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallPolicy - */ -class FirewallPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for the FirewallPolicy in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. A description of what this policy aims to achieve, for - * convenience purposes. The description can at most include 256 UTF-8 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. The path for which this policy applies, specified as a glob - * pattern. For more information on glob, see the [manual - * page](https://man7.org/linux/man-pages/man7/glob.7.html). - * A path has a max length of 200 characters. - * - * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - /** - * Optional. A CEL (Common Expression Language) conditional expression that - * specifies if this policy applies to an incoming user request. If this - * condition evaluates to true and the requested path matched the path - * pattern, the associated actions should be executed by the caller. The - * condition string is checked for CEL syntax correctness on creation. For - * more information, see the [CEL spec](https://github.com/google/cel-spec) - * and its [language - * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). - * A condition has a max length of 500 characters. - * - * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $condition = ''; - /** - * Optional. The actions that the caller should take regarding user access. - * There should be at most one terminal action. A terminal action is any - * action that forces a response, such as `AllowAction`, - * `BlockAction` or `SubstituteAction`. - * Zero or more non-terminal actions such as `SetHeader` might be - * specified. A single policy can contain up to 16 actions. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $actions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for the FirewallPolicy in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * @type string $description - * Optional. A description of what this policy aims to achieve, for - * convenience purposes. The description can at most include 256 UTF-8 - * characters. - * @type string $path - * Optional. The path for which this policy applies, specified as a glob - * pattern. For more information on glob, see the [manual - * page](https://man7.org/linux/man-pages/man7/glob.7.html). - * A path has a max length of 200 characters. - * @type string $condition - * Optional. A CEL (Common Expression Language) conditional expression that - * specifies if this policy applies to an incoming user request. If this - * condition evaluates to true and the requested path matched the path - * pattern, the associated actions should be executed by the caller. The - * condition string is checked for CEL syntax correctness on creation. For - * more information, see the [CEL spec](https://github.com/google/cel-spec) - * and its [language - * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). - * A condition has a max length of 500 characters. - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallAction>|\Google\Protobuf\Internal\RepeatedField $actions - * Optional. The actions that the caller should take regarding user access. - * There should be at most one terminal action. A terminal action is any - * action that forces a response, such as `AllowAction`, - * `BlockAction` or `SubstituteAction`. - * Zero or more non-terminal actions such as `SetHeader` might be - * specified. A single policy can contain up to 16 actions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for the FirewallPolicy in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for the FirewallPolicy in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A description of what this policy aims to achieve, for - * convenience purposes. The description can at most include 256 UTF-8 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of what this policy aims to achieve, for - * convenience purposes. The description can at most include 256 UTF-8 - * 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; - } - - /** - * Optional. The path for which this policy applies, specified as a glob - * pattern. For more information on glob, see the [manual - * page](https://man7.org/linux/man-pages/man7/glob.7.html). - * A path has a max length of 200 characters. - * - * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. The path for which this policy applies, specified as a glob - * pattern. For more information on glob, see the [manual - * page](https://man7.org/linux/man-pages/man7/glob.7.html). - * A path has a max length of 200 characters. - * - * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Optional. A CEL (Common Expression Language) conditional expression that - * specifies if this policy applies to an incoming user request. If this - * condition evaluates to true and the requested path matched the path - * pattern, the associated actions should be executed by the caller. The - * condition string is checked for CEL syntax correctness on creation. For - * more information, see the [CEL spec](https://github.com/google/cel-spec) - * and its [language - * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). - * A condition has a max length of 500 characters. - * - * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * Optional. A CEL (Common Expression Language) conditional expression that - * specifies if this policy applies to an incoming user request. If this - * condition evaluates to true and the requested path matched the path - * pattern, the associated actions should be executed by the caller. The - * condition string is checked for CEL syntax correctness on creation. For - * more information, see the [CEL spec](https://github.com/google/cel-spec) - * and its [language - * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). - * A condition has a max length of 500 characters. - * - * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkString($var, True); - $this->condition = $var; - - return $this; - } - - /** - * Optional. The actions that the caller should take regarding user access. - * There should be at most one terminal action. A terminal action is any - * action that forces a response, such as `AllowAction`, - * `BlockAction` or `SubstituteAction`. - * Zero or more non-terminal actions such as `SetHeader` might be - * specified. A single policy can contain up to 16 actions. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActions() - { - return $this->actions; - } - - /** - * Optional. The actions that the caller should take regarding user access. - * There should be at most one terminal action. A terminal action is any - * action that forces a response, such as `AllowAction`, - * `BlockAction` or `SubstituteAction`. - * Zero or more non-terminal actions such as `SetHeader` might be - * specified. A single policy can contain up to 16 actions. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallAction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction::class); - $this->actions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php deleted file mode 100644 index 628b81b99597..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallPolicyAssessment.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment - */ -class FirewallPolicyAssessment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. If the processing of a policy config fails, an error is - * populated and the firewall_policy is left empty. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The policy that matched the request. If more than one policy - * may match, this is the first match. If no policy matches the incoming - * request, the policy field is left empty. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $firewall_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $error - * Output only. If the processing of a policy config fails, an error is - * populated and the firewall_policy is left empty. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewall_policy - * Output only. The policy that matched the request. If more than one policy - * may match, this is the first match. If no policy matches the incoming - * request, the policy field is left empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. If the processing of a policy config fails, an error is - * populated and the firewall_policy is left empty. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. If the processing of a policy config fails, an error is - * populated and the firewall_policy is left empty. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The policy that matched the request. If more than one policy - * may match, this is the first match. If no policy matches the incoming - * request, the policy field is left empty. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy|null - */ - public function getFirewallPolicy() - { - return $this->firewall_policy; - } - - public function hasFirewallPolicy() - { - return isset($this->firewall_policy); - } - - public function clearFirewallPolicy() - { - unset($this->firewall_policy); - } - - /** - * Output only. The policy that matched the request. If more than one policy - * may match, this is the first match. If no policy matches the incoming - * request, the policy field is left empty. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $var - * @return $this - */ - public function setFirewallPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); - $this->firewall_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php deleted file mode 100644 index 616799349e7b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment - */ -class FraudPreventionAssessment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Probability of this transaction being fraudulent. Summarizes - * the combined risk of attack vectors below. Values are from 0.0 (lowest) - * to 1.0 (highest). - * - * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transaction_risk = 0.0; - /** - * Output only. Assessment of this transaction for risk of a stolen - * instrument. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict stolen_instrument_verdict = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $stolen_instrument_verdict = null; - /** - * Output only. Assessment of this transaction for risk of being part of a - * card testing attack. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict card_testing_verdict = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $card_testing_verdict = null; - /** - * Output only. Assessment of this transaction for behavioral trust. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $behavioral_trust_verdict = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $transaction_risk - * Output only. Probability of this transaction being fraudulent. Summarizes - * the combined risk of attack vectors below. Values are from 0.0 (lowest) - * to 1.0 (highest). - * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict $stolen_instrument_verdict - * Output only. Assessment of this transaction for risk of a stolen - * instrument. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict $card_testing_verdict - * Output only. Assessment of this transaction for risk of being part of a - * card testing attack. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict $behavioral_trust_verdict - * Output only. Assessment of this transaction for behavioral trust. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Probability of this transaction being fraudulent. Summarizes - * the combined risk of attack vectors below. Values are from 0.0 (lowest) - * to 1.0 (highest). - * - * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getTransactionRisk() - { - return $this->transaction_risk; - } - - /** - * Output only. Probability of this transaction being fraudulent. Summarizes - * the combined risk of attack vectors below. Values are from 0.0 (lowest) - * to 1.0 (highest). - * - * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setTransactionRisk($var) - { - GPBUtil::checkFloat($var); - $this->transaction_risk = $var; - - return $this; - } - - /** - * Output only. Assessment of this transaction for risk of a stolen - * instrument. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict stolen_instrument_verdict = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict|null - */ - public function getStolenInstrumentVerdict() - { - return $this->stolen_instrument_verdict; - } - - public function hasStolenInstrumentVerdict() - { - return isset($this->stolen_instrument_verdict); - } - - public function clearStolenInstrumentVerdict() - { - unset($this->stolen_instrument_verdict); - } - - /** - * Output only. Assessment of this transaction for risk of a stolen - * instrument. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict stolen_instrument_verdict = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict $var - * @return $this - */ - public function setStolenInstrumentVerdict($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\StolenInstrumentVerdict::class); - $this->stolen_instrument_verdict = $var; - - return $this; - } - - /** - * Output only. Assessment of this transaction for risk of being part of a - * card testing attack. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict card_testing_verdict = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict|null - */ - public function getCardTestingVerdict() - { - return $this->card_testing_verdict; - } - - public function hasCardTestingVerdict() - { - return isset($this->card_testing_verdict); - } - - public function clearCardTestingVerdict() - { - unset($this->card_testing_verdict); - } - - /** - * Output only. Assessment of this transaction for risk of being part of a - * card testing attack. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict card_testing_verdict = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict $var - * @return $this - */ - public function setCardTestingVerdict($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict::class); - $this->card_testing_verdict = $var; - - return $this; - } - - /** - * Output only. Assessment of this transaction for behavioral trust. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict|null - */ - public function getBehavioralTrustVerdict() - { - return $this->behavioral_trust_verdict; - } - - public function hasBehavioralTrustVerdict() - { - return isset($this->behavioral_trust_verdict); - } - - public function clearBehavioralTrustVerdict() - { - unset($this->behavioral_trust_verdict); - } - - /** - * Output only. Assessment of this transaction for behavioral trust. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict $var - * @return $this - */ - public function setBehavioralTrustVerdict($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\BehavioralTrustVerdict::class); - $this->behavioral_trust_verdict = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php deleted file mode 100644 index 46e30e6ef746..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict - */ -class BehavioralTrustVerdict extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Probability of this transaction attempt being executed in a - * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 - * (highest). - * - * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $trust = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $trust - * Output only. Probability of this transaction attempt being executed in a - * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 - * (highest). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Probability of this transaction attempt being executed in a - * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 - * (highest). - * - * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getTrust() - { - return $this->trust; - } - - /** - * Output only. Probability of this transaction attempt being executed in a - * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 - * (highest). - * - * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setTrust($var) - { - GPBUtil::checkFloat($var); - $this->trust = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BehavioralTrustVerdict::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment_BehavioralTrustVerdict::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php deleted file mode 100644 index 1673fe7932b5..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/CardTestingVerdict.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict - */ -class CardTestingVerdict extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Probability of this transaction attempt being part of a card - * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $risk = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $risk - * Output only. Probability of this transaction attempt being part of a card - * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Probability of this transaction attempt being part of a card - * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getRisk() - { - return $this->risk; - } - - /** - * Output only. Probability of this transaction attempt being part of a card - * testing attack. Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setRisk($var) - { - GPBUtil::checkFloat($var); - $this->risk = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardTestingVerdict::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment_CardTestingVerdict::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php deleted file mode 100644 index b8774e74ca67..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict - */ -class StolenInstrumentVerdict extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Probability of this transaction being executed with a stolen - * instrument. Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $risk = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $risk - * Output only. Probability of this transaction being executed with a stolen - * instrument. Values are from 0.0 (lowest) to 1.0 (highest). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Probability of this transaction being executed with a stolen - * instrument. Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getRisk() - { - return $this->risk; - } - - /** - * Output only. Probability of this transaction being executed with a stolen - * instrument. Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setRisk($var) - { - GPBUtil::checkFloat($var); - $this->risk = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StolenInstrumentVerdict::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment_StolenInstrumentVerdict::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php deleted file mode 100644 index aba0ccfcd4bb..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudSignals - */ -class FraudSignals extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Signals describing the end user in this transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $user_signals = null; - /** - * Output only. Signals describing the payment card or cards used in this - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $card_signals = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals $user_signals - * Output only. Signals describing the end user in this transaction. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals $card_signals - * Output only. Signals describing the payment card or cards used in this - * transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Signals describing the end user in this transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals|null - */ - public function getUserSignals() - { - return $this->user_signals; - } - - public function hasUserSignals() - { - return isset($this->user_signals); - } - - public function clearUserSignals() - { - unset($this->user_signals); - } - - /** - * Output only. Signals describing the end user in this transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals $var - * @return $this - */ - public function setUserSignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\UserSignals::class); - $this->user_signals = $var; - - return $this; - } - - /** - * Output only. Signals describing the payment card or cards used in this - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals|null - */ - public function getCardSignals() - { - return $this->card_signals; - } - - public function hasCardSignals() - { - return isset($this->card_signals); - } - - public function clearCardSignals() - { - unset($this->card_signals); - } - - /** - * Output only. Signals describing the payment card or cards used in this - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals $var - * @return $this - */ - public function setCardSignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals::class); - $this->card_signals = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php deleted file mode 100644 index 1c6e40b18d82..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals - */ -class CardSignals extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The labels for the payment card in this transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $card_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $card_labels - * Output only. The labels for the payment card in this transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The labels for the payment card in this transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCardLabels() - { - return $this->card_labels; - } - - /** - * Output only. The labels for the payment card in this transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCardLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals\CardSignals\CardLabel::class); - $this->card_labels = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardSignals::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals_CardSignals::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php deleted file mode 100644 index e3e8e94649f8..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/CardSignals/CardLabel.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel - */ -class CardLabel -{ - /** - * No label specified. - * - * Generated from protobuf enum CARD_LABEL_UNSPECIFIED = 0; - */ - const CARD_LABEL_UNSPECIFIED = 0; - /** - * This card has been detected as prepaid. - * - * Generated from protobuf enum PREPAID = 1; - */ - const PREPAID = 1; - /** - * This card has been detected as virtual, such as a card number generated - * for a single transaction or merchant. - * - * Generated from protobuf enum VIRTUAL = 2; - */ - const VIRTUAL = 2; - /** - * This card has been detected as being used in an unexpected geographic - * location. - * - * Generated from protobuf enum UNEXPECTED_LOCATION = 3; - */ - const UNEXPECTED_LOCATION = 3; - - private static $valueToName = [ - self::CARD_LABEL_UNSPECIFIED => 'CARD_LABEL_UNSPECIFIED', - self::PREPAID => 'PREPAID', - self::VIRTUAL => 'VIRTUAL', - self::UNEXPECTED_LOCATION => 'UNEXPECTED_LOCATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardLabel::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals_CardSignals_CardLabel::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php deleted file mode 100644 index 2d8305d3bd61..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FraudSignals/UserSignals.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals - */ -class UserSignals extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. This user (based on email, phone, and other identifiers) has - * been seen on the internet for at least this number of days. - * - * Generated from protobuf field int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $active_days_lower_bound = 0; - /** - * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic - * components in their identity, such as a randomly generated email address, - * temporary phone number, or fake shipping address. - * - * Generated from protobuf field float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $synthetic_risk = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $active_days_lower_bound - * Output only. This user (based on email, phone, and other identifiers) has - * been seen on the internet for at least this number of days. - * @type float $synthetic_risk - * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic - * components in their identity, such as a randomly generated email address, - * temporary phone number, or fake shipping address. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. This user (based on email, phone, and other identifiers) has - * been seen on the internet for at least this number of days. - * - * Generated from protobuf field int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getActiveDaysLowerBound() - { - return $this->active_days_lower_bound; - } - - /** - * Output only. This user (based on email, phone, and other identifiers) has - * been seen on the internet for at least this number of days. - * - * Generated from protobuf field int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setActiveDaysLowerBound($var) - { - GPBUtil::checkInt32($var); - $this->active_days_lower_bound = $var; - - return $this; - } - - /** - * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic - * components in their identity, such as a randomly generated email address, - * temporary phone number, or fake shipping address. - * - * Generated from protobuf field float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getSyntheticRisk() - { - return $this->synthetic_risk; - } - - /** - * Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic - * components in their identity, such as a randomly generated email address, - * temporary phone number, or fake shipping address. - * - * Generated from protobuf field float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setSyntheticRisk($var) - { - GPBUtil::checkFloat($var); - $this->synthetic_risk = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UserSignals::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals_UserSignals::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php deleted file mode 100644 index e5a80411e06a..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetFirewallPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest - */ -class GetFirewallPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the requested policy, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * 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 requested policy, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. Please see - * {@see RecaptchaEnterpriseServiceClient::firewallPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\GetFirewallPolicyRequest - * - * @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 requested policy, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the requested policy, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * 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 requested policy, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php deleted file mode 100644 index 741076d93558..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.recaptchaenterprise.v1.GetKeyRequest - */ -class GetKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the requested key, in the format - * `projects/{project}/keys/{key}`. - * - * 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 requested key, in the format - * `projects/{project}/keys/{key}`. Please see - * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\GetKeyRequest - * - * @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 requested key, in the format - * `projects/{project}/keys/{key}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the requested key, in the format - * `projects/{project}/keys/{key}`. - * - * 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 requested key, in the format - * `projects/{project}/keys/{key}`. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php deleted file mode 100644 index 495178abf209..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/GetMetricsRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.recaptchaenterprise.v1.GetMetricsRequest - */ -class GetMetricsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the requested metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * 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 requested metrics, in the format - * `projects/{project}/keys/{key}/metrics`. Please see - * {@see RecaptchaEnterpriseServiceClient::metricsName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\GetMetricsRequest - * - * @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 requested metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the requested metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * 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 requested metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php deleted file mode 100644 index 85d11376701d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IOSKeySettings.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.recaptchaenterprise.v1.IOSKeySettings - */ -class IOSKeySettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If set to true, allowed_bundle_ids are not enforced. - * - * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_all_bundle_ids = false; - /** - * Optional. iOS bundle ids of apps allowed to use the key. - * Example: 'com.companyname.productname.appname' - * - * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $allowed_bundle_ids; - /** - * Optional. Apple Developer account details for the app that is protected by - * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple - * App Attest and Apple DeviceCheck to protect your app from abuse. Providing - * these fields allows reCAPTCHA to get a better assessment of the integrity - * of your app. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $apple_developer_id = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $allow_all_bundle_ids - * Optional. If set to true, allowed_bundle_ids are not enforced. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_bundle_ids - * Optional. iOS bundle ids of apps allowed to use the key. - * Example: 'com.companyname.productname.appname' - * @type \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId $apple_developer_id - * Optional. Apple Developer account details for the app that is protected by - * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple - * App Attest and Apple DeviceCheck to protect your app from abuse. Providing - * these fields allows reCAPTCHA to get a better assessment of the integrity - * of your app. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set to true, allowed_bundle_ids are not enforced. - * - * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowAllBundleIds() - { - return $this->allow_all_bundle_ids; - } - - /** - * Optional. If set to true, allowed_bundle_ids are not enforced. - * - * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowAllBundleIds($var) - { - GPBUtil::checkBool($var); - $this->allow_all_bundle_ids = $var; - - return $this; - } - - /** - * Optional. iOS bundle ids of apps allowed to use the key. - * Example: 'com.companyname.productname.appname' - * - * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedBundleIds() - { - return $this->allowed_bundle_ids; - } - - /** - * Optional. iOS bundle ids of apps allowed to use the key. - * Example: 'com.companyname.productname.appname' - * - * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedBundleIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_bundle_ids = $arr; - - return $this; - } - - /** - * Optional. Apple Developer account details for the app that is protected by - * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple - * App Attest and Apple DeviceCheck to protect your app from abuse. Providing - * these fields allows reCAPTCHA to get a better assessment of the integrity - * of your app. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId|null - */ - public function getAppleDeveloperId() - { - return $this->apple_developer_id; - } - - public function hasAppleDeveloperId() - { - return isset($this->apple_developer_id); - } - - public function clearAppleDeveloperId() - { - unset($this->apple_developer_id); - } - - /** - * Optional. Apple Developer account details for the app that is protected by - * the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple - * App Attest and Apple DeviceCheck to protect your app from abuse. Providing - * these fields allows reCAPTCHA to get a better assessment of the integrity - * of your app. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId $var - * @return $this - */ - public function setAppleDeveloperId($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AppleDeveloperId::class); - $this->apple_developer_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php deleted file mode 100644 index 0a6c440ab298..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.recaptchaenterprise.v1.IpOverrideData - */ -class IpOverrideData extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The IP address to override (can be IPv4, IPv6 or CIDR). - * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. - * The IP override must be a public IP address. - * Example of IPv4: 168.192.5.6 - * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B - * Example of IPv4 with CIDR: 168.192.5.0/24 - * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 - * - * Generated from protobuf field string ip = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - */ - protected $ip = ''; - /** - * Required. Describes the type of IP override. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType override_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $override_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip - * Required. The IP address to override (can be IPv4, IPv6 or CIDR). - * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. - * The IP override must be a public IP address. - * Example of IPv4: 168.192.5.6 - * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B - * Example of IPv4 with CIDR: 168.192.5.0/24 - * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 - * @type int $override_type - * Required. Describes the type of IP override. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The IP address to override (can be IPv4, IPv6 or CIDR). - * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. - * The IP override must be a public IP address. - * Example of IPv4: 168.192.5.6 - * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B - * Example of IPv4 with CIDR: 168.192.5.0/24 - * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 - * - * Generated from protobuf field string ip = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @return string - */ - public function getIp() - { - return $this->ip; - } - - /** - * Required. The IP address to override (can be IPv4, IPv6 or CIDR). - * The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. - * The IP override must be a public IP address. - * Example of IPv4: 168.192.5.6 - * Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B - * Example of IPv4 with CIDR: 168.192.5.0/24 - * Example of IPv6 with CIDR: 2001:0DB8:1234::/48 - * - * Generated from protobuf field string ip = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIp($var) - { - GPBUtil::checkString($var, True); - $this->ip = $var; - - return $this; - } - - /** - * Required. Describes the type of IP override. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType override_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getOverrideType() - { - return $this->override_type; - } - - /** - * Required. Describes the type of IP override. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType override_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setOverrideType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData\OverrideType::class); - $this->override_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php deleted file mode 100644 index f14e440d9c4b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/IpOverrideData/OverrideType.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType - */ -class OverrideType -{ - /** - * Default override type that indicates this enum hasn't been specified. - * - * Generated from protobuf enum OVERRIDE_TYPE_UNSPECIFIED = 0; - */ - const OVERRIDE_TYPE_UNSPECIFIED = 0; - /** - * Allowlist the IP address; i.e. give a `risk_analysis.score` of 0.9 for - * all valid assessments. - * - * Generated from protobuf enum ALLOW = 1; - */ - const ALLOW = 1; - - private static $valueToName = [ - self::OVERRIDE_TYPE_UNSPECIFIED => 'OVERRIDE_TYPE_UNSPECIFIED', - self::ALLOW => 'ALLOW', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OverrideType::class, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData_OverrideType::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php deleted file mode 100644 index 0f900489ad42..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php +++ /dev/null @@ -1,417 +0,0 @@ -google.cloud.recaptchaenterprise.v1.Key - */ -class Key extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for the Key in the format - * `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. Human-readable display name of this key. Modifiable by user. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. See [Creating and managing labels] - * (https://cloud.google.com/recaptcha/docs/labels). - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. The timestamp corresponding to the creation of this key. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Optional. Options for user acceptance testing. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $testing_options = null; - /** - * Optional. Settings for WAF - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $waf_settings = null; - protected $platform_settings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for the Key in the format - * `projects/{project}/keys/{key}`. - * @type string $display_name - * Required. Human-readable display name of this key. Modifiable by user. - * @type \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings $web_settings - * Settings for keys that can be used by websites. - * @type \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings $android_settings - * Settings for keys that can be used by Android apps. - * @type \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings $ios_settings - * Settings for keys that can be used by iOS apps. - * @type \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings $express_settings - * Settings for keys that can be used by reCAPTCHA Express. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. See [Creating and managing labels] - * (https://cloud.google.com/recaptcha/docs/labels). - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp corresponding to the creation of this key. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions $testing_options - * Optional. Options for user acceptance testing. - * @type \Google\Cloud\RecaptchaEnterprise\V1\WafSettings $waf_settings - * Optional. Settings for WAF - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for the Key in the format - * `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for the Key in the format - * `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Human-readable display name of this key. Modifiable by user. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Human-readable display name of this key. Modifiable by user. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Settings for keys that can be used by websites. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3; - * @return \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings|null - */ - public function getWebSettings() - { - return $this->readOneof(3); - } - - public function hasWebSettings() - { - return $this->hasOneof(3); - } - - /** - * Settings for keys that can be used by websites. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3; - * @param \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings $var - * @return $this - */ - public function setWebSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Settings for keys that can be used by Android apps. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4; - * @return \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings|null - */ - public function getAndroidSettings() - { - return $this->readOneof(4); - } - - public function hasAndroidSettings() - { - return $this->hasOneof(4); - } - - /** - * Settings for keys that can be used by Android apps. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4; - * @param \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings $var - * @return $this - */ - public function setAndroidSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\AndroidKeySettings::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Settings for keys that can be used by iOS apps. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5; - * @return \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings|null - */ - public function getIosSettings() - { - return $this->readOneof(5); - } - - public function hasIosSettings() - { - return $this->hasOneof(5); - } - - /** - * Settings for keys that can be used by iOS apps. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5; - * @param \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings $var - * @return $this - */ - public function setIosSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Settings for keys that can be used by reCAPTCHA Express. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ExpressKeySettings express_settings = 11; - * @return \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings|null - */ - public function getExpressSettings() - { - return $this->readOneof(11); - } - - public function hasExpressSettings() - { - return $this->hasOneof(11); - } - - /** - * Settings for keys that can be used by reCAPTCHA Express. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ExpressKeySettings express_settings = 11; - * @param \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings $var - * @return $this - */ - public function setExpressSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\ExpressKeySettings::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Optional. See [Creating and managing labels] - * (https://cloud.google.com/recaptcha/docs/labels). - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. See [Creating and managing labels] - * (https://cloud.google.com/recaptcha/docs/labels). - * - * Generated from protobuf field map labels = 6 [(.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. The timestamp corresponding to the creation of this key. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp corresponding to the creation of this key. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Optional. Options for user acceptance testing. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions|null - */ - public function getTestingOptions() - { - return $this->testing_options; - } - - public function hasTestingOptions() - { - return isset($this->testing_options); - } - - public function clearTestingOptions() - { - unset($this->testing_options); - } - - /** - * Optional. Options for user acceptance testing. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions $var - * @return $this - */ - public function setTestingOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions::class); - $this->testing_options = $var; - - return $this; - } - - /** - * Optional. Settings for WAF - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\WafSettings|null - */ - public function getWafSettings() - { - return $this->waf_settings; - } - - public function hasWafSettings() - { - return isset($this->waf_settings); - } - - public function clearWafSettings() - { - unset($this->waf_settings); - } - - /** - * Optional. Settings for WAF - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\WafSettings $var - * @return $this - */ - public function setWafSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings::class); - $this->waf_settings = $var; - - return $this; - } - - /** - * @return string - */ - public function getPlatformSettings() - { - return $this->whichOneof("platform_settings"); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php deleted file mode 100644 index 4fdc8e041b4c..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest - */ -class ListFirewallPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of policies to return. Default is 10. Max - * limit is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous. - * ListFirewallPoliciesRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the project to list the policies for, in the format - * `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\ListFirewallPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * @type int $page_size - * Optional. The maximum number of policies to return. Default is 10. Max - * limit is 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous. - * ListFirewallPoliciesRequest, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of policies to return. Default is 10. Max - * limit is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of policies to return. Default is 10. Max - * limit is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous. - * ListFirewallPoliciesRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous. - * ListFirewallPoliciesRequest, if any. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php deleted file mode 100644 index 0abe284f4f3d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListFirewallPoliciesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse - */ -class ListFirewallPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Policy details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; - */ - private $firewall_policies; - /** - * Token to retrieve the next page of results. It is set to empty if no - * policies remain in results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy>|\Google\Protobuf\Internal\RepeatedField $firewall_policies - * Policy details. - * @type string $next_page_token - * Token to retrieve the next page of results. It is set to empty if no - * policies remain in results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Policy details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFirewallPolicies() - { - return $this->firewall_policies; - } - - /** - * Policy details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFirewallPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); - $this->firewall_policies = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results. It is set to empty if no - * policies remain in results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results. It is set to empty if no - * policies remain in results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php deleted file mode 100644 index 52134e04752e..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest - */ -class ListIpOverridesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent key for which the IP overrides are listed, in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of overrides to return. Default is 10. Max - * limit is 100. If the number of overrides is less than the page_size, all - * overrides are returned. If the page size is more than 100, it is coerced to - * 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous - * ListIpOverridesRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent key for which the IP overrides are listed, in the - * format `projects/{project}/keys/{key}`. Please see - * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\ListIpOverridesRequest - * - * @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 key for which the IP overrides are listed, in the - * format `projects/{project}/keys/{key}`. - * @type int $page_size - * Optional. The maximum number of overrides to return. Default is 10. Max - * limit is 100. If the number of overrides is less than the page_size, all - * overrides are returned. If the page size is more than 100, it is coerced to - * 100. - * @type string $page_token - * Optional. The next_page_token value returned from a previous - * ListIpOverridesRequest, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent key for which the IP overrides are listed, in the - * format `projects/{project}/keys/{key}`. - * - * 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 key for which the IP overrides are listed, in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of overrides to return. Default is 10. Max - * limit is 100. If the number of overrides is less than the page_size, all - * overrides are returned. If the page size is more than 100, it is coerced to - * 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of overrides to return. Default is 10. Max - * limit is 100. If the number of overrides is less than the page_size, all - * overrides are returned. If the page size is more than 100, it is coerced to - * 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous - * ListIpOverridesRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous - * ListIpOverridesRequest, if any. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php deleted file mode 100644 index 490069fb86c2..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListIpOverridesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse - */ -class ListIpOverridesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * IP Overrides details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_overrides = 1; - */ - private $ip_overrides; - /** - * Token to retrieve the next page of results. If this field is empty, no keys - * remain in the results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData>|\Google\Protobuf\Internal\RepeatedField $ip_overrides - * IP Overrides details. - * @type string $next_page_token - * Token to retrieve the next page of results. If this field is empty, no keys - * remain in the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * IP Overrides details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_overrides = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpOverrides() - { - return $this->ip_overrides; - } - - /** - * IP Overrides details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_overrides = 1; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData::class); - $this->ip_overrides = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results. If this field is empty, no keys - * remain in the results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results. If this field is empty, no keys - * remain in the results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php deleted file mode 100644 index f726c8ae2c4f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListKeysRequest - */ -class ListKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project that contains the keys that is - * listed, in the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of keys to return. Default is 10. Max limit is - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous. - * ListKeysRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the project that contains the keys that is - * listed, in the format `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\ListKeysRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project that contains the keys that is - * listed, in the format `projects/{project}`. - * @type int $page_size - * Optional. The maximum number of keys to return. Default is 10. Max limit is - * 1000. - * @type string $page_token - * Optional. The next_page_token value returned from a previous. - * ListKeysRequest, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project that contains the keys that is - * listed, in the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project that contains the keys that is - * listed, in the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of keys to return. Default is 10. Max limit is - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of keys to return. Default is 10. Max limit is - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous. - * ListKeysRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous. - * ListKeysRequest, if any. - * - * 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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php deleted file mode 100644 index 1041b3d7ebd6..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListKeysResponse - */ -class ListKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Key details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.Key keys = 1; - */ - private $keys; - /** - * Token to retrieve the next page of results. It is set to empty if no keys - * remain in results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\Key>|\Google\Protobuf\Internal\RepeatedField $keys - * Key details. - * @type string $next_page_token - * Token to retrieve the next page of results. It is set to empty if no keys - * remain in results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Key details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.Key keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKeys() - { - return $this->keys; - } - - /** - * Key details. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.Key keys = 1; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\Key>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\Key::class); - $this->keys = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results. It is set to empty if no keys - * remain in results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results. It is set to empty if no keys - * remain in results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php deleted file mode 100644 index 236874e5076e..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest - */ -class ListRelatedAccountGroupMembershipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the related account group in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of accounts to return. The service might - * return fewer than this value. If unspecified, at most 50 accounts are - * returned. The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous - * `ListRelatedAccountGroupMemberships` call. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroupMemberships` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name for the related account group in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. Please see - * {@see RecaptchaEnterpriseServiceClient::relatedAccountGroupName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupMembershipsRequest - * - * @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 resource name for the related account group in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. - * @type int $page_size - * Optional. The maximum number of accounts to return. The service might - * return fewer than this value. If unspecified, at most 50 accounts are - * returned. The maximum value is 1000; values above 1000 are coerced to 1000. - * @type string $page_token - * Optional. A page token, received from a previous - * `ListRelatedAccountGroupMemberships` call. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroupMemberships` must match the call that provided the - * page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the related account group in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. - * - * 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 resource name for the related account group in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of accounts to return. The service might - * return fewer than this value. If unspecified, at most 50 accounts are - * returned. The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of accounts to return. The service might - * return fewer than this value. If unspecified, at most 50 accounts are - * returned. The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous - * `ListRelatedAccountGroupMemberships` call. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroupMemberships` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous - * `ListRelatedAccountGroupMemberships` call. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroupMemberships` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php deleted file mode 100644 index 893785ab4656..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupMembershipsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse - */ -class ListRelatedAccountGroupMembershipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The memberships listed by the query. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; - */ - private $related_account_group_memberships; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $related_account_group_memberships - * The memberships listed by the query. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * The memberships listed by the query. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedAccountGroupMemberships() - { - return $this->related_account_group_memberships; - } - - /** - * The memberships listed by the query. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedAccountGroupMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership::class); - $this->related_account_group_memberships = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php deleted file mode 100644 index b9bd3de3314f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest - */ -class ListRelatedAccountGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project to list related account groups from, in - * the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListRelatedAccountGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroups` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the project to list related account groups from, in - * the format `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project to list related account groups from, in - * the format `projects/{project}`. - * @type int $page_size - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * @type string $page_token - * Optional. A page token, received from a previous `ListRelatedAccountGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroups` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project to list related account groups from, in - * the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project to list related account groups from, in - * the format `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListRelatedAccountGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroups` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListRelatedAccountGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRelatedAccountGroups` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php deleted file mode 100644 index eabc47329cd6..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListRelatedAccountGroupsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse - */ -class ListRelatedAccountGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The groups of related accounts listed by the query. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroup related_account_groups = 1; - */ - private $related_account_groups; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroup>|\Google\Protobuf\Internal\RepeatedField $related_account_groups - * The groups of related accounts listed by the query. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * The groups of related accounts listed by the query. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroup related_account_groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedAccountGroups() - { - return $this->related_account_groups; - } - - /** - * The groups of related accounts listed by the query. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroup related_account_groups = 1; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedAccountGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroup::class); - $this->related_account_groups = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php deleted file mode 100644 index c0e9c3eb5ca7..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Metrics.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.recaptchaenterprise.v1.Metrics - */ -class Metrics extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The name of the metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Inclusive start time aligned to a day (UTC). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Metrics are continuous and in order by dates, and in the granularity - * of day. All Key types should have score-based data. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ScoreMetrics score_metrics = 2; - */ - private $score_metrics; - /** - * Metrics are continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have - * challenge-based data. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ChallengeMetrics challenge_metrics = 3; - */ - private $challenge_metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The name of the metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * @type \Google\Protobuf\Timestamp $start_time - * Inclusive start time aligned to a day (UTC). - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\ScoreMetrics>|\Google\Protobuf\Internal\RepeatedField $score_metrics - * Metrics are continuous and in order by dates, and in the granularity - * of day. All Key types should have score-based data. - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\ChallengeMetrics>|\Google\Protobuf\Internal\RepeatedField $challenge_metrics - * Metrics are continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have - * challenge-based data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The name of the metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. The name of the metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Inclusive start time aligned to a day (UTC). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Inclusive start time aligned to a day (UTC). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Metrics are continuous and in order by dates, and in the granularity - * of day. All Key types should have score-based data. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ScoreMetrics score_metrics = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScoreMetrics() - { - return $this->score_metrics; - } - - /** - * Metrics are continuous and in order by dates, and in the granularity - * of day. All Key types should have score-based data. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ScoreMetrics score_metrics = 2; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\ScoreMetrics>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScoreMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\ScoreMetrics::class); - $this->score_metrics = $arr; - - return $this; - } - - /** - * Metrics are continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have - * challenge-based data. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ChallengeMetrics challenge_metrics = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChallengeMetrics() - { - return $this->challenge_metrics; - } - - /** - * Metrics are continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have - * challenge-based data. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.ChallengeMetrics challenge_metrics = 3; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\ChallengeMetrics>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChallengeMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\ChallengeMetrics::class); - $this->challenge_metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php deleted file mode 100644 index 3f952ea02cc9..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/MigrateKeyRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.recaptchaenterprise.v1.MigrateKeyRequest - */ -class MigrateKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the key to be migrated, in the format - * `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If true, skips the billing check. - * A reCAPTCHA Enterprise key or migrated key behaves differently than a - * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see - * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid - * any disruption of your usage, we check that a billing account is present. - * If your usage of reCAPTCHA is under the free quota, you can safely skip the - * billing check and proceed with the migration. See - * https://cloud.google.com/recaptcha/docs/billing-information. - * - * Generated from protobuf field bool skip_billing_check = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $skip_billing_check = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the key to be migrated, in the format - * `projects/{project}/keys/{key}`. - * @type bool $skip_billing_check - * Optional. If true, skips the billing check. - * A reCAPTCHA Enterprise key or migrated key behaves differently than a - * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see - * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid - * any disruption of your usage, we check that a billing account is present. - * If your usage of reCAPTCHA is under the free quota, you can safely skip the - * billing check and proceed with the migration. See - * https://cloud.google.com/recaptcha/docs/billing-information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the key to be migrated, in the format - * `projects/{project}/keys/{key}`. - * - * 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 key to be migrated, in the format - * `projects/{project}/keys/{key}`. - * - * 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 true, skips the billing check. - * A reCAPTCHA Enterprise key or migrated key behaves differently than a - * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see - * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid - * any disruption of your usage, we check that a billing account is present. - * If your usage of reCAPTCHA is under the free quota, you can safely skip the - * billing check and proceed with the migration. See - * https://cloud.google.com/recaptcha/docs/billing-information. - * - * Generated from protobuf field bool skip_billing_check = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSkipBillingCheck() - { - return $this->skip_billing_check; - } - - /** - * Optional. If true, skips the billing check. - * A reCAPTCHA Enterprise key or migrated key behaves differently than a - * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see - * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid - * any disruption of your usage, we check that a billing account is present. - * If your usage of reCAPTCHA is under the free quota, you can safely skip the - * billing check and proceed with the migration. See - * https://cloud.google.com/recaptcha/docs/billing-information. - * - * Generated from protobuf field bool skip_billing_check = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSkipBillingCheck($var) - { - GPBUtil::checkBool($var); - $this->skip_billing_check = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php deleted file mode 100644 index 40d0697b61f6..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PhoneFraudAssessment.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment - */ -class PhoneFraudAssessment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Assessment of this phone event for risk of SMS toll fraud. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict sms_toll_fraud_verdict = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sms_toll_fraud_verdict = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict $sms_toll_fraud_verdict - * Output only. Assessment of this phone event for risk of SMS toll fraud. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Assessment of this phone event for risk of SMS toll fraud. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict sms_toll_fraud_verdict = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict|null - */ - public function getSmsTollFraudVerdict() - { - return $this->sms_toll_fraud_verdict; - } - - public function hasSmsTollFraudVerdict() - { - return isset($this->sms_toll_fraud_verdict); - } - - public function clearSmsTollFraudVerdict() - { - unset($this->sms_toll_fraud_verdict); - } - - /** - * Output only. Assessment of this phone event for risk of SMS toll fraud. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict sms_toll_fraud_verdict = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict $var - * @return $this - */ - public function setSmsTollFraudVerdict($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict::class); - $this->sms_toll_fraud_verdict = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php deleted file mode 100644 index f753cd4aff26..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/PrivatePasswordLeakVerification.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification - */ -class PrivatePasswordLeakVerification extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized - * username. It is used to look up password leaks associated with that hash - * prefix. - * - * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lookup_hash_prefix = ''; - /** - * Optional. Encrypted Scrypt hash of the canonicalized username+password. It - * is re-encrypted by the server and returned through - * `reencrypted_user_credentials_hash`. - * - * Generated from protobuf field bytes encrypted_user_credentials_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encrypted_user_credentials_hash = ''; - /** - * Output only. List of prefixes of the encrypted potential password leaks - * that matched the given parameters. They must be compared with the - * client-side decryption prefix of `reencrypted_user_credentials_hash` - * - * Generated from protobuf field repeated bytes encrypted_leak_match_prefixes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $encrypted_leak_match_prefixes; - /** - * Output only. Corresponds to the re-encryption of the - * `encrypted_user_credentials_hash` field. It is used to match potential - * password leaks within `encrypted_leak_match_prefixes`. - * - * Generated from protobuf field bytes reencrypted_user_credentials_hash = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reencrypted_user_credentials_hash = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $lookup_hash_prefix - * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized - * username. It is used to look up password leaks associated with that hash - * prefix. - * @type string $encrypted_user_credentials_hash - * Optional. Encrypted Scrypt hash of the canonicalized username+password. It - * is re-encrypted by the server and returned through - * `reencrypted_user_credentials_hash`. - * @type array|\Google\Protobuf\Internal\RepeatedField $encrypted_leak_match_prefixes - * Output only. List of prefixes of the encrypted potential password leaks - * that matched the given parameters. They must be compared with the - * client-side decryption prefix of `reencrypted_user_credentials_hash` - * @type string $reencrypted_user_credentials_hash - * Output only. Corresponds to the re-encryption of the - * `encrypted_user_credentials_hash` field. It is used to match potential - * password leaks within `encrypted_leak_match_prefixes`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized - * username. It is used to look up password leaks associated with that hash - * prefix. - * - * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLookupHashPrefix() - { - return $this->lookup_hash_prefix; - } - - /** - * Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized - * username. It is used to look up password leaks associated with that hash - * prefix. - * - * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLookupHashPrefix($var) - { - GPBUtil::checkString($var, False); - $this->lookup_hash_prefix = $var; - - return $this; - } - - /** - * Optional. Encrypted Scrypt hash of the canonicalized username+password. It - * is re-encrypted by the server and returned through - * `reencrypted_user_credentials_hash`. - * - * Generated from protobuf field bytes encrypted_user_credentials_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncryptedUserCredentialsHash() - { - return $this->encrypted_user_credentials_hash; - } - - /** - * Optional. Encrypted Scrypt hash of the canonicalized username+password. It - * is re-encrypted by the server and returned through - * `reencrypted_user_credentials_hash`. - * - * Generated from protobuf field bytes encrypted_user_credentials_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncryptedUserCredentialsHash($var) - { - GPBUtil::checkString($var, False); - $this->encrypted_user_credentials_hash = $var; - - return $this; - } - - /** - * Output only. List of prefixes of the encrypted potential password leaks - * that matched the given parameters. They must be compared with the - * client-side decryption prefix of `reencrypted_user_credentials_hash` - * - * Generated from protobuf field repeated bytes encrypted_leak_match_prefixes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEncryptedLeakMatchPrefixes() - { - return $this->encrypted_leak_match_prefixes; - } - - /** - * Output only. List of prefixes of the encrypted potential password leaks - * that matched the given parameters. They must be compared with the - * client-side decryption prefix of `reencrypted_user_credentials_hash` - * - * Generated from protobuf field repeated bytes encrypted_leak_match_prefixes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEncryptedLeakMatchPrefixes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->encrypted_leak_match_prefixes = $arr; - - return $this; - } - - /** - * Output only. Corresponds to the re-encryption of the - * `encrypted_user_credentials_hash` field. It is used to match potential - * password leaks within `encrypted_leak_match_prefixes`. - * - * Generated from protobuf field bytes reencrypted_user_credentials_hash = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getReencryptedUserCredentialsHash() - { - return $this->reencrypted_user_credentials_hash; - } - - /** - * Output only. Corresponds to the re-encryption of the - * `encrypted_user_credentials_hash` field. It is used to match potential - * password leaks within `encrypted_leak_match_prefixes`. - * - * Generated from protobuf field bytes reencrypted_user_credentials_hash = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setReencryptedUserCredentialsHash($var) - { - GPBUtil::checkString($var, False); - $this->reencrypted_user_credentials_hash = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php deleted file mode 100644 index 29c2020bed64..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RelatedAccountGroup - */ -class RelatedAccountGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier. The resource name for the related account group in - * the format - * `projects/{project}/relatedaccountgroups/{related_account_group}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Identifier. The resource name for the related account group in - * the format - * `projects/{project}/relatedaccountgroups/{related_account_group}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier. The resource name for the related account group in - * the format - * `projects/{project}/relatedaccountgroups/{related_account_group}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Identifier. The resource name for the related account group in - * the format - * `projects/{project}/relatedaccountgroups/{related_account_group}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php deleted file mode 100644 index e766bb4b5ade..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership - */ -class RelatedAccountGroupMembership extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier. The resource name for this membership in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The unique stable account identifier of the member. The identifier - * corresponds to an `account_id` provided in a previous `CreateAssessment` or - * `AnnotateAssessment` call. - * - * Generated from protobuf field string account_id = 4; - */ - protected $account_id = ''; - /** - * Deprecated: use `account_id` instead. - * The unique stable hashed account identifier of the member. The identifier - * corresponds to a `hashed_account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. - * - * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true]; - * @deprecated - */ - protected $hashed_account_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Identifier. The resource name for this membership in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. - * @type string $account_id - * The unique stable account identifier of the member. The identifier - * corresponds to an `account_id` provided in a previous `CreateAssessment` or - * `AnnotateAssessment` call. - * @type string $hashed_account_id - * Deprecated: use `account_id` instead. - * The unique stable hashed account identifier of the member. The identifier - * corresponds to a `hashed_account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier. The resource name for this membership in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Identifier. The resource name for this membership in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The unique stable account identifier of the member. The identifier - * corresponds to an `account_id` provided in a previous `CreateAssessment` or - * `AnnotateAssessment` call. - * - * Generated from protobuf field string account_id = 4; - * @return string - */ - public function getAccountId() - { - return $this->account_id; - } - - /** - * The unique stable account identifier of the member. The identifier - * corresponds to an `account_id` provided in a previous `CreateAssessment` or - * `AnnotateAssessment` call. - * - * Generated from protobuf field string account_id = 4; - * @param string $var - * @return $this - */ - public function setAccountId($var) - { - GPBUtil::checkString($var, True); - $this->account_id = $var; - - return $this; - } - - /** - * Deprecated: use `account_id` instead. - * The unique stable hashed account identifier of the member. The identifier - * corresponds to a `hashed_account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. - * - * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getHashedAccountId() - { - @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); - return $this->hashed_account_id; - } - - /** - * Deprecated: use `account_id` instead. - * The unique stable hashed account identifier of the member. The identifier - * corresponds to a `hashed_account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. - * - * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setHashedAccountId($var) - { - @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, False); - $this->hashed_account_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php deleted file mode 100644 index 4da23b7f1319..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest - */ -class RemoveIpOverrideRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the key from which the IP override is removed, in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. IP override to be removed from the key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ip_override_data = null; - - /** - * @param string $name Required. The name of the key from which the IP override is removed, in the - * format `projects/{project}/keys/{key}`. Please see - * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. - * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData Required. IP override to be removed from the key. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\RemoveIpOverrideRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ipOverrideData): self - { - return (new self()) - ->setName($name) - ->setIpOverrideData($ipOverrideData); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the key from which the IP override is removed, in the - * format `projects/{project}/keys/{key}`. - * @type \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $ip_override_data - * Required. IP override to be removed from the key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the key from which the IP override is removed, in the - * format `projects/{project}/keys/{key}`. - * - * 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 key from which the IP override is removed, in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. IP override to be removed from the key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData|null - */ - public function getIpOverrideData() - { - return $this->ip_override_data; - } - - public function hasIpOverrideData() - { - return isset($this->ip_override_data); - } - - public function clearIpOverrideData() - { - unset($this->ip_override_data); - } - - /** - * Required. IP override to be removed from the key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.IpOverrideData ip_override_data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData $var - * @return $this - */ - public function setIpOverrideData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\IpOverrideData::class); - $this->ip_override_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php deleted file mode 100644 index c6cb317ffd7b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RemoveIpOverrideResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse - */ -class RemoveIpOverrideResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php deleted file mode 100644 index 2ac90f60a3e4..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest - */ -class ReorderFirewallPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A list containing all policy names, in the new order. Each name - * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $names; - - /** - * @param string $parent Required. The name of the project to list the policies for, in the format - * `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * @param string[] $names Required. A list containing all policy names, in the new order. Each name - * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. Please see - * {@see RecaptchaEnterpriseServiceClient::firewallPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\ReorderFirewallPoliciesRequest - * - * @experimental - */ - public static function build(string $parent, array $names): self - { - return (new self()) - ->setParent($parent) - ->setNames($names); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * Required. A list containing all policy names, in the new order. Each name - * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * - * 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. A list containing all policy names, in the new order. Each name - * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * Required. A list containing all policy names, in the new order. Each name - * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php deleted file mode 100644 index a03f0e590b4f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ReorderFirewallPoliciesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse - */ -class ReorderFirewallPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php deleted file mode 100644 index 5c242d9c65b8..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest - */ -class RetrieveLegacySecretKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The public key name linked to the requested secret key in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $key = ''; - - /** - * @param string $key Required. The public key name linked to the requested secret key in the - * format `projects/{project}/keys/{key}`. Please see - * {@see RecaptchaEnterpriseServiceClient::keyName()} for help formatting this field. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\RetrieveLegacySecretKeyRequest - * - * @experimental - */ - public static function build(string $key): self - { - return (new self()) - ->setKey($key); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Required. The public key name linked to the requested secret key in the - * format `projects/{project}/keys/{key}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The public key name linked to the requested secret key in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. The public key name linked to the requested secret key in the - * format `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php deleted file mode 100644 index 397a75127a04..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RetrieveLegacySecretKeyResponse.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse - */ -class RetrieveLegacySecretKeyResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The secret key (also known as shared secret) authorizes communication - * between your application backend and the reCAPTCHA Enterprise server to - * create an assessment. - * The secret key needs to be kept safe for security purposes. - * - * Generated from protobuf field string legacy_secret_key = 1; - */ - protected $legacy_secret_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $legacy_secret_key - * The secret key (also known as shared secret) authorizes communication - * between your application backend and the reCAPTCHA Enterprise server to - * create an assessment. - * The secret key needs to be kept safe for security purposes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * The secret key (also known as shared secret) authorizes communication - * between your application backend and the reCAPTCHA Enterprise server to - * create an assessment. - * The secret key needs to be kept safe for security purposes. - * - * Generated from protobuf field string legacy_secret_key = 1; - * @return string - */ - public function getLegacySecretKey() - { - return $this->legacy_secret_key; - } - - /** - * The secret key (also known as shared secret) authorizes communication - * between your application backend and the reCAPTCHA Enterprise server to - * create an assessment. - * The secret key needs to be kept safe for security purposes. - * - * Generated from protobuf field string legacy_secret_key = 1; - * @param string $var - * @return $this - */ - public function setLegacySecretKey($var) - { - GPBUtil::checkString($var, True); - $this->legacy_secret_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php deleted file mode 100644 index 6fa203ea2940..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RiskAnalysis - */ -class RiskAnalysis extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Legitimate event score from 0.0 to 1.0. - * (1.0 means very likely legitimate traffic while 0.0 means very likely - * non-legitimate traffic). - * - * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $score = 0.0; - /** - * Output only. Reasons contributing to the risk analysis verdict. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $reasons; - /** - * Output only. Extended verdict reasons to be used for experimentation only. - * The set of possible reasons is subject to change. - * - * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $extended_verdict_reasons; - /** - * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE - * keys - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $challenge = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $score - * Output only. Legitimate event score from 0.0 to 1.0. - * (1.0 means very likely legitimate traffic while 0.0 means very likely - * non-legitimate traffic). - * @type array|\Google\Protobuf\Internal\RepeatedField $reasons - * Output only. Reasons contributing to the risk analysis verdict. - * @type array|\Google\Protobuf\Internal\RepeatedField $extended_verdict_reasons - * Output only. Extended verdict reasons to be used for experimentation only. - * The set of possible reasons is subject to change. - * @type int $challenge - * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE - * keys - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Legitimate event score from 0.0 to 1.0. - * (1.0 means very likely legitimate traffic while 0.0 means very likely - * non-legitimate traffic). - * - * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Output only. Legitimate event score from 0.0 to 1.0. - * (1.0 means very likely legitimate traffic while 0.0 means very likely - * non-legitimate traffic). - * - * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Output only. Reasons contributing to the risk analysis verdict. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasons() - { - return $this->reasons; - } - - /** - * Output only. Reasons contributing to the risk analysis verdict. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis\ClassificationReason::class); - $this->reasons = $arr; - - return $this; - } - - /** - * Output only. Extended verdict reasons to be used for experimentation only. - * The set of possible reasons is subject to change. - * - * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExtendedVerdictReasons() - { - return $this->extended_verdict_reasons; - } - - /** - * Output only. Extended verdict reasons to be used for experimentation only. - * The set of possible reasons is subject to change. - * - * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExtendedVerdictReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->extended_verdict_reasons = $arr; - - return $this; - } - - /** - * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE - * keys - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getChallenge() - { - return $this->challenge; - } - - /** - * Output only. Challenge information for SCORE_AND_CHALLENGE and INVISIBLE - * keys - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setChallenge($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis\Challenge::class); - $this->challenge = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php deleted file mode 100644 index d61a1944dd0c..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/Challenge.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge - */ -class Challenge -{ - /** - * Default unspecified type. - * - * Generated from protobuf enum CHALLENGE_UNSPECIFIED = 0; - */ - const CHALLENGE_UNSPECIFIED = 0; - /** - * No challenge was presented for solving. - * - * Generated from protobuf enum NOCAPTCHA = 1; - */ - const NOCAPTCHA = 1; - /** - * A solution was submitted that was correct. - * - * Generated from protobuf enum PASSED = 2; - */ - const PASSED = 2; - /** - * A solution was submitted that was incorrect or otherwise - * deemed suspicious. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::CHALLENGE_UNSPECIFIED => 'CHALLENGE_UNSPECIFIED', - self::NOCAPTCHA => 'NOCAPTCHA', - self::PASSED => 'PASSED', - self::FAILED => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Challenge::class, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis_Challenge::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php deleted file mode 100644 index 159b1c8c8e37..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis/ClassificationReason.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason - */ -class ClassificationReason -{ - /** - * Default unspecified type. - * - * Generated from protobuf enum CLASSIFICATION_REASON_UNSPECIFIED = 0; - */ - const CLASSIFICATION_REASON_UNSPECIFIED = 0; - /** - * Interactions matched the behavior of an automated agent. - * - * Generated from protobuf enum AUTOMATION = 1; - */ - const AUTOMATION = 1; - /** - * The event originated from an illegitimate environment. - * - * Generated from protobuf enum UNEXPECTED_ENVIRONMENT = 2; - */ - const UNEXPECTED_ENVIRONMENT = 2; - /** - * Traffic volume from the event source is higher than normal. - * - * Generated from protobuf enum TOO_MUCH_TRAFFIC = 3; - */ - const TOO_MUCH_TRAFFIC = 3; - /** - * Interactions with the site were significantly different than expected - * patterns. - * - * Generated from protobuf enum UNEXPECTED_USAGE_PATTERNS = 4; - */ - const UNEXPECTED_USAGE_PATTERNS = 4; - /** - * Too little traffic has been received from this site thus far to generate - * quality risk analysis. - * - * Generated from protobuf enum LOW_CONFIDENCE_SCORE = 5; - */ - const LOW_CONFIDENCE_SCORE = 5; - /** - * The request matches behavioral characteristics of a carding attack. - * - * Generated from protobuf enum SUSPECTED_CARDING = 6; - */ - const SUSPECTED_CARDING = 6; - /** - * The request matches behavioral characteristics of chargebacks for fraud. - * - * Generated from protobuf enum SUSPECTED_CHARGEBACK = 7; - */ - const SUSPECTED_CHARGEBACK = 7; - - private static $valueToName = [ - self::CLASSIFICATION_REASON_UNSPECIFIED => 'CLASSIFICATION_REASON_UNSPECIFIED', - self::AUTOMATION => 'AUTOMATION', - self::UNEXPECTED_ENVIRONMENT => 'UNEXPECTED_ENVIRONMENT', - self::TOO_MUCH_TRAFFIC => 'TOO_MUCH_TRAFFIC', - self::UNEXPECTED_USAGE_PATTERNS => 'UNEXPECTED_USAGE_PATTERNS', - self::LOW_CONFIDENCE_SCORE => 'LOW_CONFIDENCE_SCORE', - self::SUSPECTED_CARDING => 'SUSPECTED_CARDING', - self::SUSPECTED_CHARGEBACK => 'SUSPECTED_CHARGEBACK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClassificationReason::class, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis_ClassificationReason::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php deleted file mode 100644 index 0c0196f6624f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreDistribution.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ScoreDistribution - */ -class ScoreDistribution extends \Google\Protobuf\Internal\Message -{ - /** - * Map key is score value multiplied by 100. The scores are discrete values - * between [0, 1]. The maximum number of buckets is on order of a few dozen, - * but typically much lower (ie. 10). - * - * Generated from protobuf field map score_buckets = 1; - */ - private $score_buckets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $score_buckets - * Map key is score value multiplied by 100. The scores are discrete values - * between [0, 1]. The maximum number of buckets is on order of a few dozen, - * but typically much lower (ie. 10). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Map key is score value multiplied by 100. The scores are discrete values - * between [0, 1]. The maximum number of buckets is on order of a few dozen, - * but typically much lower (ie. 10). - * - * Generated from protobuf field map score_buckets = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getScoreBuckets() - { - return $this->score_buckets; - } - - /** - * Map key is score value multiplied by 100. The scores are discrete values - * between [0, 1]. The maximum number of buckets is on order of a few dozen, - * but typically much lower (ie. 10). - * - * Generated from protobuf field map score_buckets = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setScoreBuckets($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT64); - $this->score_buckets = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php deleted file mode 100644 index 6b118c876894..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ScoreMetrics.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.recaptchaenterprise.v1.ScoreMetrics - */ -class ScoreMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Aggregated score metrics for all traffic. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ScoreDistribution overall_metrics = 1; - */ - protected $overall_metrics = null; - /** - * Action-based metrics. The map key is the action name which specified by the - * site owners at time of the "execute" client-side call. - * - * Generated from protobuf field map action_metrics = 2; - */ - private $action_metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution $overall_metrics - * Aggregated score metrics for all traffic. - * @type array|\Google\Protobuf\Internal\MapField $action_metrics - * Action-based metrics. The map key is the action name which specified by the - * site owners at time of the "execute" client-side call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Aggregated score metrics for all traffic. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ScoreDistribution overall_metrics = 1; - * @return \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution|null - */ - public function getOverallMetrics() - { - return $this->overall_metrics; - } - - public function hasOverallMetrics() - { - return isset($this->overall_metrics); - } - - public function clearOverallMetrics() - { - unset($this->overall_metrics); - } - - /** - * Aggregated score metrics for all traffic. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.ScoreDistribution overall_metrics = 1; - * @param \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution $var - * @return $this - */ - public function setOverallMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution::class); - $this->overall_metrics = $var; - - return $this; - } - - /** - * Action-based metrics. The map key is the action name which specified by the - * site owners at time of the "execute" client-side call. - * - * Generated from protobuf field map action_metrics = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getActionMetrics() - { - return $this->action_metrics; - } - - /** - * Action-based metrics. The map key is the action name which specified by the - * site owners at time of the "execute" client-side call. - * - * Generated from protobuf field map action_metrics = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setActionMetrics($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\ScoreDistribution::class); - $this->action_metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php deleted file mode 100644 index 0c6559fc52fa..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php +++ /dev/null @@ -1,294 +0,0 @@ -google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest - */ -class SearchRelatedAccountGroupMembershipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project to search related account group - * memberships from. Specify the project name in the following format: - * `projects/{project}`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project = ''; - /** - * Optional. The unique stable account identifier used to search connections. - * The identifier should correspond to an `account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id - * or account_id must be set, but not both. - * - * Generated from protobuf field string account_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $account_id = ''; - /** - * Optional. Deprecated: use `account_id` instead. - * The unique stable hashed account identifier used to search connections. The - * identifier should correspond to a `hashed_account_id` provided in a - * previous `CreateAssessment` or `AnnotateAssessment` call. Either - * hashed_account_id or account_id must be set, but not both. - * - * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $hashed_account_id = ''; - /** - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous - * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `SearchRelatedAccountGroupMemberships` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $project Required. The name of the project to search related account group - * memberships from. Specify the project name in the following format: - * `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. - * @param string $hashedAccountId Optional. Deprecated: use `account_id` instead. - * The unique stable hashed account identifier used to search connections. The - * identifier should correspond to a `hashed_account_id` provided in a - * previous `CreateAssessment` or `AnnotateAssessment` call. Either - * hashed_account_id or account_id must be set, but not both. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\SearchRelatedAccountGroupMembershipsRequest - * - * @experimental - */ - public static function build(string $project, string $hashedAccountId): self - { - return (new self()) - ->setProject($project) - ->setHashedAccountId($hashedAccountId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Required. The name of the project to search related account group - * memberships from. Specify the project name in the following format: - * `projects/{project}`. - * @type string $account_id - * Optional. The unique stable account identifier used to search connections. - * The identifier should correspond to an `account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id - * or account_id must be set, but not both. - * @type string $hashed_account_id - * Optional. Deprecated: use `account_id` instead. - * The unique stable hashed account identifier used to search connections. The - * identifier should correspond to a `hashed_account_id` provided in a - * previous `CreateAssessment` or `AnnotateAssessment` call. Either - * hashed_account_id or account_id must be set, but not both. - * @type int $page_size - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * @type string $page_token - * Optional. A page token, received from a previous - * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `SearchRelatedAccountGroupMemberships` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project to search related account group - * memberships from. Specify the project name in the following format: - * `projects/{project}`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. The name of the project to search related account group - * memberships from. Specify the project name in the following format: - * `projects/{project}`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Optional. The unique stable account identifier used to search connections. - * The identifier should correspond to an `account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id - * or account_id must be set, but not both. - * - * Generated from protobuf field string account_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAccountId() - { - return $this->account_id; - } - - /** - * Optional. The unique stable account identifier used to search connections. - * The identifier should correspond to an `account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id - * or account_id must be set, but not both. - * - * Generated from protobuf field string account_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAccountId($var) - { - GPBUtil::checkString($var, True); - $this->account_id = $var; - - return $this; - } - - /** - * Optional. Deprecated: use `account_id` instead. - * The unique stable hashed account identifier used to search connections. The - * identifier should correspond to a `hashed_account_id` provided in a - * previous `CreateAssessment` or `AnnotateAssessment` call. Either - * hashed_account_id or account_id must be set, but not both. - * - * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getHashedAccountId() - { - @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); - return $this->hashed_account_id; - } - - /** - * Optional. Deprecated: use `account_id` instead. - * The unique stable hashed account identifier used to search connections. The - * identifier should correspond to a `hashed_account_id` provided in a - * previous `CreateAssessment` or `AnnotateAssessment` call. Either - * hashed_account_id or account_id must be set, but not both. - * - * Generated from protobuf field bytes hashed_account_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setHashedAccountId($var) - { - @trigger_error('hashed_account_id is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, False); - $this->hashed_account_id = $var; - - return $this; - } - - /** - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of groups to return. The service might return - * fewer than this value. If unspecified, at most 50 groups are returned. The - * maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.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 - * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `SearchRelatedAccountGroupMemberships` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous - * `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `SearchRelatedAccountGroupMemberships` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 4 [(.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/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php deleted file mode 100644 index 6099354ab5ef..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse - */ -class SearchRelatedAccountGroupMembershipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The queried memberships. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; - */ - private $related_account_group_memberships; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $related_account_group_memberships - * The queried memberships. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * The queried memberships. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedAccountGroupMemberships() - { - return $this->related_account_group_memberships; - } - - /** - * The queried memberships. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership related_account_group_memberships = 1; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedAccountGroupMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\RelatedAccountGroupMembership::class); - $this->related_account_group_memberships = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php deleted file mode 100644 index 8f411544313d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict - */ -class SmsTollFraudVerdict extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Probability of an SMS event being fraudulent. - * Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $risk = 0.0; - /** - * Output only. Reasons contributing to the SMS toll fraud verdict. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $risk - * Output only. Probability of an SMS event being fraudulent. - * Values are from 0.0 (lowest) to 1.0 (highest). - * @type array|\Google\Protobuf\Internal\RepeatedField $reasons - * Output only. Reasons contributing to the SMS toll fraud verdict. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Probability of an SMS event being fraudulent. - * Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getRisk() - { - return $this->risk; - } - - /** - * Output only. Probability of an SMS event being fraudulent. - * Values are from 0.0 (lowest) to 1.0 (highest). - * - * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setRisk($var) - { - GPBUtil::checkFloat($var); - $this->risk = $var; - - return $this; - } - - /** - * Output only. Reasons contributing to the SMS toll fraud verdict. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasons() - { - return $this->reasons; - } - - /** - * Output only. Reasons contributing to the SMS toll fraud verdict. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict\SmsTollFraudReason::class); - $this->reasons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php deleted file mode 100644 index 6e67f9b1eecd..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SmsTollFraudVerdict/SmsTollFraudReason.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason - */ -class SmsTollFraudReason -{ - /** - * Default unspecified reason - * - * Generated from protobuf enum SMS_TOLL_FRAUD_REASON_UNSPECIFIED = 0; - */ - const SMS_TOLL_FRAUD_REASON_UNSPECIFIED = 0; - /** - * The provided phone number was invalid - * - * Generated from protobuf enum INVALID_PHONE_NUMBER = 1; - */ - const INVALID_PHONE_NUMBER = 1; - - private static $valueToName = [ - self::SMS_TOLL_FRAUD_REASON_UNSPECIFIED => 'SMS_TOLL_FRAUD_REASON_UNSPECIFIED', - self::INVALID_PHONE_NUMBER => 'INVALID_PHONE_NUMBER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SmsTollFraudReason::class, \Google\Cloud\RecaptchaEnterprise\V1\SmsTollFraudVerdict_SmsTollFraudReason::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php deleted file mode 100644 index 310161e1b0e2..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TestingOptions - */ -class TestingOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. All assessments for this Key return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. - * - * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $testing_score = 0.0; - /** - * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all - * challenge requests for this site return nocaptcha if NOCAPTCHA, or an - * unsolvable challenge if CHALLENGE. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $testing_challenge = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $testing_score - * Optional. All assessments for this Key return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. - * @type int $testing_challenge - * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all - * challenge requests for this site return nocaptcha if NOCAPTCHA, or an - * unsolvable challenge if CHALLENGE. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. All assessments for this Key return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. - * - * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getTestingScore() - { - return $this->testing_score; - } - - /** - * Optional. All assessments for this Key return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. - * - * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setTestingScore($var) - { - GPBUtil::checkFloat($var); - $this->testing_score = $var; - - return $this; - } - - /** - * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all - * challenge requests for this site return nocaptcha if NOCAPTCHA, or an - * unsolvable challenge if CHALLENGE. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTestingChallenge() - { - return $this->testing_challenge; - } - - /** - * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all - * challenge requests for this site return nocaptcha if NOCAPTCHA, or an - * unsolvable challenge if CHALLENGE. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTestingChallenge($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions\TestingChallenge::class); - $this->testing_challenge = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php deleted file mode 100644 index c139614f3727..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions/TestingChallenge.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge - */ -class TestingChallenge -{ - /** - * Perform the normal risk analysis and return either nocaptcha or a - * challenge depending on risk and trust factors. - * - * Generated from protobuf enum TESTING_CHALLENGE_UNSPECIFIED = 0; - */ - const TESTING_CHALLENGE_UNSPECIFIED = 0; - /** - * Challenge requests for this key always return a nocaptcha, which - * does not require a solution. - * - * Generated from protobuf enum NOCAPTCHA = 1; - */ - const NOCAPTCHA = 1; - /** - * Challenge requests for this key always return an unsolvable - * challenge. - * - * Generated from protobuf enum UNSOLVABLE_CHALLENGE = 2; - */ - const UNSOLVABLE_CHALLENGE = 2; - - private static $valueToName = [ - self::TESTING_CHALLENGE_UNSPECIFIED => 'TESTING_CHALLENGE_UNSPECIFIED', - self::NOCAPTCHA => 'NOCAPTCHA', - self::UNSOLVABLE_CHALLENGE => 'UNSOLVABLE_CHALLENGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TestingChallenge::class, \Google\Cloud\RecaptchaEnterprise\V1\TestingOptions_TestingChallenge::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php deleted file mode 100644 index 76d51f5b8d2b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TokenProperties - */ -class TokenProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether the provided user response token is valid. When valid - * = false, the reason could be specified in invalid_reason or it could also - * be due to a user failing to solve a challenge or a sitekey mismatch (i.e - * the sitekey used to generate the token was different than the one specified - * in the assessment). - * - * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $valid = false; - /** - * Output only. Reason associated with the response when valid = false. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $invalid_reason = 0; - /** - * Output only. The timestamp corresponding to the generation of the token. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The hostname of the page on which the token was generated (Web - * keys only). - * - * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hostname = ''; - /** - * Output only. The name of the Android package with which the token was - * generated (Android keys only). - * - * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $android_package_name = ''; - /** - * Output only. The ID of the iOS bundle with which the token was generated - * (iOS keys only). - * - * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ios_bundle_id = ''; - /** - * Output only. Action name provided at token generation. - * - * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $action = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $valid - * Output only. Whether the provided user response token is valid. When valid - * = false, the reason could be specified in invalid_reason or it could also - * be due to a user failing to solve a challenge or a sitekey mismatch (i.e - * the sitekey used to generate the token was different than the one specified - * in the assessment). - * @type int $invalid_reason - * Output only. Reason associated with the response when valid = false. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp corresponding to the generation of the token. - * @type string $hostname - * Output only. The hostname of the page on which the token was generated (Web - * keys only). - * @type string $android_package_name - * Output only. The name of the Android package with which the token was - * generated (Android keys only). - * @type string $ios_bundle_id - * Output only. The ID of the iOS bundle with which the token was generated - * (iOS keys only). - * @type string $action - * Output only. Action name provided at token generation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Whether the provided user response token is valid. When valid - * = false, the reason could be specified in invalid_reason or it could also - * be due to a user failing to solve a challenge or a sitekey mismatch (i.e - * the sitekey used to generate the token was different than the one specified - * in the assessment). - * - * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getValid() - { - return $this->valid; - } - - /** - * Output only. Whether the provided user response token is valid. When valid - * = false, the reason could be specified in invalid_reason or it could also - * be due to a user failing to solve a challenge or a sitekey mismatch (i.e - * the sitekey used to generate the token was different than the one specified - * in the assessment). - * - * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setValid($var) - { - GPBUtil::checkBool($var); - $this->valid = $var; - - return $this; - } - - /** - * Output only. Reason associated with the response when valid = false. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getInvalidReason() - { - return $this->invalid_reason; - } - - /** - * Output only. Reason associated with the response when valid = false. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setInvalidReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties\InvalidReason::class); - $this->invalid_reason = $var; - - return $this; - } - - /** - * Output only. The timestamp corresponding to the generation of the token. - * - * 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 corresponding to the generation of the token. - * - * 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 hostname of the page on which the token was generated (Web - * keys only). - * - * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Output only. The hostname of the page on which the token was generated (Web - * keys only). - * - * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Output only. The name of the Android package with which the token was - * generated (Android keys only). - * - * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAndroidPackageName() - { - return $this->android_package_name; - } - - /** - * Output only. The name of the Android package with which the token was - * generated (Android keys only). - * - * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAndroidPackageName($var) - { - GPBUtil::checkString($var, True); - $this->android_package_name = $var; - - return $this; - } - - /** - * Output only. The ID of the iOS bundle with which the token was generated - * (iOS keys only). - * - * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIosBundleId() - { - return $this->ios_bundle_id; - } - - /** - * Output only. The ID of the iOS bundle with which the token was generated - * (iOS keys only). - * - * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIosBundleId($var) - { - GPBUtil::checkString($var, True); - $this->ios_bundle_id = $var; - - return $this; - } - - /** - * Output only. Action name provided at token generation. - * - * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * Output only. Action name provided at token generation. - * - * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php deleted file mode 100644 index 94f9c48b3293..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TokenProperties/InvalidReason.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason - */ -class InvalidReason -{ - /** - * Default unspecified type. - * - * Generated from protobuf enum INVALID_REASON_UNSPECIFIED = 0; - */ - const INVALID_REASON_UNSPECIFIED = 0; - /** - * If the failure reason was not accounted for. - * - * Generated from protobuf enum UNKNOWN_INVALID_REASON = 1; - */ - const UNKNOWN_INVALID_REASON = 1; - /** - * The provided user verification token was malformed. - * - * Generated from protobuf enum MALFORMED = 2; - */ - const MALFORMED = 2; - /** - * The user verification token had expired. - * - * Generated from protobuf enum EXPIRED = 3; - */ - const EXPIRED = 3; - /** - * The user verification had already been seen. - * - * Generated from protobuf enum DUPE = 4; - */ - const DUPE = 4; - /** - * The user verification token was not present. - * - * Generated from protobuf enum MISSING = 5; - */ - const MISSING = 5; - /** - * A retriable error (such as network failure) occurred on the browser. - * Could easily be simulated by an attacker. - * - * Generated from protobuf enum BROWSER_ERROR = 6; - */ - const BROWSER_ERROR = 6; - - private static $valueToName = [ - self::INVALID_REASON_UNSPECIFIED => 'INVALID_REASON_UNSPECIFIED', - self::UNKNOWN_INVALID_REASON => 'UNKNOWN_INVALID_REASON', - self::MALFORMED => 'MALFORMED', - self::EXPIRED => 'EXPIRED', - self::DUPE => 'DUPE', - self::MISSING => 'MISSING', - self::BROWSER_ERROR => 'BROWSER_ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InvalidReason::class, \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties_InvalidReason::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php deleted file mode 100644 index 4a838d957421..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData.php +++ /dev/null @@ -1,581 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TransactionData - */ -class TransactionData extends \Google\Protobuf\Internal\Message -{ - /** - * Unique identifier for the transaction. This custom identifier can be used - * to reference this transaction in the future, for example, labeling a refund - * or chargeback event. Two attempts at the same transaction should use the - * same transaction id. - * - * Generated from protobuf field optional string transaction_id = 11; - */ - protected $transaction_id = null; - /** - * Optional. The payment method for the transaction. The allowed values are: - * * credit-card - * * debit-card - * * gift-card - * * processor-{name} (If a third-party is used, for example, - * processor-paypal) - * * custom-{name} (If an alternative method is used, for example, - * custom-crypto) - * - * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $payment_method = ''; - /** - * Optional. The Bank Identification Number - generally the first 6 or 8 - * digits of the card. - * - * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $card_bin = ''; - /** - * Optional. The last four digits of the card. - * - * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $card_last_four = ''; - /** - * Optional. The currency code in ISO-4217 format. - * - * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $currency_code = ''; - /** - * Optional. The decimal value of the transaction in the specified currency. - * - * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value = 0.0; - /** - * Optional. The value of shipping in the specified currency. 0 for free or no - * shipping. - * - * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shipping_value = 0.0; - /** - * Optional. Destination address if this transaction involves shipping a - * physical item. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shipping_address = null; - /** - * Optional. Address associated with the payment method when applicable. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $billing_address = null; - /** - * Optional. Information about the user paying/initiating the transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $user = null; - /** - * Optional. Information about the user or users fulfilling the transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $merchants; - /** - * Optional. Items purchased in this transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $items; - /** - * Optional. Information about the payment gateway's response to the - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gateway_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction_id - * Unique identifier for the transaction. This custom identifier can be used - * to reference this transaction in the future, for example, labeling a refund - * or chargeback event. Two attempts at the same transaction should use the - * same transaction id. - * @type string $payment_method - * Optional. The payment method for the transaction. The allowed values are: - * * credit-card - * * debit-card - * * gift-card - * * processor-{name} (If a third-party is used, for example, - * processor-paypal) - * * custom-{name} (If an alternative method is used, for example, - * custom-crypto) - * @type string $card_bin - * Optional. The Bank Identification Number - generally the first 6 or 8 - * digits of the card. - * @type string $card_last_four - * Optional. The last four digits of the card. - * @type string $currency_code - * Optional. The currency code in ISO-4217 format. - * @type float $value - * Optional. The decimal value of the transaction in the specified currency. - * @type float $shipping_value - * Optional. The value of shipping in the specified currency. 0 for free or no - * shipping. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $shipping_address - * Optional. Destination address if this transaction involves shipping a - * physical item. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $billing_address - * Optional. Address associated with the payment method when applicable. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User $user - * Optional. Information about the user paying/initiating the transaction. - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>|\Google\Protobuf\Internal\RepeatedField $merchants - * Optional. Information about the user or users fulfilling the transaction. - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>|\Google\Protobuf\Internal\RepeatedField $items - * Optional. Items purchased in this transaction. - * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo $gateway_info - * Optional. Information about the payment gateway's response to the - * transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Unique identifier for the transaction. This custom identifier can be used - * to reference this transaction in the future, for example, labeling a refund - * or chargeback event. Two attempts at the same transaction should use the - * same transaction id. - * - * Generated from protobuf field optional string transaction_id = 11; - * @return string - */ - public function getTransactionId() - { - return isset($this->transaction_id) ? $this->transaction_id : ''; - } - - public function hasTransactionId() - { - return isset($this->transaction_id); - } - - public function clearTransactionId() - { - unset($this->transaction_id); - } - - /** - * Unique identifier for the transaction. This custom identifier can be used - * to reference this transaction in the future, for example, labeling a refund - * or chargeback event. Two attempts at the same transaction should use the - * same transaction id. - * - * Generated from protobuf field optional string transaction_id = 11; - * @param string $var - * @return $this - */ - public function setTransactionId($var) - { - GPBUtil::checkString($var, True); - $this->transaction_id = $var; - - return $this; - } - - /** - * Optional. The payment method for the transaction. The allowed values are: - * * credit-card - * * debit-card - * * gift-card - * * processor-{name} (If a third-party is used, for example, - * processor-paypal) - * * custom-{name} (If an alternative method is used, for example, - * custom-crypto) - * - * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPaymentMethod() - { - return $this->payment_method; - } - - /** - * Optional. The payment method for the transaction. The allowed values are: - * * credit-card - * * debit-card - * * gift-card - * * processor-{name} (If a third-party is used, for example, - * processor-paypal) - * * custom-{name} (If an alternative method is used, for example, - * custom-crypto) - * - * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPaymentMethod($var) - { - GPBUtil::checkString($var, True); - $this->payment_method = $var; - - return $this; - } - - /** - * Optional. The Bank Identification Number - generally the first 6 or 8 - * digits of the card. - * - * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCardBin() - { - return $this->card_bin; - } - - /** - * Optional. The Bank Identification Number - generally the first 6 or 8 - * digits of the card. - * - * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCardBin($var) - { - GPBUtil::checkString($var, True); - $this->card_bin = $var; - - return $this; - } - - /** - * Optional. The last four digits of the card. - * - * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCardLastFour() - { - return $this->card_last_four; - } - - /** - * Optional. The last four digits of the card. - * - * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCardLastFour($var) - { - GPBUtil::checkString($var, True); - $this->card_last_four = $var; - - return $this; - } - - /** - * Optional. The currency code in ISO-4217 format. - * - * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCurrencyCode() - { - return $this->currency_code; - } - - /** - * Optional. The currency code in ISO-4217 format. - * - * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCurrencyCode($var) - { - GPBUtil::checkString($var, True); - $this->currency_code = $var; - - return $this; - } - - /** - * Optional. The decimal value of the transaction in the specified currency. - * - * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getValue() - { - return $this->value; - } - - /** - * Optional. The decimal value of the transaction in the specified currency. - * - * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkDouble($var); - $this->value = $var; - - return $this; - } - - /** - * Optional. The value of shipping in the specified currency. 0 for free or no - * shipping. - * - * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getShippingValue() - { - return $this->shipping_value; - } - - /** - * Optional. The value of shipping in the specified currency. 0 for free or no - * shipping. - * - * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setShippingValue($var) - { - GPBUtil::checkDouble($var); - $this->shipping_value = $var; - - return $this; - } - - /** - * Optional. Destination address if this transaction involves shipping a - * physical item. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null - */ - public function getShippingAddress() - { - return $this->shipping_address; - } - - public function hasShippingAddress() - { - return isset($this->shipping_address); - } - - public function clearShippingAddress() - { - unset($this->shipping_address); - } - - /** - * Optional. Destination address if this transaction involves shipping a - * physical item. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $var - * @return $this - */ - public function setShippingAddress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address::class); - $this->shipping_address = $var; - - return $this; - } - - /** - * Optional. Address associated with the payment method when applicable. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null - */ - public function getBillingAddress() - { - return $this->billing_address; - } - - public function hasBillingAddress() - { - return isset($this->billing_address); - } - - public function clearBillingAddress() - { - unset($this->billing_address); - } - - /** - * Optional. Address associated with the payment method when applicable. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $var - * @return $this - */ - public function setBillingAddress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address::class); - $this->billing_address = $var; - - return $this; - } - - /** - * Optional. Information about the user paying/initiating the transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User|null - */ - public function getUser() - { - return $this->user; - } - - public function hasUser() - { - return isset($this->user); - } - - public function clearUser() - { - unset($this->user); - } - - /** - * Optional. Information about the user paying/initiating the transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User::class); - $this->user = $var; - - return $this; - } - - /** - * Optional. Information about the user or users fulfilling the transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMerchants() - { - return $this->merchants; - } - - /** - * Optional. Information about the user or users fulfilling the transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMerchants($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User::class); - $this->merchants = $arr; - - return $this; - } - - /** - * Optional. Items purchased in this transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * Optional. Items purchased in this transaction. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item::class); - $this->items = $arr; - - return $this; - } - - /** - * Optional. Information about the payment gateway's response to the - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo|null - */ - public function getGatewayInfo() - { - return $this->gateway_info; - } - - public function hasGatewayInfo() - { - return isset($this->gateway_info); - } - - public function clearGatewayInfo() - { - unset($this->gateway_info); - } - - /** - * Optional. Information about the payment gateway's response to the - * transaction. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo $var - * @return $this - */ - public function setGatewayInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo::class); - $this->gateway_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php deleted file mode 100644 index 53c471921b0d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Address.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TransactionData.Address - */ -class Address extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The recipient name, potentially including information such as - * "care of". - * - * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $recipient = ''; - /** - * Optional. The first lines of the address. The first line generally - * contains the street name and number, and further lines may include - * information such as an apartment number. - * - * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $address; - /** - * Optional. The town/city of the address. - * - * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $locality = ''; - /** - * Optional. The state, province, or otherwise administrative area of the - * address. - * - * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $administrative_area = ''; - /** - * Optional. The CLDR country/region of the address. - * - * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $region_code = ''; - /** - * Optional. The postal or ZIP code of the address. - * - * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $postal_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $recipient - * Optional. The recipient name, potentially including information such as - * "care of". - * @type array|\Google\Protobuf\Internal\RepeatedField $address - * Optional. The first lines of the address. The first line generally - * contains the street name and number, and further lines may include - * information such as an apartment number. - * @type string $locality - * Optional. The town/city of the address. - * @type string $administrative_area - * Optional. The state, province, or otherwise administrative area of the - * address. - * @type string $region_code - * Optional. The CLDR country/region of the address. - * @type string $postal_code - * Optional. The postal or ZIP code of the address. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The recipient name, potentially including information such as - * "care of". - * - * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRecipient() - { - return $this->recipient; - } - - /** - * Optional. The recipient name, potentially including information such as - * "care of". - * - * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRecipient($var) - { - GPBUtil::checkString($var, True); - $this->recipient = $var; - - return $this; - } - - /** - * Optional. The first lines of the address. The first line generally - * contains the street name and number, and further lines may include - * information such as an apartment number. - * - * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAddress() - { - return $this->address; - } - - /** - * Optional. The first lines of the address. The first line generally - * contains the street name and number, and further lines may include - * information such as an apartment number. - * - * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAddress($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->address = $arr; - - return $this; - } - - /** - * Optional. The town/city of the address. - * - * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLocality() - { - return $this->locality; - } - - /** - * Optional. The town/city of the address. - * - * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLocality($var) - { - GPBUtil::checkString($var, True); - $this->locality = $var; - - return $this; - } - - /** - * Optional. The state, province, or otherwise administrative area of the - * address. - * - * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdministrativeArea() - { - return $this->administrative_area; - } - - /** - * Optional. The state, province, or otherwise administrative area of the - * address. - * - * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdministrativeArea($var) - { - GPBUtil::checkString($var, True); - $this->administrative_area = $var; - - return $this; - } - - /** - * Optional. The CLDR country/region of the address. - * - * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegionCode() - { - return $this->region_code; - } - - /** - * Optional. The CLDR country/region of the address. - * - * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegionCode($var) - { - GPBUtil::checkString($var, True); - $this->region_code = $var; - - return $this; - } - - /** - * Optional. The postal or ZIP code of the address. - * - * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPostalCode() - { - return $this->postal_code; - } - - /** - * Optional. The postal or ZIP code of the address. - * - * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPostalCode($var) - { - GPBUtil::checkString($var, True); - $this->postal_code = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Address::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_Address::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php deleted file mode 100644 index c80b7df3a8bf..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/GatewayInfo.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo - */ -class GatewayInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the gateway service (for example, stripe, square, - * paypal). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Gateway response code describing the state of the transaction. - * - * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gateway_response_code = ''; - /** - * Optional. AVS response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * - * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $avs_response_code = ''; - /** - * Optional. CVV response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * - * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cvv_response_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. Name of the gateway service (for example, stripe, square, - * paypal). - * @type string $gateway_response_code - * Optional. Gateway response code describing the state of the transaction. - * @type string $avs_response_code - * Optional. AVS response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * @type string $cvv_response_code - * Optional. CVV response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the gateway service (for example, stripe, square, - * paypal). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. Name of the gateway service (for example, stripe, square, - * paypal). - * - * 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. Gateway response code describing the state of the transaction. - * - * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGatewayResponseCode() - { - return $this->gateway_response_code; - } - - /** - * Optional. Gateway response code describing the state of the transaction. - * - * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGatewayResponseCode($var) - { - GPBUtil::checkString($var, True); - $this->gateway_response_code = $var; - - return $this; - } - - /** - * Optional. AVS response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * - * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAvsResponseCode() - { - return $this->avs_response_code; - } - - /** - * Optional. AVS response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * - * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAvsResponseCode($var) - { - GPBUtil::checkString($var, True); - $this->avs_response_code = $var; - - return $this; - } - - /** - * Optional. CVV response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * - * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCvvResponseCode() - { - return $this->cvv_response_code; - } - - /** - * Optional. CVV response code from the gateway - * (available only when reCAPTCHA Enterprise is called after authorization). - * - * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCvvResponseCode($var) - { - GPBUtil::checkString($var, True); - $this->cvv_response_code = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GatewayInfo::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_GatewayInfo::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php deleted file mode 100644 index e9cf18afba81..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/Item.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TransactionData.Item - */ -class Item extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The full name of the item. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. The value per item that the user is paying, in the transaction - * currency, after discounts. - * - * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value = 0.0; - /** - * Optional. The quantity of this item that is being purchased. - * - * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $quantity = 0; - /** - * Optional. When a merchant is specified, its corresponding account_id. - * Necessary to populate marketplace-style transactions. - * - * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $merchant_account_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. The full name of the item. - * @type float $value - * Optional. The value per item that the user is paying, in the transaction - * currency, after discounts. - * @type int|string $quantity - * Optional. The quantity of this item that is being purchased. - * @type string $merchant_account_id - * Optional. When a merchant is specified, its corresponding account_id. - * Necessary to populate marketplace-style transactions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The full name of the item. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The full name of the item. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The value per item that the user is paying, in the transaction - * currency, after discounts. - * - * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getValue() - { - return $this->value; - } - - /** - * Optional. The value per item that the user is paying, in the transaction - * currency, after discounts. - * - * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkDouble($var); - $this->value = $var; - - return $this; - } - - /** - * Optional. The quantity of this item that is being purchased. - * - * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getQuantity() - { - return $this->quantity; - } - - /** - * Optional. The quantity of this item that is being purchased. - * - * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setQuantity($var) - { - GPBUtil::checkInt64($var); - $this->quantity = $var; - - return $this; - } - - /** - * Optional. When a merchant is specified, its corresponding account_id. - * Necessary to populate marketplace-style transactions. - * - * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMerchantAccountId() - { - return $this->merchant_account_id; - } - - /** - * Optional. When a merchant is specified, its corresponding account_id. - * Necessary to populate marketplace-style transactions. - * - * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMerchantAccountId($var) - { - GPBUtil::checkString($var, True); - $this->merchant_account_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Item::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_Item::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php deleted file mode 100644 index f5aeaedf65c5..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionData/User.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TransactionData.User - */ -class User extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Unique account identifier for this user. If using account - * defender, this should match the hashed_account_id field. Otherwise, a - * unique and persistent identifier for this account. - * - * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $account_id = ''; - /** - * Optional. The epoch milliseconds of the user's account creation. - * - * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $creation_ms = 0; - /** - * Optional. The email address of the user. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $email = ''; - /** - * Optional. Whether the email has been verified to be accessible by the - * user (OTP or similar). - * - * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $email_verified = false; - /** - * Optional. The phone number of the user, with country code. - * - * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $phone_number = ''; - /** - * Optional. Whether the phone number has been verified to be accessible by - * the user (OTP or similar). - * - * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $phone_verified = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $account_id - * Optional. Unique account identifier for this user. If using account - * defender, this should match the hashed_account_id field. Otherwise, a - * unique and persistent identifier for this account. - * @type int|string $creation_ms - * Optional. The epoch milliseconds of the user's account creation. - * @type string $email - * Optional. The email address of the user. - * @type bool $email_verified - * Optional. Whether the email has been verified to be accessible by the - * user (OTP or similar). - * @type string $phone_number - * Optional. The phone number of the user, with country code. - * @type bool $phone_verified - * Optional. Whether the phone number has been verified to be accessible by - * the user (OTP or similar). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Unique account identifier for this user. If using account - * defender, this should match the hashed_account_id field. Otherwise, a - * unique and persistent identifier for this account. - * - * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAccountId() - { - return $this->account_id; - } - - /** - * Optional. Unique account identifier for this user. If using account - * defender, this should match the hashed_account_id field. Otherwise, a - * unique and persistent identifier for this account. - * - * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAccountId($var) - { - GPBUtil::checkString($var, True); - $this->account_id = $var; - - return $this; - } - - /** - * Optional. The epoch milliseconds of the user's account creation. - * - * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getCreationMs() - { - return $this->creation_ms; - } - - /** - * Optional. The epoch milliseconds of the user's account creation. - * - * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setCreationMs($var) - { - GPBUtil::checkInt64($var); - $this->creation_ms = $var; - - return $this; - } - - /** - * Optional. The email address of the user. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Optional. The email address of the user. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Optional. Whether the email has been verified to be accessible by the - * user (OTP or similar). - * - * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEmailVerified() - { - return $this->email_verified; - } - - /** - * Optional. Whether the email has been verified to be accessible by the - * user (OTP or similar). - * - * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEmailVerified($var) - { - GPBUtil::checkBool($var); - $this->email_verified = $var; - - return $this; - } - - /** - * Optional. The phone number of the user, with country code. - * - * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPhoneNumber() - { - return $this->phone_number; - } - - /** - * Optional. The phone number of the user, with country code. - * - * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkString($var, True); - $this->phone_number = $var; - - return $this; - } - - /** - * Optional. Whether the phone number has been verified to be accessible by - * the user (OTP or similar). - * - * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPhoneVerified() - { - return $this->phone_verified; - } - - /** - * Optional. Whether the phone number has been verified to be accessible by - * the user (OTP or similar). - * - * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPhoneVerified($var) - { - GPBUtil::checkBool($var); - $this->phone_verified = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(User::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_User::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php deleted file mode 100644 index 982397f1d7b8..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TransactionEvent - */ -class TransactionEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The type of this transaction event. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType event_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event_type = 0; - /** - * Optional. The reason or standardized code that corresponds with this - * transaction event, if one exists. For example, a CHARGEBACK event with code - * 6005. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reason = ''; - /** - * Optional. The value that corresponds with this transaction event, if one - * exists. For example, a refund event where $5.00 was refunded. Currency is - * obtained from the original transaction data. - * - * Generated from protobuf field double value = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value = 0.0; - /** - * Optional. Timestamp when this transaction event occurred; otherwise assumed - * to be the time of the API call. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $event_type - * Optional. The type of this transaction event. - * @type string $reason - * Optional. The reason or standardized code that corresponds with this - * transaction event, if one exists. For example, a CHARGEBACK event with code - * 6005. - * @type float $value - * Optional. The value that corresponds with this transaction event, if one - * exists. For example, a refund event where $5.00 was refunded. Currency is - * obtained from the original transaction data. - * @type \Google\Protobuf\Timestamp $event_time - * Optional. Timestamp when this transaction event occurred; otherwise assumed - * to be the time of the API call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The type of this transaction event. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType event_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * Optional. The type of this transaction event. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType event_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent\TransactionEventType::class); - $this->event_type = $var; - - return $this; - } - - /** - * Optional. The reason or standardized code that corresponds with this - * transaction event, if one exists. For example, a CHARGEBACK event with code - * 6005. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Optional. The reason or standardized code that corresponds with this - * transaction event, if one exists. For example, a CHARGEBACK event with code - * 6005. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - - /** - * Optional. The value that corresponds with this transaction event, if one - * exists. For example, a refund event where $5.00 was refunded. Currency is - * obtained from the original transaction data. - * - * Generated from protobuf field double value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getValue() - { - return $this->value; - } - - /** - * Optional. The value that corresponds with this transaction event, if one - * exists. For example, a refund event where $5.00 was refunded. Currency is - * obtained from the original transaction data. - * - * Generated from protobuf field double value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkDouble($var); - $this->value = $var; - - return $this; - } - - /** - * Optional. Timestamp when this transaction event occurred; otherwise assumed - * to be the time of the API call. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Optional. Timestamp when this transaction event occurred; otherwise assumed - * to be the time of the API call. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php deleted file mode 100644 index 04f38508e880..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TransactionEvent/TransactionEventType.php +++ /dev/null @@ -1,214 +0,0 @@ -google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType - */ -class TransactionEventType -{ - /** - * Default, unspecified event type. - * - * Generated from protobuf enum TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0; - */ - const TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0; - /** - * Indicates that the transaction is approved by the merchant. The - * accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY', - * 'CYBERSOURCE', or 'MANUAL_REVIEW'. - * - * Generated from protobuf enum MERCHANT_APPROVE = 1; - */ - const MERCHANT_APPROVE = 1; - /** - * Indicates that the transaction is denied and concluded due to risks - * detected by the merchant. The accompanying reasons can include terms such - * as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'. - * - * Generated from protobuf enum MERCHANT_DENY = 2; - */ - const MERCHANT_DENY = 2; - /** - * Indicates that the transaction is being evaluated by a human, due to - * suspicion or risk. - * - * Generated from protobuf enum MANUAL_REVIEW = 3; - */ - const MANUAL_REVIEW = 3; - /** - * Indicates that the authorization attempt with the card issuer succeeded. - * - * Generated from protobuf enum AUTHORIZATION = 4; - */ - const AUTHORIZATION = 4; - /** - * Indicates that the authorization attempt with the card issuer failed. - * The accompanying reasons can include Visa's '54' indicating that the card - * is expired, or '82' indicating that the CVV is incorrect. - * - * Generated from protobuf enum AUTHORIZATION_DECLINE = 5; - */ - const AUTHORIZATION_DECLINE = 5; - /** - * Indicates that the transaction is completed because the funds were - * settled. - * - * Generated from protobuf enum PAYMENT_CAPTURE = 6; - */ - const PAYMENT_CAPTURE = 6; - /** - * Indicates that the transaction could not be completed because the funds - * were not settled. - * - * Generated from protobuf enum PAYMENT_CAPTURE_DECLINE = 7; - */ - const PAYMENT_CAPTURE_DECLINE = 7; - /** - * Indicates that the transaction has been canceled. Specify the reason - * for the cancellation. For example, 'INSUFFICIENT_INVENTORY'. - * - * Generated from protobuf enum CANCEL = 8; - */ - const CANCEL = 8; - /** - * Indicates that the merchant has received a chargeback inquiry due to - * fraud for the transaction, requesting additional information before a - * fraud chargeback is officially issued and a formal chargeback - * notification is sent. - * - * Generated from protobuf enum CHARGEBACK_INQUIRY = 9; - */ - const CHARGEBACK_INQUIRY = 9; - /** - * Indicates that the merchant has received a chargeback alert due to fraud - * for the transaction. The process of resolving the dispute without - * involving the payment network is started. - * - * Generated from protobuf enum CHARGEBACK_ALERT = 10; - */ - const CHARGEBACK_ALERT = 10; - /** - * Indicates that a fraud notification is issued for the transaction, sent - * by the payment instrument's issuing bank because the transaction appears - * to be fraudulent. We recommend including TC40 or SAFE data in the - * `reason` field for this event type. For partial chargebacks, we recommend - * that you include an amount in the `value` field. - * - * Generated from protobuf enum FRAUD_NOTIFICATION = 11; - */ - const FRAUD_NOTIFICATION = 11; - /** - * Indicates that the merchant is informed by the payment network that the - * transaction has entered the chargeback process due to fraud. Reason code - * examples include Discover's '6005' and '6041'. For partial chargebacks, - * we recommend that you include an amount in the `value` field. - * - * Generated from protobuf enum CHARGEBACK = 12; - */ - const CHARGEBACK = 12; - /** - * Indicates that the transaction has entered the chargeback process due to - * fraud, and that the merchant has chosen to enter representment. Reason - * examples include Discover's '6005' and '6041'. For partial chargebacks, - * we recommend that you include an amount in the `value` field. - * - * Generated from protobuf enum CHARGEBACK_REPRESENTMENT = 13; - */ - const CHARGEBACK_REPRESENTMENT = 13; - /** - * Indicates that the transaction has had a fraud chargeback which was - * illegitimate and was reversed as a result. For partial chargebacks, we - * recommend that you include an amount in the `value` field. - * - * Generated from protobuf enum CHARGEBACK_REVERSE = 14; - */ - const CHARGEBACK_REVERSE = 14; - /** - * Indicates that the merchant has received a refund for a completed - * transaction. For partial refunds, we recommend that you include an amount - * in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of - * exempt tax) - * - * Generated from protobuf enum REFUND_REQUEST = 15; - */ - const REFUND_REQUEST = 15; - /** - * Indicates that the merchant has received a refund request for this - * transaction, but that they have declined it. For partial refunds, we - * recommend that you include an amount in the `value` field. Reason - * example: 'TAX_EXEMPT' (partial refund of exempt tax) - * - * Generated from protobuf enum REFUND_DECLINE = 16; - */ - const REFUND_DECLINE = 16; - /** - * Indicates that the completed transaction was refunded by the merchant. - * For partial refunds, we recommend that you include an amount in the - * `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt - * tax) - * - * Generated from protobuf enum REFUND = 17; - */ - const REFUND = 17; - /** - * Indicates that the completed transaction was refunded by the merchant, - * and that this refund was reversed. For partial refunds, we recommend that - * you include an amount in the `value` field. - * - * Generated from protobuf enum REFUND_REVERSE = 18; - */ - const REFUND_REVERSE = 18; - - private static $valueToName = [ - self::TRANSACTION_EVENT_TYPE_UNSPECIFIED => 'TRANSACTION_EVENT_TYPE_UNSPECIFIED', - self::MERCHANT_APPROVE => 'MERCHANT_APPROVE', - self::MERCHANT_DENY => 'MERCHANT_DENY', - self::MANUAL_REVIEW => 'MANUAL_REVIEW', - self::AUTHORIZATION => 'AUTHORIZATION', - self::AUTHORIZATION_DECLINE => 'AUTHORIZATION_DECLINE', - self::PAYMENT_CAPTURE => 'PAYMENT_CAPTURE', - self::PAYMENT_CAPTURE_DECLINE => 'PAYMENT_CAPTURE_DECLINE', - self::CANCEL => 'CANCEL', - self::CHARGEBACK_INQUIRY => 'CHARGEBACK_INQUIRY', - self::CHARGEBACK_ALERT => 'CHARGEBACK_ALERT', - self::FRAUD_NOTIFICATION => 'FRAUD_NOTIFICATION', - self::CHARGEBACK => 'CHARGEBACK', - self::CHARGEBACK_REPRESENTMENT => 'CHARGEBACK_REPRESENTMENT', - self::CHARGEBACK_REVERSE => 'CHARGEBACK_REVERSE', - self::REFUND_REQUEST => 'REFUND_REQUEST', - self::REFUND_DECLINE => 'REFUND_DECLINE', - self::REFUND => 'REFUND', - self::REFUND_REVERSE => 'REFUND_REVERSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TransactionEventType::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionEvent_TransactionEventType::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php deleted file mode 100644 index 30296a309d66..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateFirewallPolicyRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest - */ -class UpdateFirewallPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The policy to update. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $firewall_policy = null; - /** - * Optional. The mask to control which fields of the policy get updated. If - * the mask is not present, all fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy Required. The policy to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The mask to control which fields of the policy get updated. If - * the mask is not present, all fields are updated. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\UpdateFirewallPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewallPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setFirewallPolicy($firewallPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $firewall_policy - * Required. The policy to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields of the policy get updated. If - * the mask is not present, all fields are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The policy to update. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy|null - */ - public function getFirewallPolicy() - { - return $this->firewall_policy; - } - - public function hasFirewallPolicy() - { - return isset($this->firewall_policy); - } - - public function clearFirewallPolicy() - { - unset($this->firewall_policy); - } - - /** - * Required. The policy to update. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy $var - * @return $this - */ - public function setFirewallPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy::class); - $this->firewall_policy = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields of the policy get updated. If - * the mask is not present, all fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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 mask to control which fields of the policy get updated. If - * the mask is not present, all fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php deleted file mode 100644 index 00a05f2d2d8e..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UpdateKeyRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.recaptchaenterprise.v1.UpdateKeyRequest - */ -class UpdateKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The key to update. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = null; - /** - * Optional. The mask to control which fields of the key get updated. If the - * mask is not present, all fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $key Required. The key to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The mask to control which fields of the key get updated. If the - * mask is not present, all fields are updated. - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\UpdateKeyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\RecaptchaEnterprise\V1\Key $key, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setKey($key) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\RecaptchaEnterprise\V1\Key $key - * Required. The key to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields of the key get updated. If the - * mask is not present, all fields are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The key to update. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\RecaptchaEnterprise\V1\Key|null - */ - public function getKey() - { - return $this->key; - } - - public function hasKey() - { - return isset($this->key); - } - - public function clearKey() - { - unset($this->key); - } - - /** - * Required. The key to update. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Key key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\RecaptchaEnterprise\V1\Key $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\RecaptchaEnterprise\V1\Key::class); - $this->key = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields of the key get updated. If the - * mask is not present, all fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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 mask to control which fields of the key get updated. If the - * mask is not present, all fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php deleted file mode 100644 index 172fe5a75ccd..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserId.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.recaptchaenterprise.v1.UserId - */ -class UserId extends \Google\Protobuf\Internal\Message -{ - protected $id_oneof; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Optional. An email address. - * @type string $phone_number - * Optional. A phone number. Should use the E.164 format. - * @type string $username - * Optional. A unique username, if different from all the other identifiers - * and `account_id` that are provided. Can be a unique login handle or - * display name for a user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. An email address. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEmail() - { - return $this->readOneof(1); - } - - public function hasEmail() - { - return $this->hasOneof(1); - } - - /** - * Optional. An email address. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. A phone number. Should use the E.164 format. - * - * Generated from protobuf field string phone_number = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPhoneNumber() - { - return $this->readOneof(2); - } - - public function hasPhoneNumber() - { - return $this->hasOneof(2); - } - - /** - * Optional. A phone number. Should use the E.164 format. - * - * Generated from protobuf field string phone_number = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. A unique username, if different from all the other identifiers - * and `account_id` that are provided. Can be a unique login handle or - * display name for a user. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUsername() - { - return $this->readOneof(3); - } - - public function hasUsername() - { - return $this->hasOneof(3); - } - - /** - * Optional. A unique username, if different from all the other identifiers - * and `account_id` that are provided. Can be a unique login handle or - * display name for a user. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getIdOneof() - { - return $this->whichOneof("id_oneof"); - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php deleted file mode 100644 index 45d5c2715ce9..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/UserInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.recaptchaenterprise.v1.UserInfo - */ -class UserInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Creation time for this account associated with this user. Leave - * blank for non logged-in actions, guest checkout, or when there is no - * account associated with the current user. - * - * Generated from protobuf field .google.protobuf.Timestamp create_account_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $create_account_time = null; - /** - * Optional. For logged-in requests or login/registration requests, the unique - * account identifier associated with this user. You can use the username if - * it is stable (meaning it is the same for every request associated with the - * same user), or any stable user ID of your choice. Leave blank for non - * logged-in actions or guest checkout. - * - * Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $account_id = ''; - /** - * Optional. Identifiers associated with this user or request. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.UserId user_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $user_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_account_time - * Optional. Creation time for this account associated with this user. Leave - * blank for non logged-in actions, guest checkout, or when there is no - * account associated with the current user. - * @type string $account_id - * Optional. For logged-in requests or login/registration requests, the unique - * account identifier associated with this user. You can use the username if - * it is stable (meaning it is the same for every request associated with the - * same user), or any stable user ID of your choice. Leave blank for non - * logged-in actions or guest checkout. - * @type array<\Google\Cloud\RecaptchaEnterprise\V1\UserId>|\Google\Protobuf\Internal\RepeatedField $user_ids - * Optional. Identifiers associated with this user or request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Creation time for this account associated with this user. Leave - * blank for non logged-in actions, guest checkout, or when there is no - * account associated with the current user. - * - * Generated from protobuf field .google.protobuf.Timestamp create_account_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateAccountTime() - { - return $this->create_account_time; - } - - public function hasCreateAccountTime() - { - return isset($this->create_account_time); - } - - public function clearCreateAccountTime() - { - unset($this->create_account_time); - } - - /** - * Optional. Creation time for this account associated with this user. Leave - * blank for non logged-in actions, guest checkout, or when there is no - * account associated with the current user. - * - * Generated from protobuf field .google.protobuf.Timestamp create_account_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateAccountTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_account_time = $var; - - return $this; - } - - /** - * Optional. For logged-in requests or login/registration requests, the unique - * account identifier associated with this user. You can use the username if - * it is stable (meaning it is the same for every request associated with the - * same user), or any stable user ID of your choice. Leave blank for non - * logged-in actions or guest checkout. - * - * Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAccountId() - { - return $this->account_id; - } - - /** - * Optional. For logged-in requests or login/registration requests, the unique - * account identifier associated with this user. You can use the username if - * it is stable (meaning it is the same for every request associated with the - * same user), or any stable user ID of your choice. Leave blank for non - * logged-in actions or guest checkout. - * - * Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAccountId($var) - { - GPBUtil::checkString($var, True); - $this->account_id = $var; - - return $this; - } - - /** - * Optional. Identifiers associated with this user or request. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.UserId user_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserIds() - { - return $this->user_ids; - } - - /** - * Optional. Identifiers associated with this user or request. - * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.UserId user_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\RecaptchaEnterprise\V1\UserId>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecaptchaEnterprise\V1\UserId::class); - $this->user_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php deleted file mode 100644 index 7eb59cf1472b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.recaptchaenterprise.v1.WafSettings - */ -class WafSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The WAF service that uses this key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafService waf_service = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $waf_service = 0; - /** - * Required. The WAF feature for which this key is enabled. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature waf_feature = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $waf_feature = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $waf_service - * Required. The WAF service that uses this key. - * @type int $waf_feature - * Required. The WAF feature for which this key is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Required. The WAF service that uses this key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafService waf_service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getWafService() - { - return $this->waf_service; - } - - /** - * Required. The WAF service that uses this key. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafService waf_service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setWafService($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings\WafService::class); - $this->waf_service = $var; - - return $this; - } - - /** - * Required. The WAF feature for which this key is enabled. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature waf_feature = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getWafFeature() - { - return $this->waf_feature; - } - - /** - * Required. The WAF feature for which this key is enabled. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature waf_feature = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setWafFeature($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings\WafFeature::class); - $this->waf_feature = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php deleted file mode 100644 index 33d01002105a..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafFeature.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature - */ -class WafFeature -{ - /** - * Undefined feature. - * - * Generated from protobuf enum WAF_FEATURE_UNSPECIFIED = 0; - */ - const WAF_FEATURE_UNSPECIFIED = 0; - /** - * Redirects suspicious traffic to reCAPTCHA. - * - * Generated from protobuf enum CHALLENGE_PAGE = 1; - */ - const CHALLENGE_PAGE = 1; - /** - * Use reCAPTCHA session-tokens to protect the whole user session on the - * site's domain. - * - * Generated from protobuf enum SESSION_TOKEN = 2; - */ - const SESSION_TOKEN = 2; - /** - * Use reCAPTCHA action-tokens to protect user actions. - * - * Generated from protobuf enum ACTION_TOKEN = 3; - */ - const ACTION_TOKEN = 3; - /** - * Use reCAPTCHA WAF express protection to protect any content other than - * web pages, like APIs and IoT devices. - * - * Generated from protobuf enum EXPRESS = 5; - */ - const EXPRESS = 5; - - private static $valueToName = [ - self::WAF_FEATURE_UNSPECIFIED => 'WAF_FEATURE_UNSPECIFIED', - self::CHALLENGE_PAGE => 'CHALLENGE_PAGE', - self::SESSION_TOKEN => 'SESSION_TOKEN', - self::ACTION_TOKEN => 'ACTION_TOKEN', - self::EXPRESS => 'EXPRESS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WafFeature::class, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings_WafFeature::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php deleted file mode 100644 index e56c885cea57..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.recaptchaenterprise.v1.WafSettings.WafService - */ -class WafService -{ - /** - * Undefined WAF - * - * Generated from protobuf enum WAF_SERVICE_UNSPECIFIED = 0; - */ - const WAF_SERVICE_UNSPECIFIED = 0; - /** - * Cloud Armor - * - * Generated from protobuf enum CA = 1; - */ - const CA = 1; - /** - * Fastly - * - * Generated from protobuf enum FASTLY = 3; - */ - const FASTLY = 3; - /** - * Cloudflare - * - * Generated from protobuf enum CLOUDFLARE = 4; - */ - const CLOUDFLARE = 4; - /** - * Akamai - * - * Generated from protobuf enum AKAMAI = 5; - */ - const AKAMAI = 5; - - private static $valueToName = [ - self::WAF_SERVICE_UNSPECIFIED => 'WAF_SERVICE_UNSPECIFIED', - self::CA => 'CA', - self::FASTLY => 'FASTLY', - self::CLOUDFLARE => 'CLOUDFLARE', - self::AKAMAI => 'AKAMAI', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WafService::class, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings_WafService::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php deleted file mode 100644 index deee451420f4..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.recaptchaenterprise.v1.WebKeySettings - */ -class WebKeySettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If set to true, it means allowed_domains are not enforced. - * - * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_all_domains = false; - /** - * Optional. Domains or subdomains of websites allowed to use the key. All - * subdomains of an allowed domain are automatically allowed. A valid domain - * requires a host and must not include any path, port, query or fragment. - * Examples: 'example.com' or 'subdomain.example.com' - * - * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $allowed_domains; - /** - * Optional. If set to true, the key can be used on AMP (Accelerated Mobile - * Pages) websites. This is supported only for the SCORE integration type. - * - * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_amp_traffic = false; - /** - * Required. Describes how this key is integrated with the website. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $integration_type = 0; - /** - * Optional. Settings for the frequency and difficulty at which this key - * triggers captcha challenges. This should only be specified for - * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $challenge_security_preference = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $allow_all_domains - * Optional. If set to true, it means allowed_domains are not enforced. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_domains - * Optional. Domains or subdomains of websites allowed to use the key. All - * subdomains of an allowed domain are automatically allowed. A valid domain - * requires a host and must not include any path, port, query or fragment. - * Examples: 'example.com' or 'subdomain.example.com' - * @type bool $allow_amp_traffic - * Optional. If set to true, the key can be used on AMP (Accelerated Mobile - * Pages) websites. This is supported only for the SCORE integration type. - * @type int $integration_type - * Required. Describes how this key is integrated with the website. - * @type int $challenge_security_preference - * Optional. Settings for the frequency and difficulty at which this key - * triggers captcha challenges. This should only be specified for - * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set to true, it means allowed_domains are not enforced. - * - * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowAllDomains() - { - return $this->allow_all_domains; - } - - /** - * Optional. If set to true, it means allowed_domains are not enforced. - * - * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowAllDomains($var) - { - GPBUtil::checkBool($var); - $this->allow_all_domains = $var; - - return $this; - } - - /** - * Optional. Domains or subdomains of websites allowed to use the key. All - * subdomains of an allowed domain are automatically allowed. A valid domain - * requires a host and must not include any path, port, query or fragment. - * Examples: 'example.com' or 'subdomain.example.com' - * - * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedDomains() - { - return $this->allowed_domains; - } - - /** - * Optional. Domains or subdomains of websites allowed to use the key. All - * subdomains of an allowed domain are automatically allowed. A valid domain - * requires a host and must not include any path, port, query or fragment. - * Examples: 'example.com' or 'subdomain.example.com' - * - * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedDomains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_domains = $arr; - - return $this; - } - - /** - * Optional. If set to true, the key can be used on AMP (Accelerated Mobile - * Pages) websites. This is supported only for the SCORE integration type. - * - * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowAmpTraffic() - { - return $this->allow_amp_traffic; - } - - /** - * Optional. If set to true, the key can be used on AMP (Accelerated Mobile - * Pages) websites. This is supported only for the SCORE integration type. - * - * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowAmpTraffic($var) - { - GPBUtil::checkBool($var); - $this->allow_amp_traffic = $var; - - return $this; - } - - /** - * Required. Describes how this key is integrated with the website. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getIntegrationType() - { - return $this->integration_type; - } - - /** - * Required. Describes how this key is integrated with the website. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setIntegrationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings\IntegrationType::class); - $this->integration_type = $var; - - return $this; - } - - /** - * Optional. Settings for the frequency and difficulty at which this key - * triggers captcha challenges. This should only be specified for - * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getChallengeSecurityPreference() - { - return $this->challenge_security_preference; - } - - /** - * Optional. Settings for the frequency and difficulty at which this key - * triggers captcha challenges. This should only be specified for - * IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE. - * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setChallengeSecurityPreference($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings\ChallengeSecurityPreference::class); - $this->challenge_security_preference = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php deleted file mode 100644 index d88becd7d59b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/ChallengeSecurityPreference.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference - */ -class ChallengeSecurityPreference -{ - /** - * Default type that indicates this enum hasn't been specified. - * - * Generated from protobuf enum CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0; - */ - const CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0; - /** - * Key tends to show fewer and easier challenges. - * - * Generated from protobuf enum USABILITY = 1; - */ - const USABILITY = 1; - /** - * Key tends to show balanced (in amount and difficulty) challenges. - * - * Generated from protobuf enum BALANCE = 2; - */ - const BALANCE = 2; - /** - * Key tends to show more and harder challenges. - * - * Generated from protobuf enum SECURITY = 3; - */ - const SECURITY = 3; - - private static $valueToName = [ - self::CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED => 'CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED', - self::USABILITY => 'USABILITY', - self::BALANCE => 'BALANCE', - self::SECURITY => 'SECURITY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChallengeSecurityPreference::class, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings_ChallengeSecurityPreference::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php deleted file mode 100644 index c254ac1621f1..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WebKeySettings/IntegrationType.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType - */ -class IntegrationType -{ - /** - * Default type that indicates this enum hasn't been specified. This is not - * a valid IntegrationType, one of the other types must be specified - * instead. - * - * Generated from protobuf enum INTEGRATION_TYPE_UNSPECIFIED = 0; - */ - const INTEGRATION_TYPE_UNSPECIFIED = 0; - /** - * Only used to produce scores. It doesn't display the "I'm not a robot" - * checkbox and never shows captcha challenges. - * - * Generated from protobuf enum SCORE = 1; - */ - const SCORE = 1; - /** - * Displays the "I'm not a robot" checkbox and may show captcha challenges - * after it is checked. - * - * Generated from protobuf enum CHECKBOX = 2; - */ - const CHECKBOX = 2; - /** - * Doesn't display the "I'm not a robot" checkbox, but may show captcha - * challenges after risk analysis. - * - * Generated from protobuf enum INVISIBLE = 3; - */ - const INVISIBLE = 3; - - private static $valueToName = [ - self::INTEGRATION_TYPE_UNSPECIFIED => 'INTEGRATION_TYPE_UNSPECIFIED', - self::SCORE => 'SCORE', - self::CHECKBOX => 'CHECKBOX', - self::INVISIBLE => 'INVISIBLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntegrationType::class, \Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings_IntegrationType::class); - diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php deleted file mode 100644 index 281f7b67c418..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php +++ /dev/null @@ -1,94 +0,0 @@ -setIp($ipOverrideDataIp) - ->setOverrideType($ipOverrideDataOverrideType); - $request = (new AddIpOverrideRequest()) - ->setName($formattedName) - ->setIpOverrideData($ipOverrideData); - - // Call the API and handle any network failures. - try { - /** @var AddIpOverrideResponse $response */ - $response = $recaptchaEnterpriseServiceClient->addIpOverride($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); - $ipOverrideDataIp = '[IP]'; - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - - add_ip_override_sample($formattedName, $ipOverrideDataIp, $ipOverrideDataOverrideType); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php deleted file mode 100644 index 795285fdc619..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName) - ->setAnnotation($annotation); - - // Call the API and handle any network failures. - try { - /** @var AnnotateAssessmentResponse $response */ - $response = $recaptchaEnterpriseServiceClient->annotateAssessment($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 = RecaptchaEnterpriseServiceClient::assessmentName('[PROJECT]', '[ASSESSMENT]'); - $annotation = Annotation::ANNOTATION_UNSPECIFIED; - - annotate_assessment_sample($formattedName, $annotation); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php deleted file mode 100644 index 6f4232778734..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setAssessment($assessment); - - // Call the API and handle any network failures. - try { - /** @var Assessment $response */ - $response = $recaptchaEnterpriseServiceClient->createAssessment($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - - create_assessment_sample($formattedParent); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php deleted file mode 100644 index 69aaafca3e92..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent) - ->setFirewallPolicy($firewallPolicy); - - // Call the API and handle any network failures. - try { - /** @var FirewallPolicy $response */ - $response = $recaptchaEnterpriseServiceClient->createFirewallPolicy($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - - create_firewall_policy_sample($formattedParent); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php deleted file mode 100644 index 21f9ac2c03fe..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php +++ /dev/null @@ -1,77 +0,0 @@ -setDisplayName($keyDisplayName); - $request = (new CreateKeyRequest()) - ->setParent($formattedParent) - ->setKey($key); - - // Call the API and handle any network failures. - try { - /** @var Key $response */ - $response = $recaptchaEnterpriseServiceClient->createKey($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - $keyDisplayName = '[DISPLAY_NAME]'; - - create_key_sample($formattedParent, $keyDisplayName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php deleted file mode 100644 index 778dff633d93..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $recaptchaEnterpriseServiceClient->deleteFirewallPolicy($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 = RecaptchaEnterpriseServiceClient::firewallPolicyName( - '[PROJECT]', - '[FIREWALLPOLICY]' - ); - - delete_firewall_policy_sample($formattedName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php deleted file mode 100644 index 1c638b7a7522..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $recaptchaEnterpriseServiceClient->deleteKey($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); - - delete_key_sample($formattedName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php deleted file mode 100644 index ee3cd695bcc5..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var FirewallPolicy $response */ - $response = $recaptchaEnterpriseServiceClient->getFirewallPolicy($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 = RecaptchaEnterpriseServiceClient::firewallPolicyName( - '[PROJECT]', - '[FIREWALLPOLICY]' - ); - - get_firewall_policy_sample($formattedName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php deleted file mode 100644 index 31763afbd0a6..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Key $response */ - $response = $recaptchaEnterpriseServiceClient->getKey($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); - - get_key_sample($formattedName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php deleted file mode 100644 index 47fd8ee6e6cf..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Metrics $response */ - $response = $recaptchaEnterpriseServiceClient->getMetrics($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 = RecaptchaEnterpriseServiceClient::metricsName('[PROJECT]', '[KEY]'); - - get_metrics_sample($formattedName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php deleted file mode 100644 index 124b5973bd86..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recaptchaEnterpriseServiceClient->listFirewallPolicies($request); - - /** @var FirewallPolicy $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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - - list_firewall_policies_sample($formattedParent); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php deleted file mode 100644 index ca998523c263..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recaptchaEnterpriseServiceClient->listIpOverrides($request); - - /** @var IpOverrideData $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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); - - list_ip_overrides_sample($formattedParent); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php deleted file mode 100644 index 468c27c507ff..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recaptchaEnterpriseServiceClient->listKeys($request); - - /** @var Key $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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - - list_keys_sample($formattedParent); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php deleted file mode 100644 index 0234cee9450a..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recaptchaEnterpriseServiceClient->listRelatedAccountGroupMemberships($request); - - /** @var RelatedAccountGroupMembership $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 = RecaptchaEnterpriseServiceClient::relatedAccountGroupName( - '[PROJECT]', - '[RELATEDACCOUNTGROUP]' - ); - - list_related_account_group_memberships_sample($formattedParent); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php deleted file mode 100644 index 1c3d589a0b34..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recaptchaEnterpriseServiceClient->listRelatedAccountGroups($request); - - /** @var RelatedAccountGroup $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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - - list_related_account_groups_sample($formattedParent); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php deleted file mode 100644 index 8d057ec1fd0d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Key $response */ - $response = $recaptchaEnterpriseServiceClient->migrateKey($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); - - migrate_key_sample($formattedName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php deleted file mode 100644 index bcd40ed3b151..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php +++ /dev/null @@ -1,95 +0,0 @@ -setIp($ipOverrideDataIp) - ->setOverrideType($ipOverrideDataOverrideType); - $request = (new RemoveIpOverrideRequest()) - ->setName($formattedName) - ->setIpOverrideData($ipOverrideData); - - // Call the API and handle any network failures. - try { - /** @var RemoveIpOverrideResponse $response */ - $response = $recaptchaEnterpriseServiceClient->removeIpOverride($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 = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); - $ipOverrideDataIp = '[IP]'; - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - - remove_ip_override_sample($formattedName, $ipOverrideDataIp, $ipOverrideDataOverrideType); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php deleted file mode 100644 index 2107eda20751..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setNames($formattedNames); - - // Call the API and handle any network failures. - try { - /** @var ReorderFirewallPoliciesResponse $response */ - $response = $recaptchaEnterpriseServiceClient->reorderFirewallPolicies($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 = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - $formattedNamesElement = RecaptchaEnterpriseServiceClient::firewallPolicyName( - '[PROJECT]', - '[FIREWALLPOLICY]' - ); - - reorder_firewall_policies_sample($formattedParent, $formattedNamesElement); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php deleted file mode 100644 index c74bb8267efe..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php +++ /dev/null @@ -1,74 +0,0 @@ -setKey($formattedKey); - - // Call the API and handle any network failures. - try { - /** @var RetrieveLegacySecretKeyResponse $response */ - $response = $recaptchaEnterpriseServiceClient->retrieveLegacySecretKey($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 -{ - $formattedKey = RecaptchaEnterpriseServiceClient::keyName('[PROJECT]', '[KEY]'); - - retrieve_legacy_secret_key_sample($formattedKey); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php deleted file mode 100644 index 3b9e0e41ae23..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php +++ /dev/null @@ -1,78 +0,0 @@ -setProject($formattedProject); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recaptchaEnterpriseServiceClient->searchRelatedAccountGroupMemberships($request); - - /** @var RelatedAccountGroupMembership $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 -{ - $formattedProject = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); - - search_related_account_group_memberships_sample($formattedProject); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php deleted file mode 100644 index 580ddd57fcfd..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php +++ /dev/null @@ -1,59 +0,0 @@ -setFirewallPolicy($firewallPolicy); - - // Call the API and handle any network failures. - try { - /** @var FirewallPolicy $response */ - $response = $recaptchaEnterpriseServiceClient->updateFirewallPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php deleted file mode 100644 index 590dd3e700e2..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php +++ /dev/null @@ -1,72 +0,0 @@ -setDisplayName($keyDisplayName); - $request = (new UpdateKeyRequest()) - ->setKey($key); - - // Call the API and handle any network failures. - try { - /** @var Key $response */ - $response = $recaptchaEnterpriseServiceClient->updateKey($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 -{ - $keyDisplayName = '[DISPLAY_NAME]'; - - update_key_sample($keyDisplayName); -} -// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php deleted file mode 100644 index becf1c786ec5..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php +++ /dev/null @@ -1,955 +0,0 @@ - addIpOverrideAsync(AddIpOverrideRequest $request, array $optionalArgs = []) - * @method PromiseInterface annotateAssessmentAsync(AnnotateAssessmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAssessmentAsync(CreateAssessmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createFirewallPolicyAsync(CreateFirewallPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createKeyAsync(CreateKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFirewallPolicyAsync(DeleteFirewallPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteKeyAsync(DeleteKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFirewallPolicyAsync(GetFirewallPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getKeyAsync(GetKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMetricsAsync(GetMetricsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFirewallPoliciesAsync(ListFirewallPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIpOverridesAsync(ListIpOverridesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listKeysAsync(ListKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRelatedAccountGroupMembershipsAsync(ListRelatedAccountGroupMembershipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRelatedAccountGroupsAsync(ListRelatedAccountGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface migrateKeyAsync(MigrateKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeIpOverrideAsync(RemoveIpOverrideRequest $request, array $optionalArgs = []) - * @method PromiseInterface reorderFirewallPoliciesAsync(ReorderFirewallPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface retrieveLegacySecretKeyAsync(RetrieveLegacySecretKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchRelatedAccountGroupMembershipsAsync(SearchRelatedAccountGroupMembershipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFirewallPolicyAsync(UpdateFirewallPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateKeyAsync(UpdateKeyRequest $request, array $optionalArgs = []) - */ -final class RecaptchaEnterpriseServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'recaptchaenterprise.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/recaptcha_enterprise_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a assessment - * resource. - * - * @param string $project - * @param string $assessment - * - * @return string The formatted assessment resource. - */ - public static function assessmentName(string $project, string $assessment): string - { - return self::getPathTemplate('assessment')->render([ - 'project' => $project, - 'assessment' => $assessment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * firewall_policy resource. - * - * @param string $project - * @param string $firewallpolicy - * - * @return string The formatted firewall_policy resource. - */ - public static function firewallPolicyName(string $project, string $firewallpolicy): string - { - return self::getPathTemplate('firewallPolicy')->render([ - 'project' => $project, - 'firewallpolicy' => $firewallpolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a key - * resource. - * - * @param string $project - * @param string $key - * - * @return string The formatted key resource. - */ - public static function keyName(string $project, string $key): string - { - return self::getPathTemplate('key')->render([ - 'project' => $project, - 'key' => $key, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a metrics - * resource. - * - * @param string $project - * @param string $key - * - * @return string The formatted metrics resource. - */ - public static function metricsName(string $project, string $key): string - { - return self::getPathTemplate('metrics')->render([ - 'project' => $project, - 'key' => $key, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * related_account_group resource. - * - * @param string $project - * @param string $relatedaccountgroup - * - * @return string The formatted related_account_group resource. - */ - public static function relatedAccountGroupName(string $project, string $relatedaccountgroup): string - { - return self::getPathTemplate('relatedAccountGroup')->render([ - 'project' => $project, - 'relatedaccountgroup' => $relatedaccountgroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - assessment: projects/{project}/assessments/{assessment} - * - firewallPolicy: projects/{project}/firewallpolicies/{firewallpolicy} - * - key: projects/{project}/keys/{key} - * - metrics: projects/{project}/keys/{key}/metrics - * - project: projects/{project} - * - relatedAccountGroup: projects/{project}/relatedaccountgroups/{relatedaccountgroup} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'recaptchaenterprise.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds an IP override to a key. The following restrictions hold: - * * The maximum number of IP overrides per key is 100. - * * For any conflict (such as IP already exists or IP part of an existing - * IP range), an error is returned. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::addIpOverrideAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/add_ip_override.php - * - * @param AddIpOverrideRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AddIpOverrideResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function addIpOverride(AddIpOverrideRequest $request, array $callOptions = []): AddIpOverrideResponse - { - return $this->startApiCall('AddIpOverride', $request, $callOptions)->wait(); - } - - /** - * Annotates a previously created Assessment to provide additional information - * on whether the event turned out to be authentic or fraudulent. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::annotateAssessmentAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php - * - * @param AnnotateAssessmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AnnotateAssessmentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function annotateAssessment(AnnotateAssessmentRequest $request, array $callOptions = []): AnnotateAssessmentResponse - { - return $this->startApiCall('AnnotateAssessment', $request, $callOptions)->wait(); - } - - /** - * Creates an Assessment of the likelihood an event is legitimate. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::createAssessmentAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php - * - * @param CreateAssessmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Assessment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAssessment(CreateAssessmentRequest $request, array $callOptions = []): Assessment - { - return $this->startApiCall('CreateAssessment', $request, $callOptions)->wait(); - } - - /** - * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA - * Enterprise actions can be executed. - * A project may have a maximum of 1000 policies. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::createFirewallPolicyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php - * - * @param CreateFirewallPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FirewallPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function createFirewallPolicy(CreateFirewallPolicyRequest $request, array $callOptions = []): FirewallPolicy - { - return $this->startApiCall('CreateFirewallPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new reCAPTCHA Enterprise key. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::createKeyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/create_key.php - * - * @param CreateKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Key - * - * @throws ApiException Thrown if the API call fails. - */ - public function createKey(CreateKeyRequest $request, array $callOptions = []): Key - { - return $this->startApiCall('CreateKey', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified firewall policy. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::deleteFirewallPolicyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php - * - * @param DeleteFirewallPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteFirewallPolicy(DeleteFirewallPolicyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteFirewallPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified key. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::deleteKeyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php - * - * @param DeleteKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteKey(DeleteKeyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteKey', $request, $callOptions)->wait(); - } - - /** - * Returns the specified firewall policy. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::getFirewallPolicyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php - * - * @param GetFirewallPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FirewallPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFirewallPolicy(GetFirewallPolicyRequest $request, array $callOptions = []): FirewallPolicy - { - return $this->startApiCall('GetFirewallPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns the specified key. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::getKeyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/get_key.php - * - * @param GetKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Key - * - * @throws ApiException Thrown if the API call fails. - */ - public function getKey(GetKeyRequest $request, array $callOptions = []): Key - { - return $this->startApiCall('GetKey', $request, $callOptions)->wait(); - } - - /** - * Get some aggregated metrics for a Key. This data can be used to build - * dashboards. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::getMetricsAsync()} - * . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php - * - * @param GetMetricsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Metrics - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMetrics(GetMetricsRequest $request, array $callOptions = []): Metrics - { - return $this->startApiCall('GetMetrics', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all firewall policies that belong to a project. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::listFirewallPoliciesAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php - * - * @param ListFirewallPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listFirewallPolicies(ListFirewallPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFirewallPolicies', $request, $callOptions); - } - - /** - * Lists all IP overrides for a key. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::listIpOverridesAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/list_ip_overrides.php - * - * @param ListIpOverridesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listIpOverrides(ListIpOverridesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIpOverrides', $request, $callOptions); - } - - /** - * Returns the list of all keys that belong to a project. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::listKeysAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php - * - * @param ListKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listKeys(ListKeysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListKeys', $request, $callOptions); - } - - /** - * Get memberships in a group of related accounts. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::listRelatedAccountGroupMembershipsAsync()} - * . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php - * - * @param ListRelatedAccountGroupMembershipsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listRelatedAccountGroupMemberships(ListRelatedAccountGroupMembershipsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRelatedAccountGroupMemberships', $request, $callOptions); - } - - /** - * List groups of related accounts. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::listRelatedAccountGroupsAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php - * - * @param ListRelatedAccountGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listRelatedAccountGroups(ListRelatedAccountGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRelatedAccountGroups', $request, $callOptions); - } - - /** - * Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. - * Once a key is migrated, it can be used from either product. SiteVerify - * requests are billed as CreateAssessment calls. You must be - * authenticated as one of the current owners of the reCAPTCHA Key, and - * your user must have the reCAPTCHA Enterprise Admin IAM role in the - * destination project. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::migrateKeyAsync()} - * . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php - * - * @param MigrateKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Key - * - * @throws ApiException Thrown if the API call fails. - */ - public function migrateKey(MigrateKeyRequest $request, array $callOptions = []): Key - { - return $this->startApiCall('MigrateKey', $request, $callOptions)->wait(); - } - - /** - * Removes an IP override from a key. The following restrictions hold: - * * If the IP isn't found in an existing IP override, a `NOT_FOUND` error - * is returned. - * * If the IP is found in an existing IP override, but the - * override type does not match, a `NOT_FOUND` error is returned. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::removeIpOverrideAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/remove_ip_override.php - * - * @param RemoveIpOverrideRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RemoveIpOverrideResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function removeIpOverride(RemoveIpOverrideRequest $request, array $callOptions = []): RemoveIpOverrideResponse - { - return $this->startApiCall('RemoveIpOverride', $request, $callOptions)->wait(); - } - - /** - * Reorders all firewall policies. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::reorderFirewallPoliciesAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/reorder_firewall_policies.php - * - * @param ReorderFirewallPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReorderFirewallPoliciesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reorderFirewallPolicies(ReorderFirewallPoliciesRequest $request, array $callOptions = []): ReorderFirewallPoliciesResponse - { - return $this->startApiCall('ReorderFirewallPolicies', $request, $callOptions)->wait(); - } - - /** - * Returns the secret key related to the specified public key. - * You must use the legacy secret key only in a 3rd party integration with - * legacy reCAPTCHA. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::retrieveLegacySecretKeyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php - * - * @param RetrieveLegacySecretKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RetrieveLegacySecretKeyResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function retrieveLegacySecretKey(RetrieveLegacySecretKeyRequest $request, array $callOptions = []): RetrieveLegacySecretKeyResponse - { - return $this->startApiCall('RetrieveLegacySecretKey', $request, $callOptions)->wait(); - } - - /** - * Search group memberships related to a given account. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::searchRelatedAccountGroupMembershipsAsync()} - * . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php - * - * @param SearchRelatedAccountGroupMembershipsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 searchRelatedAccountGroupMemberships(SearchRelatedAccountGroupMembershipsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchRelatedAccountGroupMemberships', $request, $callOptions); - } - - /** - * Updates the specified firewall policy. - * - * The async variant is - * {@see RecaptchaEnterpriseServiceClient::updateFirewallPolicyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php - * - * @param UpdateFirewallPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FirewallPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateFirewallPolicy(UpdateFirewallPolicyRequest $request, array $callOptions = []): FirewallPolicy - { - return $this->startApiCall('UpdateFirewallPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the specified key. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::updateKeyAsync()} . - * - * @example samples/V1/RecaptchaEnterpriseServiceClient/update_key.php - * - * @param UpdateKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Key - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateKey(UpdateKeyRequest $request, array $callOptions = []): Key - { - return $this->startApiCall('UpdateKey', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php deleted file mode 100644 index b8e7e5dc0160..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php +++ /dev/null @@ -1,1610 +0,0 @@ -keyName('[PROJECT]', '[KEY]'); - * $ipOverrideData = new IpOverrideData(); - * $response = $recaptchaEnterpriseServiceClient->addIpOverride($formattedName, $ipOverrideData); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient}. - */ -class RecaptchaEnterpriseServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'recaptchaenterprise.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $assessmentNameTemplate; - - private static $firewallPolicyNameTemplate; - - private static $keyNameTemplate; - - private static $metricsNameTemplate; - - private static $projectNameTemplate; - - private static $relatedAccountGroupNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/recaptcha_enterprise_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAssessmentNameTemplate() - { - if (self::$assessmentNameTemplate == null) { - self::$assessmentNameTemplate = new PathTemplate('projects/{project}/assessments/{assessment}'); - } - - return self::$assessmentNameTemplate; - } - - private static function getFirewallPolicyNameTemplate() - { - if (self::$firewallPolicyNameTemplate == null) { - self::$firewallPolicyNameTemplate = new PathTemplate('projects/{project}/firewallpolicies/{firewallpolicy}'); - } - - return self::$firewallPolicyNameTemplate; - } - - private static function getKeyNameTemplate() - { - if (self::$keyNameTemplate == null) { - self::$keyNameTemplate = new PathTemplate('projects/{project}/keys/{key}'); - } - - return self::$keyNameTemplate; - } - - private static function getMetricsNameTemplate() - { - if (self::$metricsNameTemplate == null) { - self::$metricsNameTemplate = new PathTemplate('projects/{project}/keys/{key}/metrics'); - } - - return self::$metricsNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getRelatedAccountGroupNameTemplate() - { - if (self::$relatedAccountGroupNameTemplate == null) { - self::$relatedAccountGroupNameTemplate = new PathTemplate('projects/{project}/relatedaccountgroups/{relatedaccountgroup}'); - } - - return self::$relatedAccountGroupNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'assessment' => self::getAssessmentNameTemplate(), - 'firewallPolicy' => self::getFirewallPolicyNameTemplate(), - 'key' => self::getKeyNameTemplate(), - 'metrics' => self::getMetricsNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'relatedAccountGroup' => self::getRelatedAccountGroupNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a assessment - * resource. - * - * @param string $project - * @param string $assessment - * - * @return string The formatted assessment resource. - */ - public static function assessmentName($project, $assessment) - { - return self::getAssessmentNameTemplate()->render([ - 'project' => $project, - 'assessment' => $assessment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * firewall_policy resource. - * - * @param string $project - * @param string $firewallpolicy - * - * @return string The formatted firewall_policy resource. - */ - public static function firewallPolicyName($project, $firewallpolicy) - { - return self::getFirewallPolicyNameTemplate()->render([ - 'project' => $project, - 'firewallpolicy' => $firewallpolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a key - * resource. - * - * @param string $project - * @param string $key - * - * @return string The formatted key resource. - */ - public static function keyName($project, $key) - { - return self::getKeyNameTemplate()->render([ - 'project' => $project, - 'key' => $key, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a metrics - * resource. - * - * @param string $project - * @param string $key - * - * @return string The formatted metrics resource. - */ - public static function metricsName($project, $key) - { - return self::getMetricsNameTemplate()->render([ - 'project' => $project, - 'key' => $key, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * related_account_group resource. - * - * @param string $project - * @param string $relatedaccountgroup - * - * @return string The formatted related_account_group resource. - */ - public static function relatedAccountGroupName($project, $relatedaccountgroup) - { - return self::getRelatedAccountGroupNameTemplate()->render([ - 'project' => $project, - 'relatedaccountgroup' => $relatedaccountgroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - assessment: projects/{project}/assessments/{assessment} - * - firewallPolicy: projects/{project}/firewallpolicies/{firewallpolicy} - * - key: projects/{project}/keys/{key} - * - metrics: projects/{project}/keys/{key}/metrics - * - project: projects/{project} - * - relatedAccountGroup: projects/{project}/relatedaccountgroups/{relatedaccountgroup} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'recaptchaenterprise.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Adds an IP override to a key. The following restrictions hold: - * * The maximum number of IP overrides per key is 100. - * * For any conflict (such as IP already exists or IP part of an existing - * IP range), an error is returned. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); - * $ipOverrideData = new IpOverrideData(); - * $response = $recaptchaEnterpriseServiceClient->addIpOverride($formattedName, $ipOverrideData); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the key to which the IP override is added, in the - * format `projects/{project}/keys/{key}`. - * @param IpOverrideData $ipOverrideData Required. IP override added to the key. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\AddIpOverrideResponse - * - * @throws ApiException if the remote call fails - */ - public function addIpOverride($name, $ipOverrideData, array $optionalArgs = []) - { - $request = new AddIpOverrideRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setIpOverrideData($ipOverrideData); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AddIpOverride', AddIpOverrideResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Annotates a previously created Assessment to provide additional information - * on whether the event turned out to be authentic or fraudulent. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->assessmentName('[PROJECT]', '[ASSESSMENT]'); - * $annotation = Annotation::ANNOTATION_UNSPECIFIED; - * $response = $recaptchaEnterpriseServiceClient->annotateAssessment($formattedName, $annotation); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Assessment, in the format - * `projects/{project}/assessments/{assessment}`. - * @param int $annotation Optional. The annotation that is assigned to the Event. This field can be - * left empty to provide reasons that apply to an event without concluding - * whether the event is legitimate or fraudulent. - * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Annotation} - * @param array $optionalArgs { - * Optional. - * - * @type int[] $reasons - * Optional. Reasons for the annotation that are assigned to the event. - * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Reason} - * @type string $accountId - * Optional. A stable account identifier to apply to the assessment. This is - * an alternative to setting `account_id` in `CreateAssessment`, for example - * when a stable account identifier is not yet known in the initial request. - * @type string $hashedAccountId - * Optional. A stable hashed account identifier to apply to the assessment. - * This is an alternative to setting `hashed_account_id` in - * `CreateAssessment`, for example when a stable account identifier is not yet - * known in the initial request. - * @type TransactionEvent $transactionEvent - * Optional. If the assessment is part of a payment transaction, provide - * details on payment lifecycle events that occur in the transaction. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentResponse - * - * @throws ApiException if the remote call fails - */ - public function annotateAssessment($name, $annotation, array $optionalArgs = []) - { - $request = new AnnotateAssessmentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setAnnotation($annotation); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['reasons'])) { - $request->setReasons($optionalArgs['reasons']); - } - - if (isset($optionalArgs['accountId'])) { - $request->setAccountId($optionalArgs['accountId']); - } - - if (isset($optionalArgs['hashedAccountId'])) { - $request->setHashedAccountId($optionalArgs['hashedAccountId']); - } - - if (isset($optionalArgs['transactionEvent'])) { - $request->setTransactionEvent($optionalArgs['transactionEvent']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AnnotateAssessment', AnnotateAssessmentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an Assessment of the likelihood an event is legitimate. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * $assessment = new Assessment(); - * $response = $recaptchaEnterpriseServiceClient->createAssessment($formattedParent, $assessment); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project in which the assessment is created, - * in the format `projects/{project}`. - * @param Assessment $assessment Required. The assessment details. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\Assessment - * - * @throws ApiException if the remote call fails - */ - public function createAssessment($parent, $assessment, array $optionalArgs = []) - { - $request = new CreateAssessmentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAssessment($assessment); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAssessment', Assessment::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA - * Enterprise actions can be executed. - * A project may have a maximum of 1000 policies. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * $firewallPolicy = new FirewallPolicy(); - * $response = $recaptchaEnterpriseServiceClient->createFirewallPolicy($formattedParent, $firewallPolicy); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project this policy applies to, in the format - * `projects/{project}`. - * @param FirewallPolicy $firewallPolicy Required. Information to create the policy. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy - * - * @throws ApiException if the remote call fails - */ - public function createFirewallPolicy($parent, $firewallPolicy, array $optionalArgs = []) - { - $request = new CreateFirewallPolicyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFirewallPolicy($firewallPolicy); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateFirewallPolicy', FirewallPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new reCAPTCHA Enterprise key. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * $key = new Key(); - * $response = $recaptchaEnterpriseServiceClient->createKey($formattedParent, $key); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project in which the key is created, in the - * format `projects/{project}`. - * @param Key $key Required. Information to create a reCAPTCHA Enterprise key. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\Key - * - * @throws ApiException if the remote call fails - */ - public function createKey($parent, $key, array $optionalArgs = []) - { - $request = new CreateKeyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setKey($key); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateKey', Key::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified firewall policy. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - * $recaptchaEnterpriseServiceClient->deleteFirewallPolicy($formattedName); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the policy to be deleted, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteFirewallPolicy($name, array $optionalArgs = []) - { - $request = new DeleteFirewallPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteFirewallPolicy', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified key. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); - * $recaptchaEnterpriseServiceClient->deleteKey($formattedName); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the key to be deleted, in the format - * `projects/{project}/keys/{key}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteKey($name, array $optionalArgs = []) - { - $request = new DeleteKeyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteKey', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified firewall policy. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - * $response = $recaptchaEnterpriseServiceClient->getFirewallPolicy($formattedName); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the requested policy, in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy - * - * @throws ApiException if the remote call fails - */ - public function getFirewallPolicy($name, array $optionalArgs = []) - { - $request = new GetFirewallPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetFirewallPolicy', FirewallPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified key. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); - * $response = $recaptchaEnterpriseServiceClient->getKey($formattedName); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the requested key, in the format - * `projects/{project}/keys/{key}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\Key - * - * @throws ApiException if the remote call fails - */ - public function getKey($name, array $optionalArgs = []) - { - $request = new GetKeyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetKey', Key::class, $optionalArgs, $request)->wait(); - } - - /** - * Get some aggregated metrics for a Key. This data can be used to build - * dashboards. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->metricsName('[PROJECT]', '[KEY]'); - * $response = $recaptchaEnterpriseServiceClient->getMetrics($formattedName); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the requested metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\Metrics - * - * @throws ApiException if the remote call fails - */ - public function getMetrics($name, array $optionalArgs = []) - { - $request = new GetMetricsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetMetrics', Metrics::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the list of all firewall policies that belong to a project. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listFirewallPolicies($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listFirewallPolicies($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listFirewallPolicies($parent, array $optionalArgs = []) - { - $request = new ListFirewallPoliciesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFirewallPolicies', $optionalArgs, ListFirewallPoliciesResponse::class, $request); - } - - /** - * Lists all IP overrides for a key. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); - * // Iterate over pages of elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listIpOverrides($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listIpOverrides($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent key for which the IP overrides are listed, in the - * format `projects/{project}/keys/{key}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listIpOverrides($parent, array $optionalArgs = []) - { - $request = new ListIpOverridesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListIpOverrides', $optionalArgs, ListIpOverridesResponse::class, $request); - } - - /** - * Returns the list of all keys that belong to a project. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listKeys($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listKeys($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project that contains the keys that is - * listed, in the format `projects/{project}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listKeys($parent, array $optionalArgs = []) - { - $request = new ListKeysRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListKeys', $optionalArgs, ListKeysResponse::class, $request); - } - - /** - * Get memberships in a group of related accounts. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - * // Iterate over pages of elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroupMemberships($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroupMemberships($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name for the related account group in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listRelatedAccountGroupMemberships($parent, array $optionalArgs = []) - { - $request = new ListRelatedAccountGroupMembershipsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRelatedAccountGroupMemberships', $optionalArgs, ListRelatedAccountGroupMembershipsResponse::class, $request); - } - - /** - * List groups of related accounts. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->listRelatedAccountGroups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project to list related account groups from, in - * the format `projects/{project}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listRelatedAccountGroups($parent, array $optionalArgs = []) - { - $request = new ListRelatedAccountGroupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRelatedAccountGroups', $optionalArgs, ListRelatedAccountGroupsResponse::class, $request); - } - - /** - * Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. - * Once a key is migrated, it can be used from either product. SiteVerify - * requests are billed as CreateAssessment calls. You must be - * authenticated as one of the current owners of the reCAPTCHA Key, and - * your user must have the reCAPTCHA Enterprise Admin IAM role in the - * destination project. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); - * $response = $recaptchaEnterpriseServiceClient->migrateKey($formattedName); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the key to be migrated, in the format - * `projects/{project}/keys/{key}`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $skipBillingCheck - * Optional. If true, skips the billing check. - * A reCAPTCHA Enterprise key or migrated key behaves differently than a - * reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see - * https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid - * any disruption of your usage, we check that a billing account is present. - * If your usage of reCAPTCHA is under the free quota, you can safely skip the - * billing check and proceed with the migration. See - * https://cloud.google.com/recaptcha/docs/billing-information. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\Key - * - * @throws ApiException if the remote call fails - */ - public function migrateKey($name, array $optionalArgs = []) - { - $request = new MigrateKeyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['skipBillingCheck'])) { - $request->setSkipBillingCheck($optionalArgs['skipBillingCheck']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('MigrateKey', Key::class, $optionalArgs, $request)->wait(); - } - - /** - * Removes an IP override from a key. The following restrictions hold: - * * If the IP isn't found in an existing IP override, a `NOT_FOUND` error - * is returned. - * * If the IP is found in an existing IP override, but the - * override type does not match, a `NOT_FOUND` error is returned. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedName = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); - * $ipOverrideData = new IpOverrideData(); - * $response = $recaptchaEnterpriseServiceClient->removeIpOverride($formattedName, $ipOverrideData); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the key from which the IP override is removed, in the - * format `projects/{project}/keys/{key}`. - * @param IpOverrideData $ipOverrideData Required. IP override to be removed from the key. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\RemoveIpOverrideResponse - * - * @throws ApiException if the remote call fails - */ - public function removeIpOverride($name, $ipOverrideData, array $optionalArgs = []) - { - $request = new RemoveIpOverrideRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setIpOverrideData($ipOverrideData); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RemoveIpOverride', RemoveIpOverrideResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Reorders all firewall policies. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedParent = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * $formattedNames = [ - * $recaptchaEnterpriseServiceClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), - * ]; - * $response = $recaptchaEnterpriseServiceClient->reorderFirewallPolicies($formattedParent, $formattedNames); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project to list the policies for, in the format - * `projects/{project}`. - * @param string[] $names Required. A list containing all policy names, in the new order. Each name - * is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\ReorderFirewallPoliciesResponse - * - * @throws ApiException if the remote call fails - */ - public function reorderFirewallPolicies($parent, $names, array $optionalArgs = []) - { - $request = new ReorderFirewallPoliciesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setNames($names); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReorderFirewallPolicies', ReorderFirewallPoliciesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the secret key related to the specified public key. - * You must use the legacy secret key only in a 3rd party integration with - * legacy reCAPTCHA. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedKey = $recaptchaEnterpriseServiceClient->keyName('[PROJECT]', '[KEY]'); - * $response = $recaptchaEnterpriseServiceClient->retrieveLegacySecretKey($formattedKey); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $key Required. The public key name linked to the requested secret key in the - * format `projects/{project}/keys/{key}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\RetrieveLegacySecretKeyResponse - * - * @throws ApiException if the remote call fails - */ - public function retrieveLegacySecretKey($key, array $optionalArgs = []) - { - $request = new RetrieveLegacySecretKeyRequest(); - $requestParamHeaders = []; - $request->setKey($key); - $requestParamHeaders['key'] = $key; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RetrieveLegacySecretKey', RetrieveLegacySecretKeyResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Search group memberships related to a given account. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $formattedProject = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->searchRelatedAccountGroupMemberships($formattedProject); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $recaptchaEnterpriseServiceClient->searchRelatedAccountGroupMemberships($formattedProject); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param string $project Required. The name of the project to search related account group - * memberships from. Specify the project name in the following format: - * `projects/{project}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $accountId - * Optional. The unique stable account identifier used to search connections. - * The identifier should correspond to an `account_id` provided in a previous - * `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id - * or account_id must be set, but not both. - * @type string $hashedAccountId - * Optional. Deprecated: use `account_id` instead. - * The unique stable hashed account identifier used to search connections. The - * identifier should correspond to a `hashed_account_id` provided in a - * previous `CreateAssessment` or `AnnotateAssessment` call. Either - * hashed_account_id or account_id must be set, but not both. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function searchRelatedAccountGroupMemberships($project, array $optionalArgs = []) - { - $request = new SearchRelatedAccountGroupMembershipsRequest(); - $requestParamHeaders = []; - $request->setProject($project); - $requestParamHeaders['project'] = $project; - if (isset($optionalArgs['accountId'])) { - $request->setAccountId($optionalArgs['accountId']); - } - - if (isset($optionalArgs['hashedAccountId'])) { - $request->setHashedAccountId($optionalArgs['hashedAccountId']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('SearchRelatedAccountGroupMemberships', $optionalArgs, SearchRelatedAccountGroupMembershipsResponse::class, $request); - } - - /** - * Updates the specified firewall policy. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $firewallPolicy = new FirewallPolicy(); - * $response = $recaptchaEnterpriseServiceClient->updateFirewallPolicy($firewallPolicy); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param FirewallPolicy $firewallPolicy Required. The policy to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. The mask to control which fields of the policy get updated. If - * the mask is not present, all fields are updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy - * - * @throws ApiException if the remote call fails - */ - public function updateFirewallPolicy($firewallPolicy, array $optionalArgs = []) - { - $request = new UpdateFirewallPolicyRequest(); - $requestParamHeaders = []; - $request->setFirewallPolicy($firewallPolicy); - $requestParamHeaders['firewall_policy.name'] = $firewallPolicy->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateFirewallPolicy', FirewallPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the specified key. - * - * Sample code: - * ``` - * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); - * try { - * $key = new Key(); - * $response = $recaptchaEnterpriseServiceClient->updateKey($key); - * } finally { - * $recaptchaEnterpriseServiceClient->close(); - * } - * ``` - * - * @param Key $key Required. The key to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. The mask to control which fields of the key get updated. If the - * mask is not present, all fields are updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\RecaptchaEnterprise\V1\Key - * - * @throws ApiException if the remote call fails - */ - public function updateKey($key, array $optionalArgs = []) - { - $request = new UpdateKeyRequest(); - $requestParamHeaders = []; - $request->setKey($key); - $requestParamHeaders['key.name'] = $key->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateKey', Key::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php deleted file mode 100644 index 062d8e696371..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ - 'AddIpOverride' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\AddIpOverrideResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'AnnotateAssessment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateAssessment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Assessment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateFirewallPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFirewallPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetFirewallPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMetrics' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Metrics', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListFirewallPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFirewallPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListFirewallPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIpOverrides' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIpOverrides', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListIpOverridesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRelatedAccountGroupMemberships' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRelatedAccountGroupMemberships', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupMembershipsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRelatedAccountGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRelatedAccountGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ListRelatedAccountGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'MigrateKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RemoveIpOverride' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\RemoveIpOverrideResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ReorderFirewallPolicies' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\ReorderFirewallPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveLegacySecretKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\RetrieveLegacySecretKeyResponse', - 'headerParams' => [ - [ - 'keyName' => 'key', - 'fieldAccessors' => [ - 'getKey', - ], - ], - ], - ], - 'SearchRelatedAccountGroupMemberships' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRelatedAccountGroupMemberships', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\SearchRelatedAccountGroupMembershipsResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - ], - ], - 'UpdateFirewallPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicy', - 'headerParams' => [ - [ - 'keyName' => 'firewall_policy.name', - 'fieldAccessors' => [ - 'getFirewallPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\RecaptchaEnterprise\V1\Key', - 'headerParams' => [ - [ - 'keyName' => 'key.name', - 'fieldAccessors' => [ - 'getKey', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'assessment' => 'projects/{project}/assessments/{assessment}', - 'firewallPolicy' => 'projects/{project}/firewallpolicies/{firewallpolicy}', - 'key' => 'projects/{project}/keys/{key}', - 'metrics' => 'projects/{project}/keys/{key}/metrics', - 'project' => 'projects/{project}', - 'relatedAccountGroup' => 'projects/{project}/relatedaccountgroups/{relatedaccountgroup}', - ], - ], - ], -]; diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php deleted file mode 100644 index 43261e80848d..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php +++ /dev/null @@ -1,284 +0,0 @@ - [ - 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ - 'AddIpOverride' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/keys/*}:addIpOverride', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'AnnotateAssessment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/assessments/*}:annotate', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateAssessment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/assessments', - 'body' => 'assessment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateFirewallPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/firewallpolicies', - 'body' => 'firewall_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/keys', - 'body' => 'key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFirewallPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/firewallpolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteKey' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/keys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetFirewallPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/firewallpolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/keys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMetrics' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/keys/*/metrics}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListFirewallPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/firewallpolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIpOverrides' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/keys/*}:listIpOverrides', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/keys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRelatedAccountGroupMemberships' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/relatedaccountgroups/*}/memberships', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRelatedAccountGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/relatedaccountgroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MigrateKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/keys/*}:migrate', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RemoveIpOverride' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/keys/*}:removeIpOverride', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ReorderFirewallPolicies' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/firewallpolicies:reorder', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveLegacySecretKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{key=projects/*/keys/*}:retrieveLegacySecretKey', - 'placeholders' => [ - 'key' => [ - 'getters' => [ - 'getKey', - ], - ], - ], - ], - 'SearchRelatedAccountGroupMemberships' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{project=projects/*}/relatedaccountgroupmemberships:search', - 'body' => '*', - 'placeholders' => [ - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'UpdateFirewallPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{firewall_policy.name=projects/*/firewallpolicies/*}', - 'body' => 'firewall_policy', - 'placeholders' => [ - 'firewall_policy.name' => [ - 'getters' => [ - 'getFirewallPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateKey' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{key.name=projects/*/keys/*}', - 'body' => 'key', - 'placeholders' => [ - 'key.name' => [ - 'getters' => [ - 'getKey', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php deleted file mode 100644 index b25fa206d90a..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php +++ /dev/null @@ -1,1676 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RecaptchaEnterpriseServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RecaptchaEnterpriseServiceClient($options); - } - - /** @test */ - public function addIpOverrideTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AddIpOverrideResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - $request = (new AddIpOverrideRequest()) - ->setName($formattedName) - ->setIpOverrideData($ipOverrideData); - $response = $gapicClient->addIpOverride($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/AddIpOverride', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIpOverrideData(); - $this->assertProtobufEquals($ipOverrideData, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addIpOverrideExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - $request = (new AddIpOverrideRequest()) - ->setName($formattedName) - ->setIpOverrideData($ipOverrideData); - try { - $gapicClient->addIpOverride($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 annotateAssessmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AnnotateAssessmentResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assessmentName('[PROJECT]', '[ASSESSMENT]'); - $annotation = Annotation::ANNOTATION_UNSPECIFIED; - $request = (new AnnotateAssessmentRequest()) - ->setName($formattedName) - ->setAnnotation($annotation); - $response = $gapicClient->annotateAssessment($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/AnnotateAssessment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getAnnotation(); - $this->assertProtobufEquals($annotation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateAssessmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assessmentName('[PROJECT]', '[ASSESSMENT]'); - $annotation = Annotation::ANNOTATION_UNSPECIFIED; - $request = (new AnnotateAssessmentRequest()) - ->setName($formattedName) - ->setAnnotation($annotation); - try { - $gapicClient->annotateAssessment($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 createAssessmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Assessment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $assessment = new Assessment(); - $request = (new CreateAssessmentRequest()) - ->setParent($formattedParent) - ->setAssessment($assessment); - $response = $gapicClient->createAssessment($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateAssessment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAssessment(); - $this->assertProtobufEquals($assessment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssessmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $assessment = new Assessment(); - $request = (new CreateAssessmentRequest()) - ->setParent($formattedParent) - ->setAssessment($assessment); - try { - $gapicClient->createAssessment($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 createFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $path = 'path3433509'; - $condition = 'condition-861311717'; - $expectedResponse = new FirewallPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPath($path); - $expectedResponse->setCondition($condition); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $firewallPolicy = new FirewallPolicy(); - $request = (new CreateFirewallPolicyRequest()) - ->setParent($formattedParent) - ->setFirewallPolicy($firewallPolicy); - $response = $gapicClient->createFirewallPolicy($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFirewallPolicy(); - $this->assertProtobufEquals($firewallPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $firewallPolicy = new FirewallPolicy(); - $request = (new CreateFirewallPolicyRequest()) - ->setParent($formattedParent) - ->setFirewallPolicy($firewallPolicy); - try { - $gapicClient->createFirewallPolicy($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 createKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - $request = (new CreateKeyRequest()) - ->setParent($formattedParent) - ->setKey($key); - $response = $gapicClient->createKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getKey(); - $this->assertProtobufEquals($key, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - $request = (new CreateKeyRequest()) - ->setParent($formattedParent) - ->setKey($key); - try { - $gapicClient->createKey($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 deleteFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - $request = (new DeleteFirewallPolicyRequest()) - ->setName($formattedName); - $gapicClient->deleteFirewallPolicy($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - $request = (new DeleteFirewallPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteFirewallPolicy($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 deleteKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $request = (new DeleteKeyRequest()) - ->setName($formattedName); - $gapicClient->deleteKey($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $request = (new DeleteKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteKey($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 getFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $path = 'path3433509'; - $condition = 'condition-861311717'; - $expectedResponse = new FirewallPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPath($path); - $expectedResponse->setCondition($condition); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - $request = (new GetFirewallPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getFirewallPolicy($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - $request = (new GetFirewallPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getFirewallPolicy($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 getKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $request = (new GetKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $request = (new GetKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getKey($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 getMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Metrics(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->metricsName('[PROJECT]', '[KEY]'); - $request = (new GetMetricsRequest()) - ->setName($formattedName); - $response = $gapicClient->getMetrics($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMetricsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->metricsName('[PROJECT]', '[KEY]'); - $request = (new GetMetricsRequest()) - ->setName($formattedName); - try { - $gapicClient->getMetrics($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 listFirewallPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $firewallPoliciesElement = new FirewallPolicy(); - $firewallPolicies = [ - $firewallPoliciesElement, - ]; - $expectedResponse = new ListFirewallPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFirewallPolicies($firewallPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListFirewallPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFirewallPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFirewallPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListFirewallPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFirewallPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListFirewallPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFirewallPolicies($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 listIpOverridesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $ipOverridesElement = new IpOverrideData(); - $ipOverrides = [ - $ipOverridesElement, - ]; - $expectedResponse = new ListIpOverridesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIpOverrides($ipOverrides); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $request = (new ListIpOverridesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIpOverrides($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIpOverrides()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListIpOverrides', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIpOverridesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $request = (new ListIpOverridesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIpOverrides($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 listKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $keysElement = new Key(); - $keys = [ - $keysElement, - ]; - $expectedResponse = new ListKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setKeys($keys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listKeys($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListKeysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listKeys($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 listRelatedAccountGroupMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); - $relatedAccountGroupMemberships = [ - $relatedAccountGroupMembershipsElement, - ]; - $expectedResponse = new ListRelatedAccountGroupMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - $request = (new ListRelatedAccountGroupMembershipsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRelatedAccountGroupMemberships($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroupMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRelatedAccountGroupMembershipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - $request = (new ListRelatedAccountGroupMembershipsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRelatedAccountGroupMemberships($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 listRelatedAccountGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $relatedAccountGroupsElement = new RelatedAccountGroup(); - $relatedAccountGroups = [ - $relatedAccountGroupsElement, - ]; - $expectedResponse = new ListRelatedAccountGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRelatedAccountGroups($relatedAccountGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListRelatedAccountGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRelatedAccountGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRelatedAccountGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRelatedAccountGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListRelatedAccountGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRelatedAccountGroups($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 migrateKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $request = (new MigrateKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->migrateKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/MigrateKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function migrateKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $request = (new MigrateKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->migrateKey($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 removeIpOverrideTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RemoveIpOverrideResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - $request = (new RemoveIpOverrideRequest()) - ->setName($formattedName) - ->setIpOverrideData($ipOverrideData); - $response = $gapicClient->removeIpOverride($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/RemoveIpOverride', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIpOverrideData(); - $this->assertProtobufEquals($ipOverrideData, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeIpOverrideExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - $request = (new RemoveIpOverrideRequest()) - ->setName($formattedName) - ->setIpOverrideData($ipOverrideData); - try { - $gapicClient->removeIpOverride($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 reorderFirewallPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReorderFirewallPoliciesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $formattedNames = [ - $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), - ]; - $request = (new ReorderFirewallPoliciesRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $response = $gapicClient->reorderFirewallPolicies($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/ReorderFirewallPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reorderFirewallPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $formattedNames = [ - $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), - ]; - $request = (new ReorderFirewallPoliciesRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - try { - $gapicClient->reorderFirewallPolicies($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 retrieveLegacySecretKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $legacySecretKey = 'legacySecretKey-1937138042'; - $expectedResponse = new RetrieveLegacySecretKeyResponse(); - $expectedResponse->setLegacySecretKey($legacySecretKey); - $transport->addResponse($expectedResponse); - // Mock request - $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $request = (new RetrieveLegacySecretKeyRequest()) - ->setKey($formattedKey); - $response = $gapicClient->retrieveLegacySecretKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/RetrieveLegacySecretKey', $actualFuncCall); - $actualValue = $actualRequestObject->getKey(); - $this->assertProtobufEquals($formattedKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveLegacySecretKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $request = (new RetrieveLegacySecretKeyRequest()) - ->setKey($formattedKey); - try { - $gapicClient->retrieveLegacySecretKey($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 searchRelatedAccountGroupMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); - $relatedAccountGroupMemberships = [ - $relatedAccountGroupMembershipsElement, - ]; - $expectedResponse = new SearchRelatedAccountGroupMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProject = $gapicClient->projectName('[PROJECT]'); - $request = (new SearchRelatedAccountGroupMembershipsRequest()) - ->setProject($formattedProject); - $response = $gapicClient->searchRelatedAccountGroupMemberships($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/SearchRelatedAccountGroupMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getProject(); - $this->assertProtobufEquals($formattedProject, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchRelatedAccountGroupMembershipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProject = $gapicClient->projectName('[PROJECT]'); - $request = (new SearchRelatedAccountGroupMembershipsRequest()) - ->setProject($formattedProject); - try { - $gapicClient->searchRelatedAccountGroupMemberships($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 updateFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $path = 'path3433509'; - $condition = 'condition-861311717'; - $expectedResponse = new FirewallPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPath($path); - $expectedResponse->setCondition($condition); - $transport->addResponse($expectedResponse); - // Mock request - $firewallPolicy = new FirewallPolicy(); - $request = (new UpdateFirewallPolicyRequest()) - ->setFirewallPolicy($firewallPolicy); - $response = $gapicClient->updateFirewallPolicy($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getFirewallPolicy(); - $this->assertProtobufEquals($firewallPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $firewallPolicy = new FirewallPolicy(); - $request = (new UpdateFirewallPolicyRequest()) - ->setFirewallPolicy($firewallPolicy); - try { - $gapicClient->updateFirewallPolicy($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 updateKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - $request = (new UpdateKeyRequest()) - ->setKey($key); - $response = $gapicClient->updateKey($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateKey', $actualFuncCall); - $actualValue = $actualRequestObject->getKey(); - $this->assertProtobufEquals($key, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - $request = (new UpdateKeyRequest()) - ->setKey($key); - try { - $gapicClient->updateKey($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 addIpOverrideAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AddIpOverrideResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - $request = (new AddIpOverrideRequest()) - ->setName($formattedName) - ->setIpOverrideData($ipOverrideData); - $response = $gapicClient->addIpOverrideAsync($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.recaptchaenterprise.v1.RecaptchaEnterpriseService/AddIpOverride', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIpOverrideData(); - $this->assertProtobufEquals($ipOverrideData, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php deleted file mode 100644 index 0d04fa39208b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php +++ /dev/null @@ -1,1517 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RecaptchaEnterpriseServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RecaptchaEnterpriseServiceClient($options); - } - - /** @test */ - public function addIpOverrideTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AddIpOverrideResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - $response = $gapicClient->addIpOverride($formattedName, $ipOverrideData); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/AddIpOverride', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIpOverrideData(); - $this->assertProtobufEquals($ipOverrideData, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addIpOverrideExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - try { - $gapicClient->addIpOverride($formattedName, $ipOverrideData); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateAssessmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AnnotateAssessmentResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assessmentName('[PROJECT]', '[ASSESSMENT]'); - $annotation = Annotation::ANNOTATION_UNSPECIFIED; - $response = $gapicClient->annotateAssessment($formattedName, $annotation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/AnnotateAssessment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getAnnotation(); - $this->assertProtobufEquals($annotation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateAssessmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assessmentName('[PROJECT]', '[ASSESSMENT]'); - $annotation = Annotation::ANNOTATION_UNSPECIFIED; - try { - $gapicClient->annotateAssessment($formattedName, $annotation); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssessmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Assessment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $assessment = new Assessment(); - $response = $gapicClient->createAssessment($formattedParent, $assessment); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateAssessment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAssessment(); - $this->assertProtobufEquals($assessment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssessmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $assessment = new Assessment(); - try { - $gapicClient->createAssessment($formattedParent, $assessment); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $path = 'path3433509'; - $condition = 'condition-861311717'; - $expectedResponse = new FirewallPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPath($path); - $expectedResponse->setCondition($condition); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $firewallPolicy = new FirewallPolicy(); - $response = $gapicClient->createFirewallPolicy($formattedParent, $firewallPolicy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFirewallPolicy(); - $this->assertProtobufEquals($firewallPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $firewallPolicy = new FirewallPolicy(); - try { - $gapicClient->createFirewallPolicy($formattedParent, $firewallPolicy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - $response = $gapicClient->createKey($formattedParent, $key); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getKey(); - $this->assertProtobufEquals($key, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - try { - $gapicClient->createKey($formattedParent, $key); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - $gapicClient->deleteFirewallPolicy($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - try { - $gapicClient->deleteFirewallPolicy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $gapicClient->deleteKey($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - try { - $gapicClient->deleteKey($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $path = 'path3433509'; - $condition = 'condition-861311717'; - $expectedResponse = new FirewallPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPath($path); - $expectedResponse->setCondition($condition); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - $response = $gapicClient->getFirewallPolicy($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'); - try { - $gapicClient->getFirewallPolicy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $response = $gapicClient->getKey($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - try { - $gapicClient->getKey($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Metrics(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->metricsName('[PROJECT]', '[KEY]'); - $response = $gapicClient->getMetrics($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMetricsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->metricsName('[PROJECT]', '[KEY]'); - try { - $gapicClient->getMetrics($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFirewallPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $firewallPoliciesElement = new FirewallPolicy(); - $firewallPolicies = [ - $firewallPoliciesElement, - ]; - $expectedResponse = new ListFirewallPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFirewallPolicies($firewallPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listFirewallPolicies($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFirewallPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListFirewallPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFirewallPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - try { - $gapicClient->listFirewallPolicies($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIpOverridesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $ipOverridesElement = new IpOverrideData(); - $ipOverrides = [ - $ipOverridesElement, - ]; - $expectedResponse = new ListIpOverridesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIpOverrides($ipOverrides); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $response = $gapicClient->listIpOverrides($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIpOverrides()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListIpOverrides', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIpOverridesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - try { - $gapicClient->listIpOverrides($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $keysElement = new Key(); - $keys = [ - $keysElement, - ]; - $expectedResponse = new ListKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setKeys($keys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listKeys($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - try { - $gapicClient->listKeys($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRelatedAccountGroupMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); - $relatedAccountGroupMemberships = [ - $relatedAccountGroupMembershipsElement, - ]; - $expectedResponse = new ListRelatedAccountGroupMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - $response = $gapicClient->listRelatedAccountGroupMemberships($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroupMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRelatedAccountGroupMembershipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - try { - $gapicClient->listRelatedAccountGroupMemberships($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRelatedAccountGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $relatedAccountGroupsElement = new RelatedAccountGroup(); - $relatedAccountGroups = [ - $relatedAccountGroupsElement, - ]; - $expectedResponse = new ListRelatedAccountGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRelatedAccountGroups($relatedAccountGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listRelatedAccountGroups($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRelatedAccountGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRelatedAccountGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - try { - $gapicClient->listRelatedAccountGroups($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function migrateKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $response = $gapicClient->migrateKey($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/MigrateKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function migrateKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - try { - $gapicClient->migrateKey($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeIpOverrideTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RemoveIpOverrideResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - $response = $gapicClient->removeIpOverride($formattedName, $ipOverrideData); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/RemoveIpOverride', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIpOverrideData(); - $this->assertProtobufEquals($ipOverrideData, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeIpOverrideExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyName('[PROJECT]', '[KEY]'); - $ipOverrideData = new IpOverrideData(); - $ipOverrideDataIp = 'ipOverrideDataIp1421737572'; - $ipOverrideData->setIp($ipOverrideDataIp); - $ipOverrideDataOverrideType = OverrideType::OVERRIDE_TYPE_UNSPECIFIED; - $ipOverrideData->setOverrideType($ipOverrideDataOverrideType); - try { - $gapicClient->removeIpOverride($formattedName, $ipOverrideData); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reorderFirewallPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReorderFirewallPoliciesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $formattedNames = [ - $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), - ]; - $response = $gapicClient->reorderFirewallPolicies($formattedParent, $formattedNames); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ReorderFirewallPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reorderFirewallPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $formattedNames = [ - $gapicClient->firewallPolicyName('[PROJECT]', '[FIREWALLPOLICY]'), - ]; - try { - $gapicClient->reorderFirewallPolicies($formattedParent, $formattedNames); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveLegacySecretKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $legacySecretKey = 'legacySecretKey-1937138042'; - $expectedResponse = new RetrieveLegacySecretKeyResponse(); - $expectedResponse->setLegacySecretKey($legacySecretKey); - $transport->addResponse($expectedResponse); - // Mock request - $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); - $response = $gapicClient->retrieveLegacySecretKey($formattedKey); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/RetrieveLegacySecretKey', $actualFuncCall); - $actualValue = $actualRequestObject->getKey(); - $this->assertProtobufEquals($formattedKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveLegacySecretKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedKey = $gapicClient->keyName('[PROJECT]', '[KEY]'); - try { - $gapicClient->retrieveLegacySecretKey($formattedKey); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchRelatedAccountGroupMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $relatedAccountGroupMembershipsElement = new RelatedAccountGroupMembership(); - $relatedAccountGroupMemberships = [ - $relatedAccountGroupMembershipsElement, - ]; - $expectedResponse = new SearchRelatedAccountGroupMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProject = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->searchRelatedAccountGroupMemberships($formattedProject); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRelatedAccountGroupMemberships()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/SearchRelatedAccountGroupMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getProject(); - $this->assertProtobufEquals($formattedProject, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchRelatedAccountGroupMembershipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProject = $gapicClient->projectName('[PROJECT]'); - try { - $gapicClient->searchRelatedAccountGroupMemberships($formattedProject); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFirewallPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $path = 'path3433509'; - $condition = 'condition-861311717'; - $expectedResponse = new FirewallPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPath($path); - $expectedResponse->setCondition($condition); - $transport->addResponse($expectedResponse); - // Mock request - $firewallPolicy = new FirewallPolicy(); - $response = $gapicClient->updateFirewallPolicy($firewallPolicy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateFirewallPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getFirewallPolicy(); - $this->assertProtobufEquals($firewallPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFirewallPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $firewallPolicy = new FirewallPolicy(); - try { - $gapicClient->updateFirewallPolicy($firewallPolicy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Key(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - $response = $gapicClient->updateKey($key); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateKey', $actualFuncCall); - $actualValue = $actualRequestObject->getKey(); - $this->assertProtobufEquals($key, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $key = new Key(); - $keyDisplayName = 'keyDisplayName-302940530'; - $key->setDisplayName($keyDisplayName); - try { - $gapicClient->updateKey($key); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}